mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2026-01-28 01:47:21 +01:00
make gpio_acknowledge_irq inline
This commit is contained in:
parent
19904be31f
commit
3b5e275582
2 changed files with 4 additions and 6 deletions
|
|
@ -253,11 +253,6 @@ void gpio_set_dormant_irq_enabled(uint gpio, uint32_t events, bool enabled) {
|
|||
_gpio_set_irq_enabled(gpio, events, enabled, irq_ctrl_base);
|
||||
}
|
||||
|
||||
void gpio_acknowledge_irq(uint gpio, uint32_t events) {
|
||||
check_gpio_param(gpio);
|
||||
io_bank0_hw->intr[gpio / 8] = events << (4 * (gpio % 8));
|
||||
}
|
||||
|
||||
#define DEBUG_PIN_MASK (((1u << PICO_DEBUG_PIN_COUNT)-1) << PICO_DEBUG_PIN_BASE)
|
||||
void gpio_debug_pins_init(void) {
|
||||
gpio_init_mask(DEBUG_PIN_MASK);
|
||||
|
|
|
|||
|
|
@ -570,7 +570,10 @@ static inline uint32_t gpio_get_irq_event_mask(uint gpio) {
|
|||
* \note For callbacks set with \ref gpio_set_irq_enabled_with_callback, or \ref gpio_set_irq_callback, this function is called automatically.
|
||||
* \param event_mask Bitmask of events to clear. See \ref gpio_irq_level for details.
|
||||
*/
|
||||
void gpio_acknowledge_irq(uint gpio, uint32_t event_mask);
|
||||
static inline void gpio_acknowledge_irq(uint gpio, uint32_t event_mask) {
|
||||
check_gpio_param(gpio);
|
||||
io_bank0_hw->intr[gpio / 8] = event_mask << (4 * (gpio % 8));
|
||||
}
|
||||
|
||||
/*! \brief Adds a raw GPIO IRQ handler for the specified GPIOs on the current core
|
||||
* \ingroup hardware_gpio
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue