Add pin definitions for Silicon Labs parts

pull/1138/head
Steven Cooreman 2015-05-26 13:30:44 +02:00
parent 66eefdfc5e
commit 02d6b3200a
7 changed files with 88 additions and 0 deletions

View File

@ -45,6 +45,18 @@ DigitalIn in(TP4);
DigitalOut out(P1_0);
DigitalIn in(P4_7);
#elif defined(TARGET_EFM32LG_STK3600) || defined(TARGET_EFM32GG_STK3700) || defined(TARGET_EFM32WG_STK3800)
DigitalInOut d1(PD0);
DigitalInOut d2(PC4);
#elif defined(TARGET_EFM32ZG_STK3200)
DigitalInOut d1(PD7);
DigitalInOut d2(PC1);
#elif defined(TARGET_EFM32HG_STK3400)
DigitalInOut d1(PE10);
DigitalInOut d2(PC1);
#else
DigitalOut out(p5);
DigitalIn in(p25);

View File

@ -45,6 +45,18 @@ DigitalInOut d2(TP4);
DigitalInOut d1(P1_0);
DigitalInOut d2(P4_7);
#elif defined(TARGET_EFM32LG_STK3600) || defined(TARGET_EFM32GG_STK3700) || defined(TARGET_EFM32WG_STK3800)
DigitalInOut d1(PD0);
DigitalInOut d2(PC4);
#elif defined(TARGET_EFM32ZG_STK3200)
DigitalInOut d1(PD7);
DigitalInOut d2(PC1);
#elif defined(TARGET_EFM32HG_STK3400)
DigitalInOut d1(PE10);
DigitalInOut d2(PC1);
#else
DigitalInOut d1(p5);
DigitalInOut d2(p25);

View File

@ -10,6 +10,18 @@ I2C i2c(PTE0, PTE1);
I2C i2c(p22,p20);
#elif defined(TARGET_FF_ARDUINO) || defined(TARGET_MAXWSNENV)
I2C i2c(I2C_SDA, I2C_SCL);
#elif defined(TARGET_EFM32LG_STK3600) || defined(TARGET_EFM32GG_STK3700) || defined(TARGET_EFM32WG_STK3800)
#define TEST_SDA_PIN PD6
#define TEST_SCL_PIN PD7
I2C i2c(TEST_SDA_PIN, TEST_SCL_PIN);
#elif defined(TARGET_EFM32ZG_STK3200)
#define TEST_SDA_PIN PE12
#define TEST_SCL_PIN PE13
I2C i2c(TEST_SDA_PIN, TEST_SCL_PIN);
#elif defined(TARGET_EFM32HG_STK3400)
#define TEST_SDA_PIN PD6
#define TEST_SCL_PIN PD7
I2C i2c(TEST_SDA_PIN, TEST_SCL_PIN);
#else
I2C i2c(p28, p27);
#endif

View File

@ -13,6 +13,15 @@ DigitalOut cs(PTA13);
#elif defined(TARGET_FF_ARDUINO)
SPI spi(D11, D12, D13); // mosi, miso, sclk
DigitalOut cs(D10);
#elif defined(TARGET_EFM32LG_STK3600) || defined(TARGET_EFM32GG_STK3700) || defined(TARGET_EFM32WG_STK3800)
SPI spi(PD0, PD1, PD2); // mosi, miso, sclk
DigitalOut cs(PD3);
#elif defined(TARGET_EFM32ZG_STK3200)
SPI spi(PD7, PD6, PC15); // mosi, miso, sclk
DigitalOut cs(PC14);
#elif defined(TARGET_EFM32HG_STK3400)
SPI spi(PE10, PE11, PE12); // mosi, miso, sclk
DigitalOut cs(PE13);
#else
SPI spi(p5, p6, p7); // mosi, miso, sclk
DigitalOut cs(p8);

View File

@ -27,6 +27,19 @@
#if defined(TARGET_K64F)
#define TEST_SDA_PIN PTE25
#define TEST_SCL_PIN PTE24
#elif defined(TARGET_EFM32LG_STK3600) || defined(TARGET_EFM32GG_STK3700) || defined(TARGET_EFM32WG_STK3800)
#define TEST_SDA_PIN PD6
#define TEST_SCL_PIN PD7
#elif defined(TARGET_EFM32ZG_STK3200)
#define TEST_SDA_PIN PE12
#define TEST_SCL_PIN PE13
#elif defined(TARGET_EFM32HG_STK3400)
#define TEST_SDA_PIN PD6
#define TEST_SCL_PIN PD7
#else
#error Target not supported
#endif

View File

@ -28,6 +28,17 @@
#define TEST_SERIAL_ONE_TX_PIN PTC17 // uart3
#define TEST_SERIAL_TWO_RX_PIN PTD2 // uart2
#elif defined(TARGET_EFM32LG_STK3600) || defined(TARGET_EFM32GG_STK3700) || defined(TARGET_EFM32WG_STK3800)
#define TEST_SERIAL_ONE_TX_PIN PD0 // usart1
#define TEST_SERIAL_TWO_RX_PIN PC4 // usart2
#elif defined(TARGET_EFM32ZG_STK3200)
#error "Target not supported (only 2 serial ports available, need 3)"
#elif defined(TARGET_EFM32HG_STK3400)
#define TEST_SERIAL_ONE_TX_PIN PE10 // usart0
#define TEST_SERIAL_TWO_RX_PIN PC1 // usart1
#else
#error Target not supported

View File

@ -39,6 +39,25 @@
#define TEST_MISO_PIN PTD3
#define TEST_SCLK_PIN PTD1
#define TEST_CS_PIN PTD0
#elif defined(TARGET_EFM32LG_STK3600) || defined(TARGET_EFM32GG_STK3700) || defined(TARGET_EFM32WG_STK3800)
#define TEST_MOSI_PIN PD0
#define TEST_MISO_PIN PD1
#define TEST_SCLK_PIN PD2
#define TEST_CS_PIN PD3
#elif defined(TARGET_EFM32ZG_STK3200)
#define TEST_MOSI_PIN PD7
#define TEST_MISO_PIN PD6
#define TEST_SCLK_PIN PC15
#define TEST_CS_PIN PC14
#elif defined(TARGET_EFM32HG_STK3400)
#define TEST_MOSI_PIN PE10
#define TEST_MISO_PIN PE11
#define TEST_SCLK_PIN PE12
#define TEST_CS_PIN PE13
#else
#error Target not supported
#endif