RTEMS: bsps/arm/atsam/include/libchip/include/pio_capture.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
pio_capture.h
1/* ---------------------------------------------------------------------------- */
2/* Atmel Microcontroller Software Support */
3/* SAM Software Package License */
4/* ---------------------------------------------------------------------------- */
5/* Copyright (c) 2015, Atmel Corporation */
6/* */
7/* All rights reserved. */
8/* */
9/* Redistribution and use in source and binary forms, with or without */
10/* modification, are permitted provided that the following condition is met: */
11/* */
12/* - Redistributions of source code must retain the above copyright notice, */
13/* this list of conditions and the disclaimer below. */
14/* */
15/* Atmel's name may not be used to endorse or promote products derived from */
16/* this software without specific prior written permission. */
17/* */
18/* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR */
19/* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
20/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE */
21/* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, */
22/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
23/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */
24/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
25/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
26/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */
27/* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
28/* ---------------------------------------------------------------------------- */
29
30#ifndef PIO_CAPTURE_H
31#define PIO_CAPTURE_H
32
33/*----------------------------------------------------------------------------
34 * Types
35 *----------------------------------------------------------------------------*/
36
41 typedef struct _SpioCaptureInit {
42
44 uint8_t dsize;
46 uint16_t dPDCsize;
48 uint32_t *pData;
50 uint8_t alwaysSampling;
52 uint8_t halfSampling;
54 uint8_t modeFirstSample;
56 void (*CbkDataReady)(struct _SpioCaptureInit *);
58 void (*CbkOverrun)(struct _SpioCaptureInit *);
60 void (*CbkEndReception)(struct _SpioCaptureInit *);
62 void (*CbkBuffFull)(struct _SpioCaptureInit *);
64 void *pParam;
65
66} SpioCaptureInit;
67
68
69/*----------------------------------------------------------------------------
70 * Global Functions
71 *----------------------------------------------------------------------------*/
72extern void PIO_CaptureDisableIt(uint32_t itToDisable);
73extern void PIO_CaptureEnableIt(uint32_t itToEnable);
74extern void PIO_CaptureEnable(void);
75extern void PIO_CaptureDisable(void);
76extern void PIO_CaptureInit(SpioCaptureInit *pInit);
77
78#endif /* #ifndef PIO_CAPTURE_H */
79
PIO_CaptureDisable
void PIO_CaptureDisable(void)
Disable the PIO Capture.
Definition: pio_capture.c:206
PIO_CaptureInit
void PIO_CaptureInit(SpioCaptureInit *pInit)
Initialize the PIO Capture.
Definition: pio_capture.c:232
PIO_CaptureEnableIt
void PIO_CaptureEnableIt(uint32_t itToEnable)
Enable Interrupt of the PIO Capture.
Definition: pio_capture.c:178
PIO_CaptureEnable
void PIO_CaptureEnable(void)
Enable the PIO Capture.
Definition: pio_capture.c:189
PIO_CaptureDisableIt
void PIO_CaptureDisableIt(uint32_t itToDisable)
Disable Interrupt of the PIO Capture.
Definition: pio_capture.c:166
_SpioCaptureInit
PIO Parallel Capture structure for initialize.
Definition: pio_capture.h:41
_SpioCaptureInit::dPDCsize
uint16_t dPDCsize
Definition: pio_capture.h:46
_SpioCaptureInit::halfSampling
uint8_t halfSampling
Definition: pio_capture.h:52
_SpioCaptureInit::CbkOverrun
void(* CbkOverrun)(struct _SpioCaptureInit *)
Definition: pio_capture.h:58
_SpioCaptureInit::pData
uint32_t * pData
Definition: pio_capture.h:48
_SpioCaptureInit::CbkBuffFull
void(* CbkBuffFull)(struct _SpioCaptureInit *)
Definition: pio_capture.h:62
_SpioCaptureInit::pParam
void * pParam
Definition: pio_capture.h:64
_SpioCaptureInit::CbkEndReception
void(* CbkEndReception)(struct _SpioCaptureInit *)
Definition: pio_capture.h:60
_SpioCaptureInit::dsize
uint8_t dsize
Definition: pio_capture.h:44
_SpioCaptureInit::alwaysSampling
uint8_t alwaysSampling
Definition: pio_capture.h:50
_SpioCaptureInit::modeFirstSample
uint8_t modeFirstSample
Definition: pio_capture.h:54
_SpioCaptureInit::CbkDataReady
void(* CbkDataReady)(struct _SpioCaptureInit *)
Definition: pio_capture.h:56