mirror of
https://github.com/YuzuZensai/MCUFRIEND_kbv.git
synced 2026-01-31 14:57:48 +00:00
add STM32H743 timing untested
This commit is contained in:
@@ -407,6 +407,7 @@ void write_8(uint8_t x)
|
|||||||
#define IS_NUCLEO144 ( defined(ARDUINO_NUCLEO_F207ZG) \
|
#define IS_NUCLEO144 ( defined(ARDUINO_NUCLEO_F207ZG) \
|
||||||
|| defined(ARDUINO_NUCLEO_F429ZI) || defined(ARDUINO_NUCLEO_F767ZI) \
|
|| defined(ARDUINO_NUCLEO_F429ZI) || defined(ARDUINO_NUCLEO_F767ZI) \
|
||||||
|| defined(ARDUINO_NUCLEO_L496ZG) || defined(ARDUINO_NUCLEO_L496ZG_P) \
|
|| defined(ARDUINO_NUCLEO_L496ZG) || defined(ARDUINO_NUCLEO_L496ZG_P) \
|
||||||
|
|| defined(ARDUINO_NUCLEO_H743ZI) \
|
||||||
)
|
)
|
||||||
// F1xx, F4xx, L4xx have different registers and styles. General Macros
|
// F1xx, F4xx, L4xx have different registers and styles. General Macros
|
||||||
#if defined(__STM32F1__) //weird Maple Core
|
#if defined(__STM32F1__) //weird Maple Core
|
||||||
@@ -511,6 +512,14 @@ void write_8(uint8_t x)
|
|||||||
#define GPIO_INIT() { RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN | RCC_AHB1ENR_GPIOCEN | RCC_AHB1ENR_GPIODEN | RCC_AHB1ENR_GPIOEEN | RCC_AHB1ENR_GPIOFEN; }
|
#define GPIO_INIT() { RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN | RCC_AHB1ENR_GPIOCEN | RCC_AHB1ENR_GPIODEN | RCC_AHB1ENR_GPIOEEN | RCC_AHB1ENR_GPIOFEN; }
|
||||||
#define PIN_OUTPUT(port, pin) PIN_MODE2((port)->MODER, pin, 0x1)
|
#define PIN_OUTPUT(port, pin) PIN_MODE2((port)->MODER, pin, 0x1)
|
||||||
|
|
||||||
|
#elif defined(STM32H743xx) // thanks MagicianT
|
||||||
|
#warning STM32H743xx< DELAY macros untested yet
|
||||||
|
#define WRITE_DELAY { WR_ACTIVE8;WR_ACTIVE2; } //F_CPU=400MHz
|
||||||
|
#define IDLE_DELAY { WR_IDLE2;WR_IDLE; }
|
||||||
|
#define READ_DELAY { RD_ACTIVE16;RD_ACTIVE16;RD_ACTIVE4;}
|
||||||
|
#define GPIO_INIT() { RCC->AHB4ENR |= RCC_AHB4ENR_GPIOAEN | RCC_AHB4ENR_GPIOCEN | RCC_AHB4ENR_GPIODEN | RCC_AHB4ENR_GPIOEEN | RCC_AHB4ENR_GPIOFEN; }
|
||||||
|
#define PIN_OUTPUT(port, pin) PIN_MODE2((port)->MODER, pin, 0x1)
|
||||||
|
|
||||||
#elif defined(STM32L053xx)
|
#elif defined(STM32L053xx)
|
||||||
#define WRITE_DELAY { }
|
#define WRITE_DELAY { }
|
||||||
#define READ_DELAY { RD_ACTIVE; }
|
#define READ_DELAY { RD_ACTIVE; }
|
||||||
|
|||||||
Reference in New Issue
Block a user