Zephyr API Documentation  3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
sam0_eic.h File Reference
#include <zephyr/types.h>

Go to the source code of this file.

Typedefs

typedef void(* sam0_eic_callback_t) (uint32_t pins, void *data)
 

Enumerations

enum  sam0_eic_trigger {
  SAM0_EIC_RISING , SAM0_EIC_FALLING , SAM0_EIC_BOTH , SAM0_EIC_HIGH ,
  SAM0_EIC_LOW
}
 EIC trigger condition. More...
 

Functions

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_release (int port, int pin)
 Release the EIC interrupt for a 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.
 
int sam0_eic_disable_interrupt (int port, int pin)
 Disable 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.
 

Typedef Documentation

◆ sam0_eic_callback_t

typedef void(* sam0_eic_callback_t) (uint32_t pins, void *data)

Enumeration Type Documentation

◆ sam0_eic_trigger

EIC trigger condition.

Enumerator
SAM0_EIC_RISING 
SAM0_EIC_FALLING 
SAM0_EIC_BOTH 
SAM0_EIC_HIGH 
SAM0_EIC_LOW 

Function Documentation

◆ 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.

This acquires the EIC interrupt for a specific port and pin combination, or returns an error if the required line is not available. Only a single callback per port is supported and supplying a different one will change it for all lines on that port.

Parameters
portport index (A=0, etc)
pinpin in the port
triggertrigger condition
filterenable filter
cbinterrupt callback
dataparameter to the interrupt callback

◆ sam0_eic_disable_interrupt()

int sam0_eic_disable_interrupt ( int  port,
int  pin 
)

Disable the EIC interrupt for a specific port and pin combination.

Parameters
portport index (A=0, etc)
pinpin in the port

◆ sam0_eic_enable_interrupt()

int sam0_eic_enable_interrupt ( int  port,
int  pin 
)

Enable the EIC interrupt for a specific port and pin combination.

Parameters
portport index (A=0, etc)
pinpin in the port

◆ sam0_eic_interrupt_pending()

uint32_t sam0_eic_interrupt_pending ( int  port)

Test if there is an EIC interrupt pending for a port.

Parameters
portport index (A=0, etc)

◆ sam0_eic_release()

int sam0_eic_release ( int  port,
int  pin 
)

Release the EIC interrupt for a specific port and pin combination.

Release the EIC configuration for a specific port and pin combination. No effect if that combination does not currently hold the associated EIC line.

Parameters
portport index (A=0, etc)
pinpin in the port