mirror of
https://github.com/YuzuZensai/MCUFRIEND_kbv.git
synced 2026-01-06 04:32:38 +00:00
MY_BLUEPILL wiring. STM Bluepill macro.
This commit is contained in:
@@ -813,13 +813,13 @@ static __attribute((always_inline)) void write_8(uint8_t val)
|
||||
#define PIN_HIGH(port, pin) PASTE(port, _PSOR) = (1<<(pin))
|
||||
#define PIN_OUTPUT(port, pin) PASTE(port, _PDDR) |= (1<<(pin))
|
||||
|
||||
#elif defined(USE_MY_BLUEPILL) && (defined(ARDUINO_GENERIC_STM32F103C) || defined(ARDUINO_NUCLEO_F103C8))
|
||||
#elif defined(USE_MY_BLUEPILL) && (defined(ARDUINO_GENERIC_STM32F103C) || defined(ARDUINO_BLUEPILL_F103C8))
|
||||
#warning Uno Shield on MY BLUEPILL
|
||||
|
||||
//LCD pins |D7 |D6 |D5 |D4 |D3 |D2 |D1 |D0 | |RD |WR |RS |CS |RST|
|
||||
//STM32 pin |PA11|PA10|PA9|PA8|PB7|PB6|PA10|PA9| |PB1|PB0|PA7|PA6|PA5|
|
||||
//LCD pins |D7 |D6 |D5 |D4 |D3 |D2 |D1 |D0 | |RD |WR |RS |CS |RST| |SD_SS|SD_DI|SD_DO|SD_SCK| |SDA|SCL|
|
||||
//STM32 pin |PA3 |PA2 |PA1|PA0|PB7|PB6|PA10|PA9| |PB1|PB0|PA7|PA6|PA5| |PB12 |PB15 |PB14 |PB13 | |PB9|PB8|
|
||||
|
||||
#if defined(ARDUINO_NUCLEO_F103C8) //regular CMSIS libraries
|
||||
#if defined(ARDUINO_BLUEPILL_F103C8) //regular CMSIS libraries
|
||||
#define REGS(x) x
|
||||
#define GPIO_INIT() { RCC->APB2ENR |= RCC_APB2ENR_IOPAEN | RCC_APB2ENR_IOPBEN | RCC_APB2ENR_IOPCEN | RCC_APB2ENR_IOPDEN | RCC_APB2ENR_AFIOEN; \
|
||||
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_1;}
|
||||
|
||||
Reference in New Issue
Block a user