Skip to content

Commit 044f68d

Browse files
committed
switch to mode 3 for LCD
1 parent 9a5cd9e commit 044f68d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/stm32f103-nucleo/ao_pins.h

+9-1
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,21 @@
5959
#define SPI_1_PA5_PA6_PA7 1
6060
#define SPI_1_MODE_OUTPUT STM_GPIO_CR_MODE_OUTPUT_10MHZ
6161

62+
/* Chip Select. LCD pin 1. nucleo PA4 = A2 */
6263
#define AO_ST7565_CS_PORT (&stm_gpioa) /* pin 1 */
6364
#define AO_ST7565_CS_PIN 4
65+
66+
/* Reset. LCD pin 2. nucleo PA0 = A0 */
6467
#define AO_ST7565_RESET_PORT (&stm_gpioa) /* pin 2 */
6568
#define AO_ST7565_RESET_PIN 0
69+
70+
/* A0. LCD pin 3. nucleo PA1 = A1 */
6671
#define AO_ST7565_A0_PORT (&stm_gpioa) /* pin 3 */
6772
#define AO_ST7565_A0_PIN 1
68-
#define AO_ST7565_SPI_BUS AO_SPI_1_PA5_PA6_PA7
73+
74+
/* SCLK. LCD DB6 pin 12. nucleo PA5 = D13 */
75+
/* MOSI. LCD DB7 pin 13. nucleo PA7 = D11 */
76+
#define AO_ST7565_SPI_BUS (AO_SPI_1_PA5_PA6_PA7 | AO_SPI_MODE_3)
6977
#define AO_ST7565_WIDTH 128
7078
#define AO_ST7565_HEIGHT 64
7179
#define AO_ST7565_BIAS ST7565_LCD_BIAS_1_9

0 commit comments

Comments
 (0)