Defined SPIn_NSS_PINs in target.h files

This commit is contained in:
Martin Budden 2016-07-08 23:23:20 +01:00
parent 91b92f54cf
commit 5d45a2fc42
3 changed files with 26 additions and 20 deletions

View File

@ -32,11 +32,6 @@
#define BEEPER_INVERTED
#define USE_EXTI
#define MPU6500_CS_PIN PA4
#define MPU6500_SPI_INSTANCE SPI1
#define MPU6000_CS_PIN PA4
#define MPU6000_SPI_INSTANCE SPI1
#define USE_SPI
#define USE_SPI_DEVICE_1
@ -44,6 +39,13 @@
#define SPI1_SCK_PIN PB3
#define SPI1_MISO_PIN PB4
#define SPI1_MOSI_PIN PB5
#define SPI1_NSS_PIN PA4
#define MPU6500_CS_PIN SPI1_NSS_PIN
#define MPU6500_SPI_INSTANCE SPI1
#define MPU6000_CS_PIN SPI1_NSS_PIN
#define MPU6000_SPI_INSTANCE SPI1
#define USABLE_TIMER_CHANNEL_COUNT 11

View File

@ -33,14 +33,6 @@
#define BEEPER PB2
#define BEEPER_INVERTED
// tqfp48 pin 3
#define MPU6500_CS_PIN PC14
#define MPU6500_SPI_INSTANCE SPI1
// tqfp48 pin 25
#define BMP280_CS_PIN PB12
#define BMP280_SPI_INSTANCE SPI2
#define USE_SPI
#define USE_SPI_DEVICE_1
#define USE_SPI_DEVICE_2
@ -51,18 +43,31 @@
#define SPI1_MISO_PIN PB4
// tqfp48 pin 41
#define SPI1_MOSI_PIN PB5
// tqfp48 pin 3
#define SPI1_NSS_PIN PC14
// tqfp48 pin 26
#define SPI2_SCK_PIN PB13
// tqfp48 pin 27
#define SPI2_MISO_PIN PB14
// tqfp48 pin 28
#define SPI2_MOSI_PIN PB15
// tqfp48 pin 25
#define SPI2_NSS_PIN PB12
// tqfp48 pin 3
#define MPU6500_CS_PIN SPI1_NSS_PIN
#define MPU6500_SPI_INSTANCE SPI1
// tqfp48 pin 25
#define BMP280_CS_PIN SPI2_NSS_PIN
#define BMP280_SPI_INSTANCE SPI2
#define USE_FLASHFS
#define USE_FLASH_M25P16
#define M25P16_SPI_SHARED
#define M25P16_CS_PIN PC15
#define M25P16_SPI_INSTANCE SPI2
#define M25P16_CS_PIN PC15
#define M25P16_SPI_INSTANCE SPI2
// timer definitions in drivers/timer.c
// channel mapping in drivers/pwm_mapping.c

View File

@ -29,17 +29,16 @@
#define BEEPER PB13
#define BEEPER_INVERTED
#define MPU6500_CS_GPIO_CLK_PERIPHERAL RCC_AHBPeriph_GPIOA
#define MPU6500_CS_GPIO GPIOA
#define MPU6500_CS_PIN PA4
#define MPU6500_SPI_INSTANCE SPI1
#define USE_SPI
#define USE_SPI_DEVICE_1
#define SPI1_SCK_PIN PB3
#define SPI1_MISO_PIN PB4
#define SPI1_MOSI_PIN PB5
#define SPI1_NSS_PIN PA4
#define MPU6500_CS_PIN SPI1_NSS_PIN
#define MPU6500_SPI_INSTANCE SPI1
#define USABLE_TIMER_CHANNEL_COUNT 11