libpynq (release 5EWC0-2023 version 0.2.6 of 2023-10-24 17:28)
Loading...
Searching...
No Matches
interrupt.h
Go to the documentation of this file.
1/*
2Copyright (c) 2023 Eindhoven University of Technology
3
4Permission is hereby granted, free of charge, to any person obtaining a copy
5of this software and associated documentation files (the "Software"), to deal
6in the Software without restriction, including without limitation the rights
7to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8copies of the Software, and to permit persons to whom the Software is
9furnished to do so, subject to the following conditions:
10
11The above copyright notice and this permission notice shall be included in all
12copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20SOFTWARE.
21*/
22#ifndef INTERRUPT_H
23#define INTERRUPT_H
24
25#include <gpio.h>
26
72extern int gpio_interrupt_init(void);
73
79extern void gpio_ack_interrupt(void);
80
89extern void verify_interrupt_request(const io_t pin);
90
94extern void gpio_print_interrupt(void);
95
101extern void gpio_enable_interrupt(const io_t pin);
102
109extern void gpio_disable_interrupt(const io_t pin);
110
114extern void gpio_disable_all_interrupts(void);
115
121extern uint64_t gpio_get_interrupt(void);
122
129extern uint8_t *gpio_get_interrupt_pins(uint8_t *positions);
130
137extern void gpio_wait_for_interrupt(const io_t pin);
138
142#endif
void gpio_disable_all_interrupts(void)
Disables all interrupts from being raised.
Definition interrupt.c:77
uint8_t * gpio_get_interrupt_pins(uint8_t *positions)
Gets all pins on which an interrupt occurred.
Definition interrupt.c:160
int gpio_interrupt_init(void)
Enables interrupts to be set and read.
Definition interrupt.c:48
uint64_t gpio_get_interrupt(void)
Definition interrupt.c:83
void gpio_wait_for_interrupt(const io_t pin)
Waits untill an interrupt occurs on the specified pin or if the value of pin is larger than 63,...
Definition interrupt.c:138
void gpio_print_interrupt(void)
prints the current interrupt word
Definition interrupt.c:117
void verify_interrupt_request(const io_t pin)
Checks for error in enabled pin. Terminates the process if the pin is not enabled.
Definition interrupt.c:96
void gpio_enable_interrupt(const io_t pin)
enables a specific pin to raise interrupts.
Definition interrupt.c:59
void gpio_ack_interrupt(void)
acknowledges the raised interrupts and resets the interrupt word. Allows new interrupts to occur on t...
Definition interrupt.c:91
void gpio_disable_interrupt(const io_t pin)
Disables interrupts from occuring on the specific pin. Hereafter, the pin will not trigger an interru...
Definition interrupt.c:72
io_t
Definition pinmap.h:45