Closed legath closed 2 years ago
define ST7789_Select() asm("nop")
define ST7789_UnSelect() asm("nop")
You can just leave it blank, no asm("nop") is needed.
Also instead the //#define CFG_NO_CS, you can make it simpler:
// For displays without CS pin, comment next 2 lines:
define ST7789_CS_PORT ST7789_CS_GPIO_Port
define ST7789_CS_PIN ST7789_CS_Pin
Then:
if defined ST7789_CS_PORT && defined ST7789_CS_PORT
define ST7789_Select() HAL_GPIO_WritePin(ST7789_CS_PORT, ST7789_CS_PIN, GPIO_PIN_RESET)
define ST7789_UnSelect() HAL_GPIO_WritePin(ST7789_CS_PORT, ST7789_CS_PIN, GPIO_PIN_SET)
else
define ST7789_Select()
define ST7789_UnSelect()
endif
for aliexpress displays.