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