stm32/cyw43_configport: Provide cyw43_hal_pin_config_irq_falling func.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
41a2415e08
commit
a14e79bcfb
@ -32,6 +32,7 @@
|
|||||||
#include "py/mperrno.h"
|
#include "py/mperrno.h"
|
||||||
#include "py/mphal.h"
|
#include "py/mphal.h"
|
||||||
#include "extmod/modnetwork.h"
|
#include "extmod/modnetwork.h"
|
||||||
|
#include "extint.h"
|
||||||
#include "pendsv.h"
|
#include "pendsv.h"
|
||||||
#include "sdio.h"
|
#include "sdio.h"
|
||||||
|
|
||||||
@ -115,6 +116,12 @@ static inline void cyw43_delay_ms(uint32_t ms) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void cyw43_hal_pin_config_irq_falling(cyw43_hal_pin_obj_t pin, int enable) {
|
||||||
|
if (enable) {
|
||||||
|
extint_set(pin, GPIO_MODE_IT_FALLING);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static inline void cyw43_sdio_init(void) {
|
static inline void cyw43_sdio_init(void) {
|
||||||
sdio_init(NVIC_EncodePriority(NVIC_PRIORITYGROUP_4, 14, 0));
|
sdio_init(NVIC_EncodePriority(NVIC_PRIORITYGROUP_4, 14, 0));
|
||||||
}
|
}
|
||||||
|
@ -66,6 +66,7 @@ void extint_init0(void);
|
|||||||
|
|
||||||
uint extint_register(mp_obj_t pin_obj, uint32_t mode, uint32_t pull, mp_obj_t callback_obj, bool override_callback_obj);
|
uint extint_register(mp_obj_t pin_obj, uint32_t mode, uint32_t pull, mp_obj_t callback_obj, bool override_callback_obj);
|
||||||
void extint_register_pin(const pin_obj_t *pin, uint32_t mode, bool hard_irq, mp_obj_t callback_obj);
|
void extint_register_pin(const pin_obj_t *pin, uint32_t mode, bool hard_irq, mp_obj_t callback_obj);
|
||||||
|
void extint_set(const pin_obj_t *pin, uint32_t mode);
|
||||||
|
|
||||||
void extint_enable(uint line);
|
void extint_enable(uint line);
|
||||||
void extint_disable(uint line);
|
void extint_disable(uint line);
|
||||||
|
Loading…
Reference in New Issue
Block a user