SAMV71 Xplained Ultra Software Package 1.4

pio_it.h File Reference

#include "pio.h"

Go to the source code of this file.

Functions

void PIO_InitializeInterrupts (uint32_t dwPriority)
 Initializes the PIO interrupt management logic.
void PIO_ConfigureIt (const Pin *pPin, void(*handler)(const Pin *))
void PIO_EnableIt (const Pin *pPin)
void PIO_DisableIt (const Pin *pPin)
void PIO_IT_InterruptHandler (void)
void PioInterruptHandler (uint32_t id, Pio *pPio)
 Handles all interrupts on the given PIO controller.
void PIO_CaptureHandler (void)
 The PIO_CaptureHandler must be called by the PIO Capture Interrupt Service Routine with the corresponding PIO Capture instance.

Detailed Description

Purpose

Configuration and handling of interrupts on PIO status changes. The API provided here have several advantages over the traditional PIO interrupt configuration approach:

However, it also has several minor drawbacks that may prevent from using it in particular applications:

Usage
  1. Initialize the PIO interrupt mechanism using PIO_InitializeInterrupts() with the desired priority (0 ... 7).
  2. Configure a status change interrupt on one or more pin(s) with PIO_ConfigureIt().
  3. Enable & disable interrupts on pins using PIO_EnableIt() and PIO_DisableIt().

Definition in file pio_it.h.


Function Documentation

void PIO_ConfigureIt ( const Pin pPin,
void(*)(const Pin *)  handler 
)

Configures a PIO or a group of PIO to generate an interrupt on status change. The provided interrupt handler will be called with the triggering pin as its parameter (enabling different pin instances to share the same handler).

Parameters:
pPin Pointer to a Pin instance.
handler Interrupt handler function pointer.

Definition at line 241 of file pio_it.c.

Here is the call graph for this function:

void PIO_DisableIt ( const Pin pPin  ) 

Disables a given interrupt source, with no added side effects.

Parameters:
pPin Interrupt source to disable.

Definition at line 319 of file pio_it.c.

Here is the call graph for this function:

void PIO_EnableIt ( const Pin pPin  ) 

Enables the given interrupt source if it has been configured. The status register of the corresponding PIO controller is cleared prior to enabling the interrupt.

Parameters:
pPin Interrupt source to enable.

Definition at line 290 of file pio_it.c.

Here is the call graph for this function:

void PIO_InitializeInterrupts ( uint32_t  dwPriority  ) 

Initializes the PIO interrupt management logic.

The desired priority of PIO interrupts must be provided. Calling this function multiple times result in the reset of currently configured interrupts.

Parameters:
priority PIO controller interrupts priority.

Definition at line 179 of file pio_it.c.

Here is the call graph for this function:

void PioInterruptHandler ( uint32_t  id,
Pio pPio 
)

Handles all interrupts on the given PIO controller.

Parameters:
id PIO controller ID.
pPio PIO controller base address.

Definition at line 87 of file pio_it.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines