flexio_common.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 - 2016, Freescale Semiconductor, Inc.
3  * Copyright 2016 NXP
4  * All rights reserved.
5  *
6  * THIS SOFTWARE IS PROVIDED BY NXP "AS IS" AND ANY EXPRESSED OR
7  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
8  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
9  * IN NO EVENT SHALL NXP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
10  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
11  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
12  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
15  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
16  * THE POSSIBILITY OF SUCH DAMAGE.
17  */
18 
19 #ifndef FLEXIO_COMMON_DRIVER_H
20 #define FLEXIO_COMMON_DRIVER_H
21 
22 #include <stddef.h>
23 #include <stdbool.h>
24 #include "device_registers.h"
25 #include "flexio_hw_access.h"
26 #include "flexio.h"
27 #include "edma_driver.h"
28 
29 
30  /*******************************************************************************
31  * Variables
32  ******************************************************************************/
33 
34 /* Table of base addresses for FLEXIO instances. */
36 
37 /* Pointer to device state structures. This structure contains data common to all drivers on one device */
38 extern flexio_device_state_t *g_flexioDeviceStatePtr[FLEXIO_INSTANCE_COUNT];
39 
40 /* Table for FLEXIO IRQ numbers */
42 
43 /* PCC clock sources, for getting the input clock frequency */
45 
46 /* FlexIO DMA request sources */
48 
49 /*******************************************************************************
50  * Enumerations.
51  ******************************************************************************/
52 
53 
54 /*******************************************************************************
55 * Definitions
56 ******************************************************************************/
57 
58 
59 /*******************************************************************************
60  * API
61  ******************************************************************************/
62 
63 
64 #if defined(__cplusplus)
65 extern "C" {
66 #endif
67 
68 
69 /*FUNCTION**********************************************************************
70  *
71  * Function Name : FLEXIO_DRV_InitDriver
72  * Description : Initializes an instance of FlexIO driver
73  *
74  *END**************************************************************************/
75 status_t FLEXIO_DRV_InitDriver(uint32_t instance, flexio_common_state_t *driver);
76 
77 
78 /*FUNCTION**********************************************************************
79  *
80  * Function Name : FLEXIO_DRV_DeinitDriver
81  * Description : De-initializes an instance of FlexIO driver
82  *
83  *END**************************************************************************/
84 status_t FLEXIO_DRV_DeinitDriver(const flexio_common_state_t *driver);
85 
86 
87 #if defined(__cplusplus)
88 }
89 #endif
90 
91 
92 #endif /* FLEXIO_COMMON_DRIVER_H */
93 /*******************************************************************************
94  * EOF
95  ******************************************************************************/
const IRQn_Type g_flexioIrqId[(1u)]
Definition: flexio_common.c:62
status_t FLEXIO_DRV_DeinitDriver(const flexio_common_state_t *driver)
#define FEATURE_FLEXIO_MAX_SHIFTER_COUNT
status_t FLEXIO_DRV_InitDriver(uint32_t instance, flexio_common_state_t *driver)
#define FLEXIO_INSTANCE_COUNT
Definition: S32K118.h:3350
flexio_device_state_t * g_flexioDeviceStatePtr[(1u)]
Definition: flexio_common.c:59
FLEXIO_Type *const g_flexioBase[(1u)]
Definition: flexio_common.c:56
const uint8_t g_flexioDMASrc[(1u)][(4U)]
Definition: flexio_common.c:68
status_t
Status return codes. Common error codes will be a unified enumeration (C enum) that will contain all ...
Definition: status.h:44
IRQn_Type
Defines the Interrupt Numbers definitions.
Definition: S32K118.h:188
const clock_names_t g_flexioClock[(1u)]
Definition: flexio_common.c:65
clock_names_t
Clock names.