X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstm32f103-nucleo%2Fao_pins.h;h=636960ffda658e491b073a9f2a9c793b17ed2925;hb=23fec388ebdf4230663324e1f0ebfbd79059e841;hp=6de5c9a9f4d3003601690eaf0de89fd554386d4e;hpb=09a3c086dae1cce43c843626a1c624b4e2ad8d04;p=fw%2Faltos diff --git a/src/stm32f103-nucleo/ao_pins.h b/src/stm32f103-nucleo/ao_pins.h index 6de5c9a9..636960ff 100644 --- a/src/stm32f103-nucleo/ao_pins.h +++ b/src/stm32f103-nucleo/ao_pins.h @@ -54,3 +54,26 @@ #define USE_SERIAL_2_STDIN 1 #define SERIAL_2_PA2_PA3 1 #define SERIAL_2_SPEED AO_SERIAL_SPEED_115200 + +#define HAS_SPI_1 1 +#define SPI_1_PA5_PA6_PA7 1 +#define SPI_1_MODE_OUTPUT STM_GPIO_CR_MODE_OUTPUT_10MHZ + +/* Chip Select. LCD pin 1. nucleo PA4 = A2 */ +#define AO_ST7565_CS_PORT (&stm_gpioa) /* pin 1 */ +#define AO_ST7565_CS_PIN 4 + +/* Reset. LCD pin 2. nucleo PA0 = A0 */ +#define AO_ST7565_RESET_PORT (&stm_gpioa) /* pin 2 */ +#define AO_ST7565_RESET_PIN 0 + +/* A0. LCD pin 3. nucleo PA1 = A1 */ +#define AO_ST7565_A0_PORT (&stm_gpioa) /* pin 3 */ +#define AO_ST7565_A0_PIN 1 + +/* SCLK. LCD DB6 pin 12. nucleo PA5 = D13 */ +/* MOSI. LCD DB7 pin 13. nucleo PA7 = D11 */ +#define AO_ST7565_SPI_BUS (AO_SPI_1_PA5_PA6_PA7 | AO_SPI_MODE_3) +#define AO_ST7565_WIDTH 128 +#define AO_ST7565_HEIGHT 64 +#define AO_ST7565_BIAS ST7565_LCD_BIAS_1_9