RTEMS  5.0.0
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 
67 
68 
69 /*----------------------------------------------------------------------------
70  * Global Functions
71  *----------------------------------------------------------------------------*/
72 extern void PIO_CaptureDisableIt(uint32_t itToDisable);
73 extern void PIO_CaptureEnableIt(uint32_t itToEnable);
74 extern void PIO_CaptureEnable(void);
75 extern void PIO_CaptureDisable(void);
76 extern void PIO_CaptureInit(SpioCaptureInit *pInit);
77 
78 #endif /* #ifndef PIO_CAPTURE_H */
79 
void PIO_CaptureEnableIt(uint32_t itToEnable)
Enable Interrupt of the PIO Capture.
Definition: pio_capture.c:178
uint16_t dPDCsize
Definition: pio_capture.h:46
uint32_t * pData
Definition: pio_capture.h:48
void * pParam
Definition: pio_capture.h:64
PIO Parallel Capture structure for initialize.
Definition: pio_capture.h:41
void(* CbkOverrun)(struct _SpioCaptureInit *)
Definition: pio_capture.h:58
uint8_t halfSampling
Definition: pio_capture.h:52
void PIO_CaptureDisableIt(uint32_t itToDisable)
Disable Interrupt of the PIO Capture.
Definition: pio_capture.c:166
uint8_t alwaysSampling
Definition: pio_capture.h:50
void PIO_CaptureInit(SpioCaptureInit *pInit)
Initialize the PIO Capture.
Definition: pio_capture.c:232
uint8_t dsize
Definition: pio_capture.h:44
void PIO_CaptureEnable(void)
Enable the PIO Capture.
Definition: pio_capture.c:189
void(* CbkDataReady)(struct _SpioCaptureInit *)
Definition: pio_capture.h:56
void(* CbkBuffFull)(struct _SpioCaptureInit *)
Definition: pio_capture.h:62
uint8_t modeFirstSample
Definition: pio_capture.h:54
void PIO_CaptureDisable(void)
Disable the PIO Capture.
Definition: pio_capture.c:206
void(* CbkEndReception)(struct _SpioCaptureInit *)
Definition: pio_capture.h:60