Skip to content

Commit

Permalink
use define for led, button, spi and i2c
Browse files Browse the repository at this point in the history
use define for led, button, spi and i2c
  • Loading branch information
hallard committed Apr 4, 2024
1 parent 0e282c3 commit df0dc8b
Showing 1 changed file with 23 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,18 +160,11 @@ typedef enum {
p46 = P1_14,
p47 = P1_15,

LED1 = p6, /* On board Green */
LED2 = p8, /* RGB Red */
LED3 = p41, /* RGB Green */
LED4 = p12, /* RGB Blue */

BUTTON1 = p38,

/* Available on castelled board edges */
RX_PIN_NUMBER = p24,
TX_PIN_NUMBER = p20,
CTS_PIN_NUMBER = p17,
RTS_PIN_NUMBER = p22,
RX_PIN_NUMBER = P0_24,
TX_PIN_NUMBER = P0_20,
CTS_PIN_NUMBER = P0_17,
RTS_PIN_NUMBER = P0_22,

// mBed interface Pins
CONSOLE_TX = TX_PIN_NUMBER,
Expand All @@ -189,20 +182,29 @@ typedef enum {
STDIO_UART_CTS = CTS_PIN_NUMBER,
STDIO_UART_RTS = RTS_PIN_NUMBER,

/* Available on castelled board edges */
SPI_PSELMOSI0 = p42,
SPI_PSELMISO0 = p45,
SPI_PSELSS0 = p2,
SPI_PSELSCK0 = p47,

/* Available on castelled board edges */
I2C_SDA0 = p9,
I2C_SCL0 = p10,

// Not connected
NC = (int)0xFFFFFFFF
} PinName;


#define LED1 P0_6 /* On board Green */
#define LED2 P0_8 /* RGB Red */
#define LED3 P1_9 /* RGB Green */
#define LED4 P0_12 /* RGB Blue */

#define BUTTON1 P1_6

/* Available on castelled board edges */
#define SPI_PSELMOSI0 P1_10
#define SPI_PSELMISO0 P1_13
#define SPI_PSELSS0 P0_2
#define SPI_PSELSCK0 P1_15

/* Available on castelled board edges */
#define I2C_SDA0 P0_9
#define I2C_SCL0 P0_10


typedef enum {
PullNone = 0,
PullDown = 1,
Expand Down

0 comments on commit df0dc8b

Please sign in to comment.