Midnight Sun Firmware
Loading...
Searching...
No Matches
gpio_interrupts.h
1#pragma once
2
3/************************************************************************************************
4 * @file gpio_interrupts.h
5 *
6 * @brief GPIO Interrupts Library Header file
7 *
8 * @date 2024-11-05
9 * @author Midnight Sun Team #24 - MSXVI
10 ************************************************************************************************/
11
12/* Standard library Headers */
13
14/* Inter-component Headers */
15
16/* Intra-component Headers */
17#include "gpio.h"
18#include "interrupts.h"
19#include "notify.h"
20#include "status.h"
21#include "tasks.h"
22
32typedef struct GpioInterrupt {
35 Event event;
38
49StatusCode gpio_register_interrupt(const GpioAddress *address, const InterruptSettings *settings, const Event event, const Task *task);
50
58
66
74
82
90StatusCode gpio_it_mask_interrupt(const GpioAddress *address, bool masked);
91
99
StatusCode gpio_it_mask_interrupt(const GpioAddress *address, bool masked)
Masks the GPIO interrupt.
Definition: gpio_interrupts.c:67
InterruptClass gpio_it_get_class(const GpioAddress *address)
Gets the GPIO interrupt class.
Definition: gpio_interrupts.c:53
InterruptEdge gpio_it_get_edge(const GpioAddress *address)
Gets the GPIO interrupt edge.
Definition: gpio_interrupts.c:39
StatusCode gpio_register_interrupt(const GpioAddress *address, const InterruptSettings *settings, const Event event, const Task *task)
Register a GPIO interrupt by passing in the pin address and task to notify.
Definition: gpio_interrupts.c:20
InterruptPriority gpio_it_get_priority(const GpioAddress *address)
Gets the GPIO interrupt priority.
Definition: gpio_interrupts.c:46
StatusCode gpio_trigger_interrupt(const GpioAddress *address)
Software generated GPIO interrupt.
Definition: gpio_interrupts.c:74
Task * gpio_it_get_target_task(const GpioAddress *address)
Gets the GPIO interrupt task.
Definition: gpio_interrupts.c:60
InterruptClass
Interrupt class selection.
Definition: interrupts.h:32
InterruptEdge
Defines on what edge of an input signal the interrupt triggers on.
Definition: interrupts.h:58
InterruptPriority
Interrupt priority level selection.
Definition: interrupts.h:46
StatusCode
StatusCodes for various errors.
Definition: status.h:27
Port and pin data.
Definition: gpio.h:112
Storage class for GPIO interrupts.
Definition: gpio_interrupts.h:32
InterruptSettings settings
Definition: gpio_interrupts.h:33
GpioAddress address
Definition: gpio_interrupts.h:34
Event event
Definition: gpio_interrupts.h:35
Task * task
Definition: gpio_interrupts.h:36
Interrupt configuration structure.
Definition: interrupts.h:68
Definition: tasks.h:83