Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
sam0_eic.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Derek Hageman <hageman@inthat.cloud>
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7
8#ifndef ZEPHYR_DRIVERS_INTERRUPT_CONTROLLER_INTC_SAM0_EIC_H_
9#define ZEPHYR_DRIVERS_INTERRUPT_CONTROLLER_INTC_SAM0_EIC_H_
10
11#include <zephyr/types.h>
12
13/* callback for EIC interrupt */
14typedef void (*sam0_eic_callback_t)(uint32_t pins, void *data);
15
20 /* Rising edge */
22 /* Falling edge */
24 /* Both edges */
26 /* High level detection */
28 /* Low level detection */
30};
31
47int sam0_eic_acquire(int port, int pin, enum sam0_eic_trigger trigger,
48 bool filter, sam0_eic_callback_t cb, void *data);
49
60int sam0_eic_release(int port, int pin);
61
68int sam0_eic_enable_interrupt(int port, int pin);
69
76int sam0_eic_disable_interrupt(int port, int pin);
77
84
85#endif /* ZEPHYR_DRIVERS_INTERRUPT_CONTROLLER_INTC_SAM0_EIC_H_ */
int sam0_eic_disable_interrupt(int port, int pin)
Disable the EIC interrupt for a specific port and pin combination.
sam0_eic_trigger
EIC trigger condition.
Definition sam0_eic.h:19
@ SAM0_EIC_RISING
Definition sam0_eic.h:21
@ SAM0_EIC_LOW
Definition sam0_eic.h:29
@ SAM0_EIC_HIGH
Definition sam0_eic.h:27
@ SAM0_EIC_FALLING
Definition sam0_eic.h:23
@ SAM0_EIC_BOTH
Definition sam0_eic.h:25
void(* sam0_eic_callback_t)(uint32_t pins, void *data)
Definition sam0_eic.h:14
int sam0_eic_acquire(int port, int pin, enum sam0_eic_trigger trigger, bool filter, sam0_eic_callback_t cb, void *data)
Acquire an EIC interrupt for specific port and pin combination.
int sam0_eic_enable_interrupt(int port, int pin)
Enable the EIC interrupt for a specific port and pin combination.
uint32_t sam0_eic_interrupt_pending(int port)
Test if there is an EIC interrupt pending for a port.
int sam0_eic_release(int port, int pin)
Release the EIC interrupt for a specific port and pin combination.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90