Zephyr Project API
3.7.0
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 */
14
typedef
void (*
sam0_eic_callback_t
)(
uint32_t
pins,
void
*
data
);
15
19
enum
sam0_eic_trigger
{
20
/* Rising edge */
21
SAM0_EIC_RISING
,
22
/* Falling edge */
23
SAM0_EIC_FALLING
,
24
/* Both edges */
25
SAM0_EIC_BOTH
,
26
/* High level detection */
27
SAM0_EIC_HIGH
,
28
/* Low level detection */
29
SAM0_EIC_LOW
,
30
};
31
47
int
sam0_eic_acquire
(
int
port,
int
pin,
enum
sam0_eic_trigger
trigger,
48
bool
filter,
sam0_eic_callback_t
cb,
void
*
data
);
49
60
int
sam0_eic_release
(
int
port,
int
pin);
61
68
int
sam0_eic_enable_interrupt
(
int
port,
int
pin);
69
76
int
sam0_eic_disable_interrupt
(
int
port,
int
pin);
77
83
uint32_t
sam0_eic_interrupt_pending
(
int
port);
84
85
#endif
/* ZEPHYR_DRIVERS_INTERRUPT_CONTROLLER_INTC_SAM0_EIC_H_ */
types.h
sam0_eic_disable_interrupt
int sam0_eic_disable_interrupt(int port, int pin)
Disable the EIC interrupt for a specific port and pin combination.
sam0_eic_trigger
sam0_eic_trigger
EIC trigger condition.
Definition
sam0_eic.h:19
SAM0_EIC_RISING
@ SAM0_EIC_RISING
Definition
sam0_eic.h:21
SAM0_EIC_LOW
@ SAM0_EIC_LOW
Definition
sam0_eic.h:29
SAM0_EIC_HIGH
@ SAM0_EIC_HIGH
Definition
sam0_eic.h:27
SAM0_EIC_FALLING
@ SAM0_EIC_FALLING
Definition
sam0_eic.h:23
SAM0_EIC_BOTH
@ SAM0_EIC_BOTH
Definition
sam0_eic.h:25
sam0_eic_callback_t
void(* sam0_eic_callback_t)(uint32_t pins, void *data)
Definition
sam0_eic.h:14
sam0_eic_acquire
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.
sam0_eic_enable_interrupt
int sam0_eic_enable_interrupt(int port, int pin)
Enable the EIC interrupt for a specific port and pin combination.
sam0_eic_interrupt_pending
uint32_t sam0_eic_interrupt_pending(int port)
Test if there is an EIC interrupt pending for a port.
sam0_eic_release
int sam0_eic_release(int port, int pin)
Release the EIC interrupt for a specific port and pin combination.
uint32_t
__UINT32_TYPE__ uint32_t
Definition
stdint.h:90
data
static fdata_t data[2]
Definition
test_fifo_contexts.c:15
include
zephyr
drivers
interrupt_controller
sam0_eic.h
Generated on Sun Sep 15 2024 17:01:30 for Zephyr Project API by
1.9.8