teensy: Update GPIO speed consts to align with changes in stm32 port.

crypto-aes
Damien George 5 years ago
parent fa13e0d35b
commit e6235fe647

@ -52,7 +52,7 @@ void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
*port_pcr |= PORT_PCR_DSE;
/* Configure the IO Speed */
if (GPIO_Init->Speed > GPIO_SPEED_MEDIUM) {
if (GPIO_Init->Speed > GPIO_SPEED_FREQ_MEDIUM) {
*port_pcr &= ~PORT_PCR_SRE;
} else {
*port_pcr |= PORT_PCR_SRE;

@ -33,7 +33,7 @@ void led_init(void) {
GPIO_InitTypeDef GPIO_InitStructure;
/* Configure I/O speed, mode, output type and pull */
GPIO_InitStructure.Speed = GPIO_SPEED_LOW;
GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStructure.Mode = MICROPY_HW_LED_OTYPE;
GPIO_InitStructure.Pull = GPIO_NOPULL;

@ -74,10 +74,10 @@ typedef struct {
#define IS_GPIO_PULL(PULL) (((PULL) == GPIO_NOPULL) || ((PULL) == GPIO_PULLUP) || \
((PULL) == GPIO_PULLDOWN))
#define GPIO_SPEED_LOW ((uint32_t)0)
#define GPIO_SPEED_MEDIUM ((uint32_t)1)
#define GPIO_SPEED_FAST ((uint32_t)2)
#define GPIO_SPEED_HIGH ((uint32_t)3)
#define GPIO_SPEED_FREQ_LOW ((uint32_t)0)
#define GPIO_SPEED_FREQ_MEDIUM ((uint32_t)1)
#define GPIO_SPEED_FREQ_HIGH ((uint32_t)2)
#define GPIO_SPEED_FREQ_VERY_HIGH ((uint32_t)3)
#define IS_GPIO_AF(af) ((af) >= 0 && (af) <= 7)

Loading…
Cancel
Save