Loading...
Searching...
No Matches
gpio_ll_irq.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020 Gunar Schorcht
3 * 2021 Otto-von-Guericke-Universität Magdeburg
4 *
5 * This file is subject to the terms and conditions of the GNU Lesser
6 * General Public License v2.1. See the file LICENSE in the top level
7 * directory for more details.
8 */
9
45#ifndef PERIPH_GPIO_LL_IRQ_H
46#define PERIPH_GPIO_LL_IRQ_H
47
48#include <inttypes.h>
49#include <stdbool.h>
50#include <stdint.h>
51
52#include "periph/gpio_ll.h"
53
54#ifdef __cplusplus
55extern "C" {
56#endif
57
58#if !defined(HAVE_GPIO_IRQ_TRIG_T) || defined(DOXYGEN)
71#endif
72
78typedef void (*gpio_ll_cb_t)(void *arg);
79
99int gpio_ll_irq(gpio_port_t port, uint8_t pin, gpio_irq_trig_t trig,
100 gpio_ll_cb_t cb, void *arg);
101
114void gpio_ll_irq_mask(gpio_port_t port, uint8_t pin);
115
116#if MODULE_PERIPH_GPIO_LL_IRQ_UNMASK || defined(DOXYGEN)
133void gpio_ll_irq_unmask(gpio_port_t port, uint8_t pin);
134#endif
135
148
164void gpio_ll_irq_off(gpio_port_t port, uint8_t pin);
165
166#ifdef __cplusplus
167}
168#endif
169
170#endif /* PERIPH_GPIO_LL_IRQ_H */
Peripheral GPIO Low-Level API.
gpio_irq_trig_t
Definition of possible IRQ triggers.
Definition gpio_ll_irq.h:62
void gpio_ll_irq_unmask_and_clear(gpio_port_t port, uint8_t pin)
Unmask IRQs on the given GPIO pin and clear pending IRQs.
void gpio_ll_irq_mask(gpio_port_t port, uint8_t pin)
Mask IRQs on the given GPIO pin.
int gpio_ll_irq(gpio_port_t port, uint8_t pin, gpio_irq_trig_t trig, gpio_ll_cb_t cb, void *arg)
Set up an IRQ for the given GPIO pin and activate it.
void(* gpio_ll_cb_t)(void *arg)
Signature of event callback function that is called on IRQs.
Definition gpio_ll_irq.h:78
void gpio_ll_irq_unmask(gpio_port_t port, uint8_t pin)
Unmask IRQs on the given GPIO pin.
void gpio_ll_irq_off(gpio_port_t port, uint8_t pin)
Disable IRQs on the given GPIO pin.
@ GPIO_TRIGGER_EDGE_FALLING
edge triggered IRQ on falling flanks only
Definition gpio_ll_irq.h:63
@ GPIO_TRIGGER_LEVEL_HIGH
level triggered IRQ on high input
Definition gpio_ll_irq.h:68
@ GPIO_TRIGGER_EDGE_RISING
edge triggered IRQ on rising flanks only
Definition gpio_ll_irq.h:65
@ GPIO_TRIGGER_EDGE_BOTH
edge triggered IRQ on falling AND rising flanks
Definition gpio_ll_irq.h:66
@ GPIO_TRIGGER_LEVEL_LOW
level triggered IRQ on low input
Definition gpio_ll_irq.h:69
uintptr_t gpio_port_t
GPIO port type.
Definition gpio_ll.h:87
Adds include for missing inttype definitions.