follow up to #315
- Add SERIAL_INTERFACES_COUNT to all variants - Rename PIN_SERIAL_RX/TX & PIN_SERIAL1_RX/TX
This commit is contained in:
1 parent
b6bd051b52
commit
306b10dc7f
14 files changed
+72
-74
No files matched your search
@@ -91,9 +91,10 @@ static const uint8_t A9 = PIN_A9 ;
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
// Serial
|
||||
#define PIN_SERIAL_RX (0)
|
||||
#define PIN_SERIAL_TX (1)
|
||||
#define SERIAL_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_SERIAL1_RX (0)
|
||||
#define PIN_SERIAL1_TX (1)
|
||||
|
||||
/*
|
||||
* SPI Interfaces
|
||||
|
||||
@@ -85,9 +85,10 @@ static const uint8_t A7 = PIN_A7 ;
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
// Serial
|
||||
#define PIN_SERIAL_RX (0)
|
||||
#define PIN_SERIAL_TX (1)
|
||||
#define SERIAL_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_SERIAL1_RX (0)
|
||||
#define PIN_SERIAL1_TX (1)
|
||||
|
||||
/*
|
||||
* SPI Interfaces
|
||||
|
||||
@@ -87,9 +87,10 @@ static const uint8_t AREF = PIN_AREF;
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
// Serial
|
||||
#define PIN_SERIAL_RX (8)
|
||||
#define PIN_SERIAL_TX (6)
|
||||
#define SERIAL_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_SERIAL1_RX (8)
|
||||
#define PIN_SERIAL1_TX (6)
|
||||
|
||||
/*
|
||||
* SPI Interfaces
|
||||
|
||||
@@ -93,9 +93,10 @@ static const uint8_t AREF = PIN_AREF;
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
// Serial
|
||||
#define PIN_SERIAL_RX (1)
|
||||
#define PIN_SERIAL_TX (0)
|
||||
#define SERIAL_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_SERIAL1_RX (1)
|
||||
#define PIN_SERIAL1_TX (0)
|
||||
|
||||
/*
|
||||
* SPI Interfaces
|
||||
|
||||
@@ -89,9 +89,10 @@ static const uint8_t A6 = PIN_A6 ;
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
// Serial
|
||||
#define PIN_SERIAL_RX (0)
|
||||
#define PIN_SERIAL_TX (1)
|
||||
#define SERIAL_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_SERIAL1_RX (0)
|
||||
#define PIN_SERIAL1_TX (1)
|
||||
|
||||
/*
|
||||
* SPI Interfaces
|
||||
|
||||
@@ -94,9 +94,10 @@ static const uint8_t AREF = PIN_AREF;
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
// Serial
|
||||
#define PIN_SERIAL_RX (1)
|
||||
#define PIN_SERIAL_TX (0)
|
||||
#define SERIAL_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_SERIAL1_RX (1)
|
||||
#define PIN_SERIAL1_TX (0)
|
||||
|
||||
/*
|
||||
* SPI Interfaces
|
||||
|
||||
@@ -91,23 +91,23 @@ static const uint8_t D19 = PIN_D4;
|
||||
static const uint8_t D20 = PIN_D5;
|
||||
|
||||
// LEDs
|
||||
#define LEDS_NUMBER 1
|
||||
#define LED_PRIMARY_PIN _PINNUM(1, 12)
|
||||
#define LED_STATE_ON 1
|
||||
#define LED_PRIMARY_IDX 0
|
||||
#define LED_RGB_RED_IDX 1
|
||||
#define LED_RGB_GREEN_IDX 2
|
||||
#define LED_RGB_BLUE_IDX 3
|
||||
#define LEDS_NUMBER 1
|
||||
#define LED_PRIMARY_PIN _PINNUM(1, 12)
|
||||
#define LED_STATE_ON 1
|
||||
#define LED_PRIMARY_IDX 0
|
||||
#define LED_RGB_RED_IDX 1
|
||||
#define LED_RGB_GREEN_IDX 2
|
||||
#define LED_RGB_BLUE_IDX 3
|
||||
|
||||
#define LED_RGB_RED_PIN _PINNUM(0, 13)
|
||||
#define LED_RGB_GREEN_PIN _PINNUM(0, 14)
|
||||
#define LED_RGB_BLUE_PIN _PINNUM(0, 15)
|
||||
#define BOARD_RGB_BRIGHTNESS 0x202020
|
||||
#define LED_RGB_RED_PIN _PINNUM(0, 13)
|
||||
#define LED_RGB_GREEN_PIN _PINNUM(0, 14)
|
||||
#define LED_RGB_BLUE_PIN _PINNUM(0, 15)
|
||||
#define BOARD_RGB_BRIGHTNESS 0x202020
|
||||
|
||||
static const uint8_t LED_BUILTIN = LED_PRIMARY_PIN;
|
||||
static const uint8_t LED_RGB_RED = LED_RGB_RED_PIN;
|
||||
static const uint8_t LED_RGB_GREEN = LED_RGB_GREEN_PIN;
|
||||
static const uint8_t LED_RGB_BLUE = LED_RGB_BLUE_PIN;
|
||||
static const uint8_t LED_BUILTIN = LED_PRIMARY_PIN;
|
||||
static const uint8_t LED_RGB_RED = LED_RGB_RED_PIN;
|
||||
static const uint8_t LED_RGB_GREEN = LED_RGB_GREEN_PIN;
|
||||
static const uint8_t LED_RGB_BLUE = LED_RGB_BLUE_PIN;
|
||||
|
||||
// Buttons
|
||||
#define BUTTONS_NUMBER 2
|
||||
@@ -146,12 +146,10 @@ static const uint8_t A5 = PIN_A5 ;
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
// Serial
|
||||
#define PIN_SERIAL_RX PIN_D9
|
||||
#define PIN_SERIAL_TX PIN_D10
|
||||
#define PIN_SERIAL2_RX PIN_D5
|
||||
#define PIN_SERIAL2_TX PIN_D6
|
||||
//#define HAVE_HWSERIAL2 true // TODO: implement UARTE in Uart.cpp
|
||||
#define SERIAL_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_SERIAL1_RX PIN_D9
|
||||
#define PIN_SERIAL1_TX PIN_D10
|
||||
|
||||
/*
|
||||
* SPI Interfaces
|
||||
|
||||
@@ -94,11 +94,13 @@ static const uint8_t AREF = PIN_AREF;
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
#define HAVE_HWSERIAL2
|
||||
#define SERIAL_INTERFACES_COUNT 2
|
||||
|
||||
#define PIN_SERIAL_RX (33)
|
||||
#define PIN_SERIAL_TX (34)
|
||||
// Arduino Header D0, D1
|
||||
#define PIN_SERIAL1_RX (33) // P1.01
|
||||
#define PIN_SERIAL1_TX (34) // P1.02
|
||||
|
||||
// Connected to Jlink CDC
|
||||
#define PIN_SERIAL2_RX (8)
|
||||
#define PIN_SERIAL2_TX (6)
|
||||
|
||||
|
||||
@@ -74,8 +74,8 @@ extern "C"
|
||||
// Bad things happen if the serial pins aren't defined. Instead
|
||||
// define them with an invalid pin number
|
||||
// Serial
|
||||
#define PIN_SERIAL_RX (3)
|
||||
#define PIN_SERIAL_TX (3)
|
||||
#define PIN_SERIAL1_RX (3)
|
||||
#define PIN_SERIAL1_TX (3)
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in new issue
Block a user