Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
FlexIO basic Peripheral Driver

This section describes the programming interface of the FlexIO basic Peripheral driver. The FlexIO basic peripheral driver configures the common features of FlexIO. It handles the common initialization, clock, and interrupts when using FlexIO.

FlexIO PD model building

The FlexIO module simulate the device and its life cycle corresponds to a life cycle of various simulated devices. These functions are implemented by the FlexIO simulated device drivers. However, before or after these life cycles, there are some common operations. FlexIO basic PD driver provides the APIs to set the FlexIO globally, such as enabling/disabling the clock/interrupt and starting/pausing the module.

Note that for complex simulations, such as the camera interface, it is recommended not to simulate more than one device at the same time. In the camera use case, the application may pause the camera's interface by stopping the FlexIO module calling the FLEXIO_DRV_Pause(), which may affect other simulated devices.

For FlexIO basic driver usage:

#include "fsl_flexio_driver.h"
const flexio_user_config_t FlexIOUserConfigStruct =
{
.useInt = false,
.onDozeEnable = false,
.onDebugEnable = true,
.fastAccessEnable = true
};
int main(void)
{
//...
FLEXIO_DRV_Init(0U, &FlexIOUserConfigStruct);
FLEXIO_DRV_Start(0U);
/* Do the FlexIO devices' simulation.
//...
{
FLEXIO_DRV_Pause(0U);
//...
FLEXIO_DRV_Start(0U);
}
FLEXIO_DRV_Deinit(0U);
return 0U;
}