Added SPI pin declarations to Board files

This commit is contained in:
Edvard Pettersen 2018-08-30 17:11:42 +02:00
parent f0419b21bc
commit eda0a9b962
17 changed files with 119 additions and 7 deletions

View File

@ -323,7 +323,7 @@ ext_flash_open(spi_device_t *conf)
flash_spi_configuration = get_spi_conf(conf);
/* Check if platform has ext-flash */
if(flash_spi_configuration->pin_spi_cs == GPIO_HAL_PIN_UNKNOWN) {
if(flash_spi_configuration->pin_spi_sck == GPIO_HAL_PIN_UNKNOWN) {
return false;
}

View File

@ -97,9 +97,9 @@
#if TI_SPI_CONF_SPI0_ENABLE
#define EXT_FLASH_SPI_CONTROLLER Board_SPI0
#define EXT_FLASH_SPI_PIN_SCK GPIO_HAL_PIN_UNKNOWN
#define EXT_FLASH_SPI_PIN_MOSI GPIO_HAL_PIN_UNKNOWN
#define EXT_FLASH_SPI_PIN_MISO GPIO_HAL_PIN_UNKNOWN
#define EXT_FLASH_SPI_PIN_SCK Board_SPI0_SCK
#define EXT_FLASH_SPI_PIN_MOSI Board_SPI0_MOSI
#define EXT_FLASH_SPI_PIN_MISO Board_SPI0_MISO
#define EXT_FLASH_SPI_PIN_CS Board_SPI_FLASH_CS
#define EXT_FLASH_DEVICE_ID 0x14

View File

@ -114,7 +114,15 @@ extern "C" {
#define Board_SD0 CC1310_LAUNCHXL_SDSPI0
#define Board_SPI0 CC1310_LAUNCHXL_SPI0
#define Board_SPI0_MISO CC1310_LAUNCHXL_SPI0_MISO
#define Board_SPI0_MOSI CC1310_LAUNCHXL_SPI0_MOSI
#define Board_SPI0_CLK CC1310_LAUNCHXL_SPI0_CLK
#define Board_SPI0_CSN CC1310_LAUNCHXL_SPI0_CSN
#define Board_SPI1 CC1310_LAUNCHXL_SPI1
#define Board_SPI1_MISO CC1310_LAUNCHXL_SPI1_MISO
#define Board_SPI1_MOSI CC1310_LAUNCHXL_SPI1_MOSI
#define Board_SPI1_CLK CC1310_LAUNCHXL_SPI1_CLK
#define Board_SPI1_CSN CC1310_LAUNCHXL_SPI1_CSN
#define Board_SPI_FLASH_CS CC1310_LAUNCHXL_SPI_FLASH_CS
#define Board_FLASH_CS_ON 0
#define Board_FLASH_CS_OFF 1

View File

@ -119,7 +119,15 @@ extern "C" {
#define Board_SD0 CC1312R1_LAUNCHXL_SDSPI0
#define Board_SPI0 CC1312R1_LAUNCHXL_SPI0
#define Board_SPI0_MISO CC1312R1_LAUNCHXL_SPI0_MISO
#define Board_SPI0_MOSI CC1312R1_LAUNCHXL_SPI0_MOSI
#define Board_SPI0_CLK CC1312R1_LAUNCHXL_SPI0_CLK
#define Board_SPI0_CSN CC1312R1_LAUNCHXL_SPI0_CSN
#define Board_SPI1 CC1312R1_LAUNCHXL_SPI1
#define Board_SPI1_MISO CC1312R1_LAUNCHXL_SPI1_MISO
#define Board_SPI1_MOSI CC1312R1_LAUNCHXL_SPI1_MOSI
#define Board_SPI1_CLK CC1312R1_LAUNCHXL_SPI1_CLK
#define Board_SPI1_CSN CC1312R1_LAUNCHXL_SPI1_CSN
#define Board_SPI_FLASH_CS CC1312R1_LAUNCHXL_SPI_FLASH_CS
#define Board_FLASH_CS_ON 0
#define Board_FLASH_CS_OFF 1

View File

@ -131,7 +131,15 @@ extern "C" {
#define Board_SD0 CC1350_LAUNCHXL_433_SDSPI0
#define Board_SPI0 CC1350_LAUNCHXL_433_SPI0
#define Board_SPI0_MISO CC1350_LAUNCHXL_433_SPI0_MISO
#define Board_SPI0_MOSI CC1350_LAUNCHXL_433_SPI0_MOSI
#define Board_SPI0_CLK CC1350_LAUNCHXL_433_SPI0_CLK
#define Board_SPI0_CSN CC1350_LAUNCHXL_433_SPI0_CSN
#define Board_SPI1 CC1350_LAUNCHXL_433_SPI1
#define Board_SPI1_MISO CC1350_LAUNCHXL_433_SPI1_MISO
#define Board_SPI1_MOSI CC1350_LAUNCHXL_433_SPI1_MOSI
#define Board_SPI1_CLK CC1350_LAUNCHXL_433_SPI1_CLK
#define Board_SPI1_CSN CC1350_LAUNCHXL_433_SPI1_CSN
#define Board_SPI_FLASH_CS CC1350_LAUNCHXL_433_SPI_FLASH_CS
#define Board_FLASH_CS_ON (0)
#define Board_FLASH_CS_OFF (1)

View File

@ -131,7 +131,15 @@ extern "C" {
#define Board_SD0 CC1350_LAUNCHXL_SDSPI0
#define Board_SPI0 CC1350_LAUNCHXL_SPI0
#define Board_SPI0_MISO CC1350_LAUNCHXL_SPI0_MISO
#define Board_SPI0_MOSI CC1350_LAUNCHXL_SPI0_MOSI
#define Board_SPI0_CLK CC1350_LAUNCHXL_SPI0_CLK
#define Board_SPI0_CSN CC1350_LAUNCHXL_SPI0_CSN
#define Board_SPI1 CC1350_LAUNCHXL_SPI1
#define Board_SPI1_MISO CC1350_LAUNCHXL_SPI1_MISO
#define Board_SPI1_MOSI CC1350_LAUNCHXL_SPI1_MOSI
#define Board_SPI1_CLK CC1350_LAUNCHXL_SPI1_CLK
#define Board_SPI1_CSN CC1350_LAUNCHXL_SPI1_CSN
#define Board_SPI_FLASH_CS CC1350_LAUNCHXL_SPI_FLASH_CS
#define Board_FLASH_CS_ON (0)
#define Board_FLASH_CS_OFF (1)

View File

@ -137,7 +137,15 @@ extern "C" {
#define Board_SD0 CC1352P_2_LAUNCHXL_SDSPI0
#define Board_SPI0 CC1352P_2_LAUNCHXL_SPI0
#define Board_SPI0_MISO CC1352P_2_LAUNCHXL_SPI0_MISO
#define Board_SPI0_MOSI CC1352P_2_LAUNCHXL_SPI0_MOSI
#define Board_SPI0_CLK CC1352P_2_LAUNCHXL_SPI0_CLK
#define Board_SPI0_CSN CC1352P_2_LAUNCHXL_SPI0_CSN
#define Board_SPI1 CC1352P_2_LAUNCHXL_SPI1
#define Board_SPI1_MISO CC1352P_2_LAUNCHXL_SPI1_MISO
#define Board_SPI1_MOSI CC1352P_2_LAUNCHXL_SPI1_MOSI
#define Board_SPI1_CLK CC1352P_2_LAUNCHXL_SPI1_CLK
#define Board_SPI1_CSN CC1352P_2_LAUNCHXL_SPI1_CSN
#define Board_SPI_FLASH_CS CC1352P_2_LAUNCHXL_SPI_FLASH_CS
#define Board_FLASH_CS_ON 0
#define Board_FLASH_CS_OFF 1

View File

@ -137,7 +137,15 @@ extern "C" {
#define Board_SD0 CC1352P_4_LAUNCHXL_SDSPI0
#define Board_SPI0 CC1352P_4_LAUNCHXL_SPI0
#define Board_SPI0_MISO CC1352P_4_LAUNCHXL_SPI0_MISO
#define Board_SPI0_MOSI CC1352P_4_LAUNCHXL_SPI0_MOSI
#define Board_SPI0_CLK CC1352P_4_LAUNCHXL_SPI0_CLK
#define Board_SPI0_CSN CC1352P_4_LAUNCHXL_SPI0_CSN
#define Board_SPI1 CC1352P_4_LAUNCHXL_SPI1
#define Board_SPI1_MISO CC1352P_4_LAUNCHXL_SPI1_MISO
#define Board_SPI1_MOSI CC1352P_4_LAUNCHXL_SPI1_MOSI
#define Board_SPI1_CLK CC1352P_4_LAUNCHXL_SPI1_CLK
#define Board_SPI1_CSN CC1352P_4_LAUNCHXL_SPI1_CSN
#define Board_SPI_FLASH_CS CC1352P_4_LAUNCHXL_SPI_FLASH_CS
#define Board_FLASH_CS_ON 0
#define Board_FLASH_CS_OFF 1

View File

@ -137,7 +137,15 @@ extern "C" {
#define Board_SD0 CC1352P1_LAUNCHXL_SDSPI0
#define Board_SPI0 CC1352P1_LAUNCHXL_SPI0
#define Board_SPI0_MISO CC1352P1_LAUNCHXL_SPI0_MISO
#define Board_SPI0_MOSI CC1352P1_LAUNCHXL_SPI0_MOSI
#define Board_SPI0_CLK CC1352P1_LAUNCHXL_SPI0_CLK
#define Board_SPI0_CSN CC1352P1_LAUNCHXL_SPI0_CSN
#define Board_SPI1 CC1352P1_LAUNCHXL_SPI1
#define Board_SPI1_MISO CC1352P1_LAUNCHXL_SPI1_MISO
#define Board_SPI1_MOSI CC1352P1_LAUNCHXL_SPI1_MOSI
#define Board_SPI1_CLK CC1352P1_LAUNCHXL_SPI1_CLK
#define Board_SPI1_CSN CC1352P1_LAUNCHXL_SPI1_CSN
#define Board_SPI_FLASH_CS CC1352P1_LAUNCHXL_SPI_FLASH_CS
#define Board_FLASH_CS_ON 0
#define Board_FLASH_CS_OFF 1

View File

@ -133,7 +133,15 @@ extern "C" {
#define Board_SD0 CC1352R1_LAUNCHXL_SDSPI0
#define Board_SPI0 CC1352R1_LAUNCHXL_SPI0
#define Board_SPI0_MISO CC1352R1_LAUNCHXL_SPI0_MISO
#define Board_SPI0_MOSI CC1352R1_LAUNCHXL_SPI0_MOSI
#define Board_SPI0_CLK CC1352R1_LAUNCHXL_SPI0_CLK
#define Board_SPI0_CSN CC1352R1_LAUNCHXL_SPI0_CSN
#define Board_SPI1 CC1352R1_LAUNCHXL_SPI1
#define Board_SPI1_MISO CC1352R1_LAUNCHXL_SPI1_MISO
#define Board_SPI1_MOSI CC1352R1_LAUNCHXL_SPI1_MOSI
#define Board_SPI1_CLK CC1352R1_LAUNCHXL_SPI1_CLK
#define Board_SPI1_CSN CC1352R1_LAUNCHXL_SPI1_CSN
#define Board_SPI_FLASH_CS CC1352R1_LAUNCHXL_SPI_FLASH_CS
#define Board_FLASH_CS_ON 0
#define Board_FLASH_CS_OFF 1

View File

@ -123,7 +123,15 @@ extern "C" {
#define Board_SD0 CC2650_LAUNCHXL_SDSPI0
#define Board_SPI0 CC2650_LAUNCHXL_SPI0
#define Board_SPI0_MISO CC2650_LAUNCHXL_SPI0_MISO
#define Board_SPI0_MOSI CC2650_LAUNCHXL_SPI0_MOSI
#define Board_SPI0_CLK CC2650_LAUNCHXL_SPI0_CLK
#define Board_SPI0_CSN CC2650_LAUNCHXL_SPI0_CSN
#define Board_SPI1 CC2650_LAUNCHXL_SPI1
#define Board_SPI1_MISO CC2650_LAUNCHXL_SPI1_MISO
#define Board_SPI1_MOSI CC2650_LAUNCHXL_SPI1_MOSI
#define Board_SPI1_CLK CC2650_LAUNCHXL_SPI1_CLK
#define Board_SPI1_CSN CC2650_LAUNCHXL_SPI1_CSN
#define Board_SPI_FLASH_CS CC2650_LAUNCHXL_SPI_FLASH_CS
#define Board_FLASH_CS_ON 0
#define Board_FLASH_CS_OFF 1

View File

@ -131,7 +131,15 @@ extern "C" {
#define Board_SD0 CC26X2R1_LAUNCHXL_SDSPI0
#define Board_SPI0 CC26X2R1_LAUNCHXL_SPI0
#define Board_SPI0_MISO CC26X2R1_LAUNCHXL_SPI0_MISO
#define Board_SPI0_MOSI CC26X2R1_LAUNCHXL_SPI0_MOSI
#define Board_SPI0_CLK CC26X2R1_LAUNCHXL_SPI0_CLK
#define Board_SPI0_CSN CC26X2R1_LAUNCHXL_SPI0_CSN
#define Board_SPI1 CC26X2R1_LAUNCHXL_SPI1
#define Board_SPI1_MISO CC26X2R1_LAUNCHXL_SPI1_MISO
#define Board_SPI1_MOSI CC26X2R1_LAUNCHXL_SPI1_MOSI
#define Board_SPI1_CLK CC26X2R1_LAUNCHXL_SPI1_CLK
#define Board_SPI1_CSN CC26X2R1_LAUNCHXL_SPI1_CSN
#define Board_SPI_FLASH_CS CC26X2R1_LAUNCHXL_SPI_FLASH_CS
#define Board_FLASH_CS_ON 0
#define Board_FLASH_CS_OFF 1

View File

@ -92,9 +92,9 @@
#if TI_SPI_CONF_SPI0_ENABLE
#define EXT_FLASH_SPI_CONTROLLER Board_SPI0
#define EXT_FLASH_SPI_PIN_SCK GPIO_HAL_PIN_UNKNOWN
#define EXT_FLASH_SPI_PIN_MOSI GPIO_HAL_PIN_UNKNOWN
#define EXT_FLASH_SPI_PIN_MISO GPIO_HAL_PIN_UNKNOWN
#define EXT_FLASH_SPI_PIN_SCK Board_SPI0_SCK
#define EXT_FLASH_SPI_PIN_MOSI Board_SPI0_MOSI
#define EXT_FLASH_SPI_PIN_MISO Board_SPI0_MISO
#define EXT_FLASH_SPI_PIN_CS Board_SPI_FLASH_CS
#define EXT_FLASH_DEVICE_ID 0x14

View File

@ -111,7 +111,15 @@ extern "C" {
#define Board_PWM7 CC1350STK_PWM7
#define Board_SPI0 CC1350STK_SPI0
#define Board_SPI0_MISO CC1350STK_SPI0_MISO
#define Board_SPI0_MOSI CC1350STK_SPI0_MOSI
#define Board_SPI0_CLK CC1350STK_SPI0_CLK
#define Board_SPI0_CSN CC1350STK_SPI0_CSN
#define Board_SPI1 CC1350STK_SPI1
#define Board_SPI1_MISO CC1350STK_SPI1_MISO
#define Board_SPI1_MOSI CC1350STK_SPI1_MOSI
#define Board_SPI1_CLK CC1350STK_SPI1_CLK
#define Board_SPI1_CSN CC1350STK_SPI1_CSN
#define Board_SPI_FLASH_CS CC1350STK_SPI_FLASH_CS
#define Board_FLASH_CS_ON CC1350STK_FLASH_CS_ON
#define Board_FLASH_CS_OFF CC1350STK_FLASH_CS_OFF

View File

@ -111,7 +111,15 @@ extern "C" {
#define Board_PWM7 CC2650STK_PWM7
#define Board_SPI0 CC2650STK_SPI0
#define Board_SPI0_MISO CC2650STK_SPI0_MISO
#define Board_SPI0_MOSI CC2650STK_SPI0_MOSI
#define Board_SPI0_CLK CC2650STK_SPI0_CLK
#define Board_SPI0_CSN CC2650STK_SPI0_CSN
#define Board_SPI1 CC2650STK_SPI1
#define Board_SPI1_MISO CC2650STK_SPI1_MISO
#define Board_SPI1_MOSI CC2650STK_SPI1_MOSI
#define Board_SPI1_CLK CC2650STK_SPI1_CLK
#define Board_SPI1_CSN CC2650STK_SPI1_CSN
#define Board_SPI_FLASH_CS CC2650STK_SPI_FLASH_CS
#define Board_FLASH_CS_ON CC2650STK_FLASH_CS_ON
#define Board_FLASH_CS_OFF CC2650STK_FLASH_CS_OFF

View File

@ -135,7 +135,15 @@ extern "C" {
#define Board_SD0 CC1350DK_7XD_SDSPI0
#define Board_SPI0 CC1350DK_7XD_SPI0
#define Board_SPI0_MISO CC1350DK_7XD_SPI0_MISO
#define Board_SPI0_MOSI CC1350DK_7XD_SPI0_MOSI
#define Board_SPI0_CLK CC1350DK_7XD_SPI0_CLK
#define Board_SPI0_CSN CC1350DK_7XD_SPI0_CSN
#define Board_SPI1 CC1350DK_7XD_SPI1
#define Board_SPI1_MISO CC1350DK_7XD_SPI1_MISO
#define Board_SPI1_MOSI CC1350DK_7XD_SPI1_MOSI
#define Board_SPI1_CLK CC1350DK_7XD_SPI1_CLK
#define Board_SPI1_CSN CC1350DK_7XD_SPI1_CSN
#define Board_FLASH_CS_ON 0
#define Board_FLASH_CS_OFF 1

View File

@ -135,7 +135,15 @@ extern "C" {
#define Board_SD0 CC2650DK_7ID_SDSPI0
#define Board_SPI0 CC2650DK_7ID_SPI0
#define Board_SPI0_MISO CC2650DK_7ID_SPI0_MISO
#define Board_SPI0_MOSI CC2650DK_7ID_SPI0_MOSI
#define Board_SPI0_CLK CC2650DK_7ID_SPI0_CLK
#define Board_SPI0_CSN CC2650DK_7ID_SPI0_CSN
#define Board_SPI1 CC2650DK_7ID_SPI1
#define Board_SPI1_MISO CC2650DK_7ID_SPI1_MISO
#define Board_SPI1_MOSI CC2650DK_7ID_SPI1_MOSI
#define Board_SPI1_CLK CC2650DK_7ID_SPI1_CLK
#define Board_SPI1_CSN CC2650DK_7ID_SPI1_CSN
#define Board_FLASH_CS_ON 0
#define Board_FLASH_CS_OFF 1