Hardware SPI used for the Taranis+ LCD. Thanks Mike!

This commit is contained in:
bsongis
2014-07-05 19:03:11 +02:00
parent 8200164797
commit 9337080307
7 changed files with 183 additions and 80 deletions
+9 -4
View File
@@ -184,16 +184,19 @@
#define GPIOTRNDET GPIOA
#define PIN_TRNDET GPIO_Pin_8
// TODO merge these constants
#define PIN_PORTA 0x0000
#define PIN_PORTB 0x0100
#define PIN_PORTC 0x0200
#define PIN_PORTD 0x0300
#define PIN_PER_1 0x0010
#define PIN_PER_2 0x0020
#define PIN_PORTA 0x0000
#define PIN_PER_3 0x0030
#define PIN_PER_5 0x0050
#define PIN_PER_6 0x0060
// #define PIN_OS2 0x0000
#define PIN_OS25 0x2000
// #define PIN_OS50 0x4000
// #define PIN_OS100 0x6000
#define PIN_OS50 0x4000
#define PIN_OS100 0x6000
// Cppm
#define RCC_AHB1Periph_GPIO_INTPPM RCC_AHB1Periph_GPIOA
@@ -258,6 +261,8 @@
// LCD
#if defined(REVPLUS)
#define RCC_AHB1Periph_LCD (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOD)
#define RCC_AHB1Periph_LCD_RST RCC_AHB1Periph_GPIOD
#define RCC_AHB1Periph_LCD_NCS RCC_AHB1Periph_GPIOA
#define GPIO_LCD_SPI GPIOC
#define GPIO_LCD_NCS GPIOA
#define GPIO_LCD_RST GPIOD