Common services for FlexIO drivers.
The Flexio Common driver layer contains services used by all Flexio drivers. The need for this layer derives from the requirement to allow multiple Flexio drivers to run in parallel on the same device, to the extent that enough hardware resources (shifters and timers) are available.
The Flexio Common driver layer provides functions for device initialization and reset. Before using any Flexio driver the device must first be initialized using function FLEXIO_DRV_InitDevice(). Then any number of Flexio drivers can be initialized on the same device, to the extent that enough hardware resources (shifters and timers) are available. Driver initialization functions will return STATUS_ERROR if not enough resources are available for a new driver.
Calling any Flexio common function will destroy any driver that is active on that device. Normally these functions should be called only when there are no active driver instances on the device.
Enumerations | |
enum | flexio_driver_type_t { FLEXIO_DRIVER_TYPE_INTERRUPTS = 0U, FLEXIO_DRIVER_TYPE_POLLING = 1U, FLEXIO_DRIVER_TYPE_DMA = 2U } |
Driver type: interrupts/polling/DMA Implements : flexio_driver_type_t_Class. More... | |
FLEXIO_I2C Driver | |
status_t | FLEXIO_DRV_InitDevice (uint32_t instance, flexio_device_state_t *deviceState) |
Initializes the FlexIO device. More... | |
status_t | FLEXIO_DRV_DeinitDevice (uint32_t instance) |
De-initializes the FlexIO device. More... | |
status_t | FLEXIO_DRV_Reset (uint32_t instance) |
Resets the FlexIO device. More... | |
enum flexio_driver_type_t |
status_t FLEXIO_DRV_DeinitDevice | ( | uint32_t | instance | ) |
De-initializes the FlexIO device.
This function de-initializes the FlexIO device.
instance | FLEXIO peripheral instance number |
Definition at line 128 of file flexio_common.c.
status_t FLEXIO_DRV_InitDevice | ( | uint32_t | instance, |
flexio_device_state_t * | deviceState | ||
) |
Initializes the FlexIO device.
This function resets the FlexIO device, enables interrupts in interrupt manager and enables the device.
instance | FLEXIO peripheral instance number |
deviceState | Pointer to the FLEXIO device context structure. The driver uses this memory area for its internal logic. The application must make no assumptions about the content of this structure, and must not free this memory until the device is de-initialized using FLEXIO_DRV_DeinitDevice(). |
Definition at line 89 of file flexio_common.c.
status_t FLEXIO_DRV_Reset | ( | uint32_t | instance | ) |
Resets the FlexIO device.
This function resets the FlexIO device.
instance | FLEXIO peripheral instance number |
Definition at line 153 of file flexio_common.c.