libpynq (release 5EWC0-2023 version 0.1.0 of 2023-08-14 14:01)
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
72int gpio_interrupt_init(void);
73
79void gpio_ack_interrupt(void);
80
90
94void gpio_print_interrupt(void);
95
102
110
115
121uint64_t gpio_get_interrupt(void);
122
129uint8_t *gpio_get_interrupt_pins(uint8_t *positions);
130
138
142#endif
uint8_t * gpio_get_interrupt_pins()
uint8_t gpio_t
Definition gpio.h:99
void gpio_disable_all_interrupts(void)
Disables all interrupts from being raised.
Definition interrupt.c:77
void gpio_enable_interrupt(const gpio_t pin)
enables a specific pin to raise interrupts.
Definition interrupt.c:59
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_disable_interrupt(const gpio_t pin)
Disables interrupts from occuring on the specific pin. Hereafter, the pin will not trigger an interru...
Definition interrupt.c:72
void gpio_print_interrupt(void)
prints the current interrupt word
Definition interrupt.c:121
void gpio_wait_for_interrupt(const gpio_t pin)
Waits untill an interrupt occurs on the specified pin or if the value of pin is larger than 63,...
Definition interrupt.c:142
void verify_interrupt_request(const gpio_t pin)
Checks for error in enabled pin. Terminates the process if the pin is not enabled.
Definition interrupt.c:100
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