Skip to content

Commit faec577

Browse files
ScepticIntsandeepmistry
authored andcommitted
Added Sino:bit board (#219)
* Added Sino:bit board, including HT1632,AdaFruit GFX and Dave Astels Sinobit Library * Removed 3rd party libraries and modification of JSON * Removed and ignored .vscode folder * Removed unecessary comments in variant.cpp, Corrected include guard name in variant.h * Add some new lines * Remove stray define
1 parent d887d06 commit faec577

File tree

8 files changed

+234
-1
lines changed

8 files changed

+234
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ cores/nRF5/SDK/components/softdevice/*/hex/*.txt
77
# IDE tools
88
extras/ide-tools/bin
99
extras/ide-tools/nRF5FlashSoftDevice.jar
10+
.vscode/*

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ script:
3535
- buildExampleSketch sandeepmistry:nRF5:TinyBLE 01.Basics Blink
3636
- buildExampleSketch sandeepmistry:nRF5:bluey 01.Basics Blink
3737
- buildExampleSketch sandeepmistry:nRF5:hackaBLE 01.Basics Blink
38+
- buildExampleSketch sandeepmistry:nRF5:Sinobit 01.Basics BareMinimum

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Does not require a custom bootloader on the device.
3333
* [Waveshare BLE400](http://www.waveshare.com/wiki/BLE400)
3434
* [ng-beacon](https://github.com/urish/ng-beacon)
3535
* [TinyBLE](https://www.seeedstudio.com/Seeed-Tiny-BLE-BLE-%2B-6DOF-Mbed-Platform-p-2268.html)
36+
* [Sino:bit](http://sinobit.org)
3637

3738
## Installing
3839

@@ -58,7 +59,7 @@ No additional setup required.
5859
For 64-bit Linux users, ```libc6:i386```, ```libstdc++6:i386```, ```libncurses5:i386``` and ```libudev1:i386``` need to be installed :
5960
* ```sudo dpkg --add-architecture i386```
6061
* ```sudo apt-get update```
61-
* ```sudo apt-get install libc6:i386 libstdc++6:i386 libncurses5:i386 libudev1:i386```
62+
* ```sudo apt-get install libc6:i386 libstdc++6:i386 libncurses5:i386 libudev1:i386```
6263

6364
##### Windows
6465

boards.txt

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,3 +818,50 @@ ng_beacon.menu.softdevice.s130.softdeviceversion=2.0.1
818818
ng_beacon.menu.softdevice.s130.upload.maximum_size=151552
819819
ng_beacon.menu.softdevice.s130.build.extra_flags=-DNRF51 -DS130 -DNRF51_S130
820820
ng_beacon.menu.softdevice.s130.build.ldscript=armgcc_s130_nrf51822_xxaa.ld
821+
822+
823+
Sinobit.name=Sino:bit
824+
825+
Sinobit.vid.0=0x0d28
826+
Sinobit.pid.0=0x0204
827+
828+
Sinobit.upload.tool=sandeepmistry:openocd
829+
Sinobit.upload.protocol=cmsis-dap
830+
Sinobit.upload.target=nrf51
831+
Sinobit.upload.maximum_size=262144
832+
Sinobit.upload.setup_command=transport select swd;
833+
Sinobit.upload.use_1200bps_touch=false
834+
Sinobit.upload.wait_for_upload_port=false
835+
Sinobit.upload.native_usb=false
836+
837+
Sinobit.bootloader.tool=sandeepmistry:openocd
838+
839+
Sinobit.build.mcu=cortex-m0
840+
Sinobit.build.f_cpu=16000000
841+
Sinobit.build.board=SINOBIT
842+
Sinobit.build.core=nRF5
843+
Sinobit.build.variant=Sinobit
844+
Sinobit.build.variant_system_lib=
845+
Sinobit.build.extra_flags=-DNRF51
846+
Sinobit.build.float_flags=
847+
Sinobit.build.ldscript=nrf51_xxaa.ld
848+
849+
Sinobit.build.lfclk_flags=-DUSE_LFRC
850+
851+
Sinobit.menu.softdevice.none=None
852+
Sinobit.menu.softdevice.none.softdevice=none
853+
Sinobit.menu.softdevice.none.softdeviceversion=
854+
855+
Sinobit.menu.softdevice.s110=S110
856+
Sinobit.menu.softdevice.s110.softdevice=s110
857+
Sinobit.menu.softdevice.s110.softdeviceversion=8.0.0
858+
Sinobit.menu.softdevice.s110.upload.maximum_size=151552
859+
Sinobit.menu.softdevice.s110.build.extra_flags=-DNRF51 -DS110 -DNRF51_S110
860+
Sinobit.menu.softdevice.s110.build.ldscript=armgcc_s110_nrf51822_xxaa.ld
861+
862+
Sinobit.menu.softdevice.s130=S130
863+
Sinobit.menu.softdevice.s130.softdevice=s130
864+
Sinobit.menu.softdevice.s130.softdeviceversion=2.0.1
865+
Sinobit.menu.softdevice.s130.upload.maximum_size=151552
866+
Sinobit.menu.softdevice.s130.build.extra_flags=-DNRF51 -DS130 -DNRF51_S130
867+
Sinobit.menu.softdevice.s130.build.ldscript=armgcc_s130_nrf51822_xxaa.ld

variants/Sinobit/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Sino:Bit support files for Arduino
2+
Contributed by Tomas Lubkowitz @sceptic_int for Sino:Bit
3+
4+
For LED Matrix functionality please look at https://learn.adafruit.com/sino-bit-with-arduino/dastels-overview
5+
6+

variants/Sinobit/pins_arduino.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
3+
This library is free software; you can redistribute it and/or
4+
modify it under the terms of the GNU Lesser General Public
5+
License as published by the Free Software Foundation; either
6+
version 2.1 of the License, or (at your option) any later version.
7+
This library is distributed in the hope that it will be useful,
8+
but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10+
See the GNU Lesser General Public License for more details.
11+
You should have received a copy of the GNU Lesser General Public
12+
License along with this library; if not, write to the Free Software
13+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
14+
*/
15+
16+
// API compatibility
17+
#include "variant.h"

variants/Sinobit/variant.cpp

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
3+
Copyright (c) 2016 Sandeep Mistry All right reserved.
4+
5+
This library is free software; you can redistribute it and/or
6+
modify it under the terms of the GNU Lesser General Public
7+
License as published by the Free Software Foundation; either
8+
version 2.1 of the License, or (at your option) any later version.
9+
10+
This library is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13+
See the GNU Lesser General Public License for more details.
14+
15+
You should have received a copy of the GNU Lesser General Public
16+
License along with this library; if not, write to the Free Software
17+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18+
*/
19+
20+
#include "variant.h"
21+
22+
const uint32_t g_ADigitalPinMap[] = {
23+
24+
3, // A0 - left pad
25+
2, // A1 - middle pad
26+
1, // A2 - right pad
27+
4, // A3 - COL1
28+
5, // A4 - COL2
29+
17, // BTN A
30+
12, // COL9
31+
11, // COL8
32+
18,
33+
10, // COL7
34+
6, // A5 - COL3
35+
26, // BTN B
36+
20,
37+
23, // SCK
38+
22, // MISO
39+
21, // MOSI
40+
16,
41+
(uint32_t)-1, // 3.3V
42+
(uint32_t)-1, // 3.3V
43+
0, // SCL
44+
30, // SDA
45+
25, // RX
46+
24, // TX
47+
7, // COL4
48+
8, // COL5
49+
9, // COL6
50+
13, // ROW1
51+
14, // ROW2
52+
15, // ROW3
53+
28, // ACCEL INT 1
54+
27, // ACCEL INT 2
55+
29, // MAG INT 2
56+
19 // RST
57+
};

variants/Sinobit/variant.h

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
/*
2+
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
3+
Copyright (c) 2016 Sandeep Mistry All right reserved.
4+
This library is free software; you can redistribute it and/or
5+
modify it under the terms of the GNU Lesser General Public
6+
License as published by the Free Software Foundation; either
7+
version 2.1 of the License, or (at your option) any later version.
8+
This library is distributed in the hope that it will be useful,
9+
but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11+
See the GNU Lesser General Public License for more details.
12+
You should have received a copy of the GNU Lesser General Public
13+
License along with this library; if not, write to the Free Software
14+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
15+
*/
16+
17+
#ifndef _VARIANT_SINOBIT_
18+
#define _VARIANT_SINOBIT_
19+
20+
/** Master clock frequency */
21+
#define VARIANT_MCK (16000000ul)
22+
23+
/*----------------------------------------------------------------------------
24+
* Headers
25+
*----------------------------------------------------------------------------*/
26+
27+
#include "WVariant.h"
28+
29+
#ifdef __cplusplus
30+
extern "C"
31+
{
32+
#endif // __cplusplus
33+
34+
// Number of pins defined in PinDescription array
35+
#define PINS_COUNT (33u)
36+
#define NUM_DIGITAL_PINS (20u)
37+
#define NUM_ANALOG_INPUTS (6u)
38+
#define NUM_ANALOG_OUTPUTS (0u)
39+
40+
// LEDs
41+
#define PIN_LED (13)
42+
#define LED_BUILTIN PIN_LED
43+
44+
// Buttons
45+
#define PIN_BUTTON_A (5)
46+
#define PIN_BUTTON_B (11)
47+
48+
/*
49+
* Analog pins
50+
*/
51+
#define PIN_A0 (0)
52+
#define PIN_A1 (1)
53+
#define PIN_A2 (2)
54+
#define PIN_A3 (3)
55+
#define PIN_A4 (4)
56+
#define PIN_A5 (10)
57+
58+
59+
static const uint8_t A0 = PIN_A0 ;
60+
static const uint8_t A1 = PIN_A1 ;
61+
static const uint8_t A2 = PIN_A2 ;
62+
static const uint8_t A3 = PIN_A3 ;
63+
static const uint8_t A4 = PIN_A4 ;
64+
static const uint8_t A5 = PIN_A5 ;
65+
#define ADC_RESOLUTION 10
66+
67+
/*
68+
* Serial interfaces
69+
*/
70+
// Serial
71+
#define PIN_SERIAL_RX (21)
72+
#define PIN_SERIAL_TX (22)
73+
74+
/*
75+
* SPI Interfaces
76+
*/
77+
#define SPI_INTERFACES_COUNT 1
78+
79+
#define PIN_SPI_MISO (14)
80+
#define PIN_SPI_MOSI (15)
81+
#define PIN_SPI_SCK (13)
82+
83+
static const uint8_t SS = 16 ;
84+
static const uint8_t MOSI = PIN_SPI_MOSI ;
85+
static const uint8_t MISO = PIN_SPI_MISO ;
86+
static const uint8_t SCK = PIN_SPI_SCK ;
87+
88+
/*
89+
* Wire Interfaces
90+
*/
91+
#define WIRE_INTERFACES_COUNT 1
92+
93+
#define PIN_WIRE_SDA (20u)
94+
#define PIN_WIRE_SCL (19u)
95+
96+
static const uint8_t SDA = PIN_WIRE_SDA;
97+
static const uint8_t SCL = PIN_WIRE_SCL;
98+
99+
#ifdef __cplusplus
100+
}
101+
#endif
102+
103+
#endif

0 commit comments

Comments
 (0)