Classes | Macros | Functions | Variables
pio_handler.c File Reference

Parallel Input/Output (PIO) interrupt handler for SAM. More...

#include "pio.h"
#include "pio_handler.h"
Include dependency graph for pio_handler.c:

Go to the source code of this file.

Classes

struct  s_interrupt_source
 

Macros

#define MAX_INTERRUPT_SOURCES   7
 

Functions

void pio_handler_process (Pio *p_pio, uint32_t ul_id)
 Process an interrupt request on the given PIO controller. More...
 
uint32_t pio_handler_set (Pio *p_pio, uint32_t ul_id, uint32_t ul_mask, uint32_t ul_attr, void(*p_handler)(uint32_t, uint32_t))
 Set an interrupt handler for the provided pins. The provided handler will be called with the triggering pin as its parameter as soon as an interrupt is detected. More...
 
void pio_handler_set_priority (Pio *p_pio, IRQn_Type ul_irqn, uint32_t ul_priority)
 Initialize PIO interrupt management logic. More...
 

Variables

static struct s_interrupt_source gs_interrupt_sources [MAX_INTERRUPT_SOURCES]
 
static uint32_t gs_ul_nb_sources = 0
 

Detailed Description

Parallel Input/Output (PIO) interrupt handler for SAM.

Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.

Definition in file pio_handler.c.

Macro Definition Documentation

◆ MAX_INTERRUPT_SOURCES

#define MAX_INTERRUPT_SOURCES   7

Maximum number of interrupt sources that can be defined. This constant can be increased, but the current value is the smallest possible one that will be compatible with all existing projects.

Definition at line 45 of file pio_handler.c.

Function Documentation

◆ pio_handler_process()

void pio_handler_process ( Pio p_pio,
uint32_t  ul_id 
)

Process an interrupt request on the given PIO controller.

Parameters
p_pioPIO controller base address.
ul_idPIO controller ID.

Definition at line 79 of file pio_handler.c.

◆ pio_handler_set()

uint32_t pio_handler_set ( Pio p_pio,
uint32_t  ul_id,
uint32_t  ul_mask,
uint32_t  ul_attr,
void(*)(uint32_t, uint32_t)  p_handler 
)

Set an interrupt handler for the provided pins. The provided handler will be called with the triggering pin as its parameter as soon as an interrupt is detected.

Parameters
p_pioPIO controller base address.
ul_idPIO ID.
ul_maskPins (bit mask) to configure.
ul_attrPins attribute to configure.
p_handlerInterrupt handler function pointer.
Returns
0 if successful, 1 if the maximum number of sources has been defined.

Definition at line 132 of file pio_handler.c.

◆ pio_handler_set_priority()

void pio_handler_set_priority ( Pio p_pio,
IRQn_Type  ul_irqn,
uint32_t  ul_priority 
)

Initialize PIO interrupt management logic.

Parameters
p_pioPIO controller base address.
ul_irqnNVIC line number.
ul_priorityPIO controller interrupts priority.

Definition at line 274 of file pio_handler.c.

Variable Documentation

◆ gs_interrupt_sources

struct s_interrupt_source gs_interrupt_sources[MAX_INTERRUPT_SOURCES]
static

Definition at line 62 of file pio_handler.c.

◆ gs_ul_nb_sources

uint32_t gs_ul_nb_sources = 0
static

Definition at line 65 of file pio_handler.c.



inertial_sense_ros
Author(s):
autogenerated on Sun Feb 28 2021 03:17:59