Changed defines for MOSI, MISO etc into const static vars, to address compatibility issues
This commit is contained in:
parent
be6e7f0734
commit
0909f4c20d
|
@ -75,10 +75,7 @@
|
|||
#include <stdint.h>
|
||||
|
||||
|
||||
#define SS BOARD_SPI1_NSS_PIN
|
||||
#define MOSI BOARD_SPI1_MOSI_PIN
|
||||
#define MISO BOARD_SPI1_MISO_PIN
|
||||
#define SCK BOARD_SPI1_SCK_PIN
|
||||
|
||||
|
||||
|
||||
typedef unsigned int word;
|
||||
|
|
|
@ -11,4 +11,10 @@
|
|||
|
||||
#define portConfigRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->CRL) )
|
||||
|
||||
static const uint8_t SS = BOARD_SPI1_NSS_PIN;
|
||||
static const uint8_t SS1 = BOARD_SPI2_NSS_PIN;
|
||||
static const uint8_t MOSI = BOARD_SPI1_MOSI_PIN;
|
||||
static const uint8_t MISO = BOARD_SPI1_MISO_PIN;
|
||||
static const uint8_t SCK = BOARD_SPI1_SCK_PIN;
|
||||
|
||||
#endif /* _VARIANT_ARDUINO_STM32_ */
|
|
@ -10,4 +10,11 @@
|
|||
#define portClearRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->BRR) )
|
||||
|
||||
#define portConfigRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->CRL) )
|
||||
|
||||
static const uint8_t SS = BOARD_SPI1_NSS_PIN;
|
||||
static const uint8_t SS1 = BOARD_SPI2_NSS_PIN;
|
||||
static const uint8_t MOSI = BOARD_SPI1_MOSI_PIN;
|
||||
static const uint8_t MISO = BOARD_SPI1_MISO_PIN;
|
||||
static const uint8_t SCK = BOARD_SPI1_SCK_PIN;
|
||||
|
||||
#endif /* _VARIANT_ARDUINO_STM32_ */
|
|
@ -11,4 +11,10 @@
|
|||
|
||||
#define portConfigRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->CRL) )
|
||||
|
||||
static const uint8_t SS = BOARD_SPI1_NSS_PIN;
|
||||
static const uint8_t SS1 = BOARD_SPI2_NSS_PIN;
|
||||
static const uint8_t MOSI = BOARD_SPI1_MOSI_PIN;
|
||||
static const uint8_t MISO = BOARD_SPI1_MISO_PIN;
|
||||
static const uint8_t SCK = BOARD_SPI1_SCK_PIN;
|
||||
|
||||
#endif /* _VARIANT_ARDUINO_STM32_ */
|
|
@ -11,4 +11,10 @@
|
|||
|
||||
#define portConfigRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->CRL) )
|
||||
|
||||
static const uint8_t SS = BOARD_SPI1_NSS_PIN;
|
||||
|
||||
static const uint8_t MOSI = BOARD_SPI1_MOSI_PIN;
|
||||
static const uint8_t MISO = BOARD_SPI1_MISO_PIN;
|
||||
static const uint8_t SCK = BOARD_SPI1_SCK_PIN;
|
||||
|
||||
#endif /* _VARIANT_ARDUINO_STM32_ */
|
|
@ -10,4 +10,11 @@
|
|||
#define portClearRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->BRR) )
|
||||
|
||||
#define portConfigRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->CRL) )
|
||||
|
||||
static const uint8_t SS = BOARD_SPI1_NSS_PIN;
|
||||
static const uint8_t SS1 = BOARD_SPI2_NSS_PIN;
|
||||
static const uint8_t MOSI = BOARD_SPI1_MOSI_PIN;
|
||||
static const uint8_t MISO = BOARD_SPI1_MISO_PIN;
|
||||
static const uint8_t SCK = BOARD_SPI1_SCK_PIN;
|
||||
|
||||
#endif /* _VARIANT_ARDUINO_STM32_ */
|
|
@ -10,4 +10,11 @@
|
|||
#define portClearRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->BRR) )
|
||||
|
||||
#define portConfigRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->CRL) )
|
||||
|
||||
static const uint8_t SS = BOARD_SPI1_NSS_PIN;
|
||||
static const uint8_t SS1 = BOARD_SPI2_NSS_PIN;
|
||||
static const uint8_t MOSI = BOARD_SPI1_MOSI_PIN;
|
||||
static const uint8_t MISO = BOARD_SPI1_MISO_PIN;
|
||||
static const uint8_t SCK = BOARD_SPI1_SCK_PIN;
|
||||
|
||||
#endif /* _VARIANT_ARDUINO_STM32_ */
|
|
@ -10,4 +10,11 @@
|
|||
#define portClearRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->BRR) )
|
||||
|
||||
#define portConfigRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->CRL) )
|
||||
|
||||
static const uint8_t SS = BOARD_SPI1_NSS_PIN;
|
||||
static const uint8_t SS1 = BOARD_SPI2_NSS_PIN;
|
||||
static const uint8_t MOSI = BOARD_SPI1_MOSI_PIN;
|
||||
static const uint8_t MISO = BOARD_SPI1_MISO_PIN;
|
||||
static const uint8_t SCK = BOARD_SPI1_SCK_PIN;
|
||||
|
||||
#endif /* _VARIANT_ARDUINO_STM32_ */
|
|
@ -11,4 +11,10 @@
|
|||
|
||||
#define portConfigRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->CRL) )
|
||||
|
||||
static const uint8_t SS = BOARD_SPI1_NSS_PIN;
|
||||
static const uint8_t SS1 = BOARD_SPI2_NSS_PIN;
|
||||
static const uint8_t MOSI = BOARD_SPI1_MOSI_PIN;
|
||||
static const uint8_t MISO = BOARD_SPI1_MISO_PIN;
|
||||
static const uint8_t SCK = BOARD_SPI1_SCK_PIN;
|
||||
|
||||
#endif /* _VARIANT_ARDUINO_STM32_ */
|
|
@ -10,4 +10,11 @@
|
|||
#define portClearRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->BRR) )
|
||||
|
||||
#define portConfigRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->CRL) )
|
||||
|
||||
static const uint8_t SS = BOARD_SPI1_NSS_PIN;
|
||||
static const uint8_t SS1 = BOARD_SPI2_NSS_PIN;
|
||||
static const uint8_t MOSI = BOARD_SPI1_MOSI_PIN;
|
||||
static const uint8_t MISO = BOARD_SPI1_MISO_PIN;
|
||||
static const uint8_t SCK = BOARD_SPI1_SCK_PIN;
|
||||
|
||||
#endif /* _VARIANT_ARDUINO_STM32_ */
|
|
@ -11,4 +11,10 @@
|
|||
|
||||
#define portConfigRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->CRL) )
|
||||
|
||||
static const uint8_t SS = BOARD_SPI1_NSS_PIN;
|
||||
|
||||
static const uint8_t MOSI = BOARD_SPI1_MOSI_PIN;
|
||||
static const uint8_t MISO = BOARD_SPI1_MISO_PIN;
|
||||
static const uint8_t SCK = BOARD_SPI1_SCK_PIN;
|
||||
|
||||
#endif /* _VARIANT_ARDUINO_STM32_ */
|
|
@ -11,4 +11,10 @@
|
|||
|
||||
#define portConfigRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->CRL) )
|
||||
|
||||
static const uint8_t SS = BOARD_SPI1_NSS_PIN;
|
||||
static const uint8_t SS1 = BOARD_SPI2_NSS_PIN;
|
||||
static const uint8_t MOSI = BOARD_SPI1_MOSI_PIN;
|
||||
static const uint8_t MISO = BOARD_SPI1_MISO_PIN;
|
||||
static const uint8_t SCK = BOARD_SPI1_SCK_PIN;
|
||||
|
||||
#endif /* _VARIANT_ARDUINO_STM32_ */
|
Loading…
Reference in New Issue