RTEMS 6.1-rc5
Loading...
Searching...
No Matches
Data Structures | Enumerator | Variables
Flexio_driver

Data Structures

struct  _flexio_config_
 Define FlexIO user configuration structure. More...
 
struct  _flexio_timer_config
 Define FlexIO timer configuration structure. More...
 
struct  _flexio_shifter_config
 Define FlexIO shifter configuration structure. More...
 

Variables

bool _flexio_config_::enableFlexio
 
bool _flexio_config_::enableInDoze
 
bool _flexio_config_::enableInDebug
 
bool _flexio_config_::enableFastAccess
 
uint32_t _flexio_timer_config::triggerSelect
 
flexio_timer_trigger_polarity_t _flexio_timer_config::triggerPolarity
 
flexio_timer_trigger_source_t _flexio_timer_config::triggerSource
 
flexio_pin_config_t _flexio_timer_config::pinConfig
 
uint32_t _flexio_timer_config::pinSelect
 
flexio_pin_polarity_t _flexio_timer_config::pinPolarity
 
flexio_timer_mode_t _flexio_timer_config::timerMode
 
flexio_timer_output_t _flexio_timer_config::timerOutput
 
flexio_timer_decrement_source_t _flexio_timer_config::timerDecrement
 
flexio_timer_reset_condition_t _flexio_timer_config::timerReset
 
flexio_timer_disable_condition_t _flexio_timer_config::timerDisable
 
flexio_timer_enable_condition_t _flexio_timer_config::timerEnable
 
flexio_timer_stop_bit_condition_t _flexio_timer_config::timerStop
 
flexio_timer_start_bit_condition_t _flexio_timer_config::timerStart
 
uint32_t _flexio_timer_config::timerCompare
 
uint32_t _flexio_shifter_config::timerSelect
 
flexio_shifter_timer_polarity_t _flexio_shifter_config::timerPolarity
 
flexio_pin_config_t _flexio_shifter_config::pinConfig
 
uint32_t _flexio_shifter_config::pinSelect
 
flexio_pin_polarity_t _flexio_shifter_config::pinPolarity
 
flexio_shifter_mode_t _flexio_shifter_config::shifterMode
 
flexio_shifter_input_source_t _flexio_shifter_config::inputSource
 
flexio_shifter_stop_bit_t _flexio_shifter_config::shifterStop
 
flexio_shifter_start_bit_t _flexio_shifter_config::shifterStart
 

Driver version

enum  _flexio_timer_trigger_polarity { kFLEXIO_TimerTriggerPolarityActiveHigh = 0x0U , kFLEXIO_TimerTriggerPolarityActiveLow = 0x1U }
 Define time of timer trigger polarity. More...
 
enum  _flexio_timer_trigger_source { kFLEXIO_TimerTriggerSourceExternal = 0x0U , kFLEXIO_TimerTriggerSourceInternal = 0x1U }
 Define type of timer trigger source. More...
 
enum  _flexio_pin_config { kFLEXIO_PinConfigOutputDisabled = 0x0U , kFLEXIO_PinConfigOpenDrainOrBidirection = 0x1U , kFLEXIO_PinConfigBidirectionOutputData = 0x2U , kFLEXIO_PinConfigOutput = 0x3U }
 Define type of timer/shifter pin configuration. More...
 
enum  _flexio_pin_polarity { kFLEXIO_PinActiveHigh = 0x0U , kFLEXIO_PinActiveLow = 0x1U }
 Definition of pin polarity. More...
 
enum  _flexio_timer_mode { kFLEXIO_TimerModeDisabled = 0x0U , kFLEXIO_TimerModeDual8BitBaudBit = 0x1U , kFLEXIO_TimerModeDual8BitPWM = 0x2U , kFLEXIO_TimerModeSingle16Bit = 0x3U }
 Define type of timer work mode. More...
 
enum  _flexio_timer_output { kFLEXIO_TimerOutputOneNotAffectedByReset = 0x0U , kFLEXIO_TimerOutputZeroNotAffectedByReset = 0x1U , kFLEXIO_TimerOutputOneAffectedByReset = 0x2U , kFLEXIO_TimerOutputZeroAffectedByReset = 0x3U }
 Define type of timer initial output or timer reset condition. More...
 
enum  _flexio_timer_decrement_source { kFLEXIO_TimerDecSrcOnFlexIOClockShiftTimerOutput = 0x0U , kFLEXIO_TimerDecSrcOnTriggerInputShiftTimerOutput , kFLEXIO_TimerDecSrcOnPinInputShiftPinInput , kFLEXIO_TimerDecSrcOnTriggerInputShiftTriggerInput }
 Define type of timer decrement. More...
 
enum  _flexio_timer_reset_condition {
  kFLEXIO_TimerResetNever = 0x0U , kFLEXIO_TimerResetOnTimerPinEqualToTimerOutput = 0x2U , kFLEXIO_TimerResetOnTimerTriggerEqualToTimerOutput = 0x3U , kFLEXIO_TimerResetOnTimerPinRisingEdge = 0x4U ,
  kFLEXIO_TimerResetOnTimerTriggerRisingEdge = 0x6U , kFLEXIO_TimerResetOnTimerTriggerBothEdge = 0x7U
}
 Define type of timer reset condition. More...
 
enum  _flexio_timer_disable_condition {
  kFLEXIO_TimerDisableNever = 0x0U , kFLEXIO_TimerDisableOnPreTimerDisable = 0x1U , kFLEXIO_TimerDisableOnTimerCompare = 0x2U , kFLEXIO_TimerDisableOnTimerCompareTriggerLow = 0x3U ,
  kFLEXIO_TimerDisableOnPinBothEdge = 0x4U , kFLEXIO_TimerDisableOnPinBothEdgeTriggerHigh = 0x5U , kFLEXIO_TimerDisableOnTriggerFallingEdge = 0x6U
}
 Define type of timer disable condition. More...
 
enum  _flexio_timer_enable_condition {
  kFLEXIO_TimerEnabledAlways = 0x0U , kFLEXIO_TimerEnableOnPrevTimerEnable = 0x1U , kFLEXIO_TimerEnableOnTriggerHigh = 0x2U , kFLEXIO_TimerEnableOnTriggerHighPinHigh = 0x3U ,
  kFLEXIO_TimerEnableOnPinRisingEdge = 0x4U , kFLEXIO_TimerEnableOnPinRisingEdgeTriggerHigh = 0x5U , kFLEXIO_TimerEnableOnTriggerRisingEdge = 0x6U , kFLEXIO_TimerEnableOnTriggerBothEdge = 0x7U
}
 Define type of timer enable condition. More...
 
enum  _flexio_timer_stop_bit_condition { kFLEXIO_TimerStopBitDisabled = 0x0U , kFLEXIO_TimerStopBitEnableOnTimerCompare = 0x1U , kFLEXIO_TimerStopBitEnableOnTimerDisable = 0x2U , kFLEXIO_TimerStopBitEnableOnTimerCompareDisable = 0x3U }
 Define type of timer stop bit generate condition. More...
 
enum  _flexio_timer_start_bit_condition { kFLEXIO_TimerStartBitDisabled = 0x0U , kFLEXIO_TimerStartBitEnabled = 0x1U }
 Define type of timer start bit generate condition. More...
 
enum  _flexio_timer_output_state { kFLEXIO_PwmLow = 0 , kFLEXIO_PwmHigh }
 FlexIO as PWM channel output state. More...
 
enum  _flexio_shifter_timer_polarity { kFLEXIO_ShifterTimerPolarityOnPositive = 0x0U , kFLEXIO_ShifterTimerPolarityOnNegitive = 0x1U }
 Define type of timer polarity for shifter control. More...
 
enum  _flexio_shifter_mode {
  kFLEXIO_ShifterDisabled = 0x0U , kFLEXIO_ShifterModeReceive = 0x1U , kFLEXIO_ShifterModeTransmit = 0x2U , kFLEXIO_ShifterModeMatchStore = 0x4U ,
  kFLEXIO_ShifterModeMatchContinuous = 0x5U
}
 Define type of shifter working mode. More...
 
enum  _flexio_shifter_input_source { kFLEXIO_ShifterInputFromPin = 0x0U , kFLEXIO_ShifterInputFromNextShifterOutput = 0x1U }
 Define type of shifter input source. More...
 
enum  _flexio_shifter_stop_bit { kFLEXIO_ShifterStopBitDisable = 0x0U , kFLEXIO_ShifterStopBitLow = 0x2U , kFLEXIO_ShifterStopBitHigh = 0x3U }
 Define of STOP bit configuration. More...
 
enum  _flexio_shifter_start_bit { kFLEXIO_ShifterStartBitDisabledLoadDataOnEnable = 0x0U , kFLEXIO_ShifterStartBitDisabledLoadDataOnShift = 0x1U , kFLEXIO_ShifterStartBitLow = 0x2U , kFLEXIO_ShifterStartBitHigh = 0x3U }
 Define type of START bit configuration. More...
 
enum  _flexio_shifter_buffer_type { kFLEXIO_ShifterBuffer = 0x0U , kFLEXIO_ShifterBufferBitSwapped = 0x1U , kFLEXIO_ShifterBufferByteSwapped = 0x2U , kFLEXIO_ShifterBufferBitByteSwapped = 0x3U }
 Define FlexIO shifter buffer type. More...
 
typedef enum _flexio_timer_trigger_polarity flexio_timer_trigger_polarity_t
 Define time of timer trigger polarity.
 
typedef enum _flexio_timer_trigger_source flexio_timer_trigger_source_t
 Define type of timer trigger source.
 
typedef enum _flexio_pin_config flexio_pin_config_t
 Define type of timer/shifter pin configuration.
 
typedef enum _flexio_pin_polarity flexio_pin_polarity_t
 Definition of pin polarity.
 
typedef enum _flexio_timer_mode flexio_timer_mode_t
 Define type of timer work mode.
 
typedef enum _flexio_timer_output flexio_timer_output_t
 Define type of timer initial output or timer reset condition.
 
typedef enum _flexio_timer_decrement_source flexio_timer_decrement_source_t
 Define type of timer decrement.
 
typedef enum _flexio_timer_reset_condition flexio_timer_reset_condition_t
 Define type of timer reset condition.
 
typedef enum _flexio_timer_disable_condition flexio_timer_disable_condition_t
 Define type of timer disable condition.
 
typedef enum _flexio_timer_enable_condition flexio_timer_enable_condition_t
 Define type of timer enable condition.
 
typedef enum _flexio_timer_stop_bit_condition flexio_timer_stop_bit_condition_t
 Define type of timer stop bit generate condition.
 
typedef enum _flexio_timer_start_bit_condition flexio_timer_start_bit_condition_t
 Define type of timer start bit generate condition.
 
typedef enum _flexio_timer_output_state flexio_timer_output_state_t
 FlexIO as PWM channel output state.
 
typedef enum _flexio_shifter_timer_polarity flexio_shifter_timer_polarity_t
 Define type of timer polarity for shifter control.
 
typedef enum _flexio_shifter_mode flexio_shifter_mode_t
 Define type of shifter working mode.
 
typedef enum _flexio_shifter_input_source flexio_shifter_input_source_t
 Define type of shifter input source.
 
typedef enum _flexio_shifter_stop_bit flexio_shifter_stop_bit_t
 Define of STOP bit configuration.
 
typedef enum _flexio_shifter_start_bit flexio_shifter_start_bit_t
 Define type of START bit configuration.
 
typedef enum _flexio_shifter_buffer_type flexio_shifter_buffer_type_t
 Define FlexIO shifter buffer type.
 
typedef struct _flexio_config_ flexio_config_t
 Define FlexIO user configuration structure.
 
typedef struct _flexio_timer_config flexio_timer_config_t
 Define FlexIO timer configuration structure.
 
typedef struct _flexio_shifter_config flexio_shifter_config_t
 Define FlexIO shifter configuration structure.
 
typedef void(* flexio_isr_t) (void *base, void *handle)
 typedef for FlexIO simulated driver interrupt handler.
 
FLEXIO_Type *const s_flexioBases []
 Pointers to flexio bases for each instance.
 
const clock_ip_name_t s_flexioClocks []
 Pointers to flexio clocks for each instance.
 
#define FSL_FLEXIO_DRIVER_VERSION   (MAKE_VERSION(2, 1, 0))
 FlexIO driver version.
 
#define FLEXIO_TIMER_TRIGGER_SEL_PININPUT(x)   ((uint32_t)(x) << 1U)
 Calculate FlexIO timer trigger.
 
#define FLEXIO_TIMER_TRIGGER_SEL_SHIFTnSTAT(x)   (((uint32_t)(x) << 2U) | 0x1U)
 
#define FLEXIO_TIMER_TRIGGER_SEL_TIMn(x)   (((uint32_t)(x) << 2U) | 0x3U)
 

FlexIO Initialization and De-initialization

void FLEXIO_GetDefaultConfig (flexio_config_t *userConfig)
 Gets the default configuration to configure the FlexIO module. The configuration can used directly to call the FLEXIO_Configure().
 
void FLEXIO_Init (FLEXIO_Type *base, const flexio_config_t *userConfig)
 Configures the FlexIO with a FlexIO configuration. The configuration structure can be filled by the user or be set with default values by FLEXIO_GetDefaultConfig().
 
void FLEXIO_Deinit (FLEXIO_Type *base)
 Gates the FlexIO clock. Call this API to stop the FlexIO clock.
 
uint32_t FLEXIO_GetInstance (FLEXIO_Type *base)
 Get instance number for FLEXIO module.
 

FlexIO Basic Operation

void FLEXIO_Reset (FLEXIO_Type *base)
 Resets the FlexIO module.
 
void FLEXIO_SetShifterConfig (FLEXIO_Type *base, uint8_t index, const flexio_shifter_config_t *shifterConfig)
 Configures the shifter with the shifter configuration. The configuration structure covers both the SHIFTCTL and SHIFTCFG registers. To configure the shifter to the proper mode, select which timer controls the shifter to shift, whether to generate start bit/stop bit, and the polarity of start bit and stop bit.
 
void FLEXIO_SetTimerConfig (FLEXIO_Type *base, uint8_t index, const flexio_timer_config_t *timerConfig)
 Configures the timer with the timer configuration. The configuration structure covers both the TIMCTL and TIMCFG registers. To configure the timer to the proper mode, select trigger source for timer and the timer pin output and the timing for timer.
 

FlexIO DMA Operation

uint32_t FLEXIO_GetShifterBufferAddress (FLEXIO_Type *base, flexio_shifter_buffer_type_t type, uint8_t index)
 Gets the shifter buffer address for the DMA transfer usage.
 
status_t FLEXIO_RegisterHandleIRQ (void *base, void *handle, flexio_isr_t isr)
 Registers the handle and the interrupt handler for the FlexIO-simulated peripheral.
 
status_t FLEXIO_UnregisterHandleIRQ (void *base)
 Unregisters the handle and the interrupt handler for the FlexIO-simulated peripheral.
 

Detailed Description

Enumeration Type Documentation

◆ _flexio_pin_config

Define type of timer/shifter pin configuration.

Enumerator
kFLEXIO_PinConfigOutputDisabled 

Pin output disabled.

kFLEXIO_PinConfigOpenDrainOrBidirection 

Pin open drain or bidirectional output enable.

kFLEXIO_PinConfigBidirectionOutputData 

Pin bidirectional output data.

kFLEXIO_PinConfigOutput 

Pin output.

◆ _flexio_pin_polarity

Definition of pin polarity.

Enumerator
kFLEXIO_PinActiveHigh 

Active high.

kFLEXIO_PinActiveLow 

Active low.

◆ _flexio_shifter_buffer_type

Define FlexIO shifter buffer type.

Enumerator
kFLEXIO_ShifterBuffer 

Shifter Buffer N Register.

kFLEXIO_ShifterBufferBitSwapped 

Shifter Buffer N Bit Byte Swapped Register.

kFLEXIO_ShifterBufferByteSwapped 

Shifter Buffer N Byte Swapped Register.

kFLEXIO_ShifterBufferBitByteSwapped 

Shifter Buffer N Bit Swapped Register.

◆ _flexio_shifter_input_source

Define type of shifter input source.

Enumerator
kFLEXIO_ShifterInputFromPin 

Shifter input from pin.

kFLEXIO_ShifterInputFromNextShifterOutput 

Shifter input from Shifter N+1.

◆ _flexio_shifter_mode

Define type of shifter working mode.

Enumerator
kFLEXIO_ShifterDisabled 

Shifter is disabled.

kFLEXIO_ShifterModeReceive 

Receive mode.

kFLEXIO_ShifterModeTransmit 

Transmit mode.

kFLEXIO_ShifterModeMatchStore 

Match store mode.

kFLEXIO_ShifterModeMatchContinuous 

Match continuous mode.

◆ _flexio_shifter_start_bit

Define type of START bit configuration.

Enumerator
kFLEXIO_ShifterStartBitDisabledLoadDataOnEnable 

Disable shifter start bit, transmitter loads data on enable.

kFLEXIO_ShifterStartBitDisabledLoadDataOnShift 

Disable shifter start bit, transmitter loads data on first shift.

kFLEXIO_ShifterStartBitLow 

Set shifter start bit to logic low level.

kFLEXIO_ShifterStartBitHigh 

Set shifter start bit to logic high level.

◆ _flexio_shifter_stop_bit

Define of STOP bit configuration.

Enumerator
kFLEXIO_ShifterStopBitDisable 

Disable shifter stop bit.

kFLEXIO_ShifterStopBitLow 

Set shifter stop bit to logic low level.

kFLEXIO_ShifterStopBitHigh 

Set shifter stop bit to logic high level.

◆ _flexio_shifter_timer_polarity

Define type of timer polarity for shifter control.

Enumerator
kFLEXIO_ShifterTimerPolarityOnPositive 

Shift on positive edge of shift clock.

kFLEXIO_ShifterTimerPolarityOnNegitive 

Shift on negative edge of shift clock.

◆ _flexio_timer_decrement_source

Define type of timer decrement.

Enumerator
kFLEXIO_TimerDecSrcOnFlexIOClockShiftTimerOutput 

Decrement counter on FlexIO clock, Shift clock equals Timer output.

kFLEXIO_TimerDecSrcOnTriggerInputShiftTimerOutput 

Decrement counter on Trigger input (both edges), Shift clock equals Timer output.

kFLEXIO_TimerDecSrcOnPinInputShiftPinInput 

Decrement counter on Pin input (both edges), Shift clock equals Pin input.

kFLEXIO_TimerDecSrcOnTriggerInputShiftTriggerInput 

Decrement counter on Trigger input (both edges), Shift clock equals Trigger input.

◆ _flexio_timer_disable_condition

Define type of timer disable condition.

Enumerator
kFLEXIO_TimerDisableNever 

Timer never disabled.

kFLEXIO_TimerDisableOnPreTimerDisable 

Timer disabled on Timer N-1 disable.

kFLEXIO_TimerDisableOnTimerCompare 

Timer disabled on Timer compare.

kFLEXIO_TimerDisableOnTimerCompareTriggerLow 

Timer disabled on Timer compare and Trigger Low.

kFLEXIO_TimerDisableOnPinBothEdge 

Timer disabled on Pin rising or falling edge.

kFLEXIO_TimerDisableOnPinBothEdgeTriggerHigh 

Timer disabled on Pin rising or falling edge provided Trigger is high.

kFLEXIO_TimerDisableOnTriggerFallingEdge 

Timer disabled on Trigger falling edge.

◆ _flexio_timer_enable_condition

Define type of timer enable condition.

Enumerator
kFLEXIO_TimerEnabledAlways 

Timer always enabled.

kFLEXIO_TimerEnableOnPrevTimerEnable 

Timer enabled on Timer N-1 enable.

kFLEXIO_TimerEnableOnTriggerHigh 

Timer enabled on Trigger high.

kFLEXIO_TimerEnableOnTriggerHighPinHigh 

Timer enabled on Trigger high and Pin high.

kFLEXIO_TimerEnableOnPinRisingEdge 

Timer enabled on Pin rising edge.

kFLEXIO_TimerEnableOnPinRisingEdgeTriggerHigh 

Timer enabled on Pin rising edge and Trigger high.

kFLEXIO_TimerEnableOnTriggerRisingEdge 

Timer enabled on Trigger rising edge.

kFLEXIO_TimerEnableOnTriggerBothEdge 

Timer enabled on Trigger rising or falling edge.

◆ _flexio_timer_mode

Define type of timer work mode.

Enumerator
kFLEXIO_TimerModeDisabled 

Timer Disabled.

kFLEXIO_TimerModeDual8BitBaudBit 

Dual 8-bit counters baud/bit mode.

kFLEXIO_TimerModeDual8BitPWM 

Dual 8-bit counters PWM mode.

kFLEXIO_TimerModeSingle16Bit 

Single 16-bit counter mode.

◆ _flexio_timer_output

Define type of timer initial output or timer reset condition.

Enumerator
kFLEXIO_TimerOutputOneNotAffectedByReset 

Logic one when enabled and is not affected by timer reset.

kFLEXIO_TimerOutputZeroNotAffectedByReset 

Logic zero when enabled and is not affected by timer reset.

kFLEXIO_TimerOutputOneAffectedByReset 

Logic one when enabled and on timer reset.

kFLEXIO_TimerOutputZeroAffectedByReset 

Logic zero when enabled and on timer reset.

◆ _flexio_timer_output_state

FlexIO as PWM channel output state.

Enumerator
kFLEXIO_PwmLow 

The output state of PWM channel is low

kFLEXIO_PwmHigh 

The output state of PWM channel is high

◆ _flexio_timer_reset_condition

Define type of timer reset condition.

Enumerator
kFLEXIO_TimerResetNever 

Timer never reset.

kFLEXIO_TimerResetOnTimerPinEqualToTimerOutput 

Timer reset on Timer Pin equal to Timer Output.

kFLEXIO_TimerResetOnTimerTriggerEqualToTimerOutput 

Timer reset on Timer Trigger equal to Timer Output.

kFLEXIO_TimerResetOnTimerPinRisingEdge 

Timer reset on Timer Pin rising edge.

kFLEXIO_TimerResetOnTimerTriggerRisingEdge 

Timer reset on Trigger rising edge.

kFLEXIO_TimerResetOnTimerTriggerBothEdge 

Timer reset on Trigger rising or falling edge.

◆ _flexio_timer_start_bit_condition

Define type of timer start bit generate condition.

Enumerator
kFLEXIO_TimerStartBitDisabled 

Start bit disabled.

kFLEXIO_TimerStartBitEnabled 

Start bit enabled.

◆ _flexio_timer_stop_bit_condition

Define type of timer stop bit generate condition.

Enumerator
kFLEXIO_TimerStopBitDisabled 

Stop bit disabled.

kFLEXIO_TimerStopBitEnableOnTimerCompare 

Stop bit is enabled on timer compare.

kFLEXIO_TimerStopBitEnableOnTimerDisable 

Stop bit is enabled on timer disable.

kFLEXIO_TimerStopBitEnableOnTimerCompareDisable 

Stop bit is enabled on timer compare and timer disable.

◆ _flexio_timer_trigger_polarity

Define time of timer trigger polarity.

Enumerator
kFLEXIO_TimerTriggerPolarityActiveHigh 

Active high.

kFLEXIO_TimerTriggerPolarityActiveLow 

Active low.

◆ _flexio_timer_trigger_source

Define type of timer trigger source.

Enumerator
kFLEXIO_TimerTriggerSourceExternal 

External trigger selected.

kFLEXIO_TimerTriggerSourceInternal 

Internal trigger selected.

Function Documentation

◆ FLEXIO_Deinit()

void FLEXIO_Deinit ( FLEXIO_Type base)

Gates the FlexIO clock. Call this API to stop the FlexIO clock.

Note
After calling this API, call the FLEXO_Init to use the FlexIO module.
Parameters
baseFlexIO peripheral base address

brief Gates the FlexIO clock. Call this API to stop the FlexIO clock.

note After calling this API, call the FLEXO_Init to use the FlexIO module.

param base FlexIO peripheral base address

◆ FLEXIO_GetDefaultConfig()

void FLEXIO_GetDefaultConfig ( flexio_config_t userConfig)

Gets the default configuration to configure the FlexIO module. The configuration can used directly to call the FLEXIO_Configure().

Example:

void FLEXIO_GetDefaultConfig(flexio_config_t *userConfig)
Gets the default configuration to configure the FlexIO module. The configuration can used directly to...
Definition: fsl_flexio.c:140
Define FlexIO user configuration structure.
Definition: fsl_flexio.h:240
Definition: deflate.c:114
Parameters
userConfigpointer to flexio_config_t structure

brief Gets the default configuration to configure the FlexIO module. The configuration can used directly to call the FLEXIO_Configure().

Example: code flexio_config_t config; FLEXIO_GetDefaultConfig(&config); endcode

param userConfig pointer to flexio_config_t structure

◆ FLEXIO_GetInstance()

uint32_t FLEXIO_GetInstance ( FLEXIO_Type base)

Get instance number for FLEXIO module.

Parameters
baseFLEXIO peripheral base address.

brief Get instance number for FLEXIO module.

param base FLEXIO peripheral base address.

◆ FLEXIO_GetShifterBufferAddress()

uint32_t FLEXIO_GetShifterBufferAddress ( FLEXIO_Type base,
flexio_shifter_buffer_type_t  type,
uint8_t  index 
)

Gets the shifter buffer address for the DMA transfer usage.

Parameters
baseFlexIO peripheral base address
typeShifter type of flexio_shifter_buffer_type_t
indexShifter index
Returns
Corresponding shifter buffer index

brief Gets the shifter buffer address for the DMA transfer usage.

param base FlexIO peripheral base address param type Shifter type of flexio_shifter_buffer_type_t param index Shifter index return Corresponding shifter buffer index

◆ FLEXIO_Init()

void FLEXIO_Init ( FLEXIO_Type base,
const flexio_config_t userConfig 
)

Configures the FlexIO with a FlexIO configuration. The configuration structure can be filled by the user or be set with default values by FLEXIO_GetDefaultConfig().

Example

.enableFlexio = true,
.enableInDoze = false,
.enableInDebug = true,
.enableFastAccess = false
};
FLEXIO_Configure(base, &config);
Parameters
baseFlexIO peripheral base address
userConfigpointer to flexio_config_t structure

brief Configures the FlexIO with a FlexIO configuration. The configuration structure can be filled by the user or be set with default values by FLEXIO_GetDefaultConfig().

Example code flexio_config_t config = { .enableFlexio = true, .enableInDoze = false, .enableInDebug = true, .enableFastAccess = false }; FLEXIO_Configure(base, &config); endcode

param base FlexIO peripheral base address param userConfig pointer to flexio_config_t structure

◆ FLEXIO_RegisterHandleIRQ()

status_t FLEXIO_RegisterHandleIRQ ( void *  base,
void *  handle,
flexio_isr_t  isr 
)

Registers the handle and the interrupt handler for the FlexIO-simulated peripheral.

Parameters
basePointer to the FlexIO simulated peripheral type.
handlePointer to the handler for FlexIO simulated peripheral.
isrFlexIO simulated peripheral interrupt handler.
Return values
kStatus_SuccessSuccessfully create the handle.
kStatus_OutOfRangeThe FlexIO type/handle/ISR table out of range.

brief Registers the handle and the interrupt handler for the FlexIO-simulated peripheral.

param base Pointer to the FlexIO simulated peripheral type. param handle Pointer to the handler for FlexIO simulated peripheral. param isr FlexIO simulated peripheral interrupt handler. retval kStatus_Success Successfully create the handle. retval kStatus_OutOfRange The FlexIO type/handle/ISR table out of range.

◆ FLEXIO_Reset()

void FLEXIO_Reset ( FLEXIO_Type base)

Resets the FlexIO module.

Parameters
baseFlexIO peripheral base address

brief Resets the FlexIO module.

param base FlexIO peripheral base address

◆ FLEXIO_SetShifterConfig()

void FLEXIO_SetShifterConfig ( FLEXIO_Type base,
uint8_t  index,
const flexio_shifter_config_t shifterConfig 
)

Configures the shifter with the shifter configuration. The configuration structure covers both the SHIFTCTL and SHIFTCFG registers. To configure the shifter to the proper mode, select which timer controls the shifter to shift, whether to generate start bit/stop bit, and the polarity of start bit and stop bit.

Example

.timerSelect = 0,
.pinPolarity = kFLEXIO_PinActiveLow,
};
void FLEXIO_SetShifterConfig(FLEXIO_Type *base, uint8_t index, const flexio_shifter_config_t *shifterConfig)
Configures the shifter with the shifter configuration. The configuration structure covers both the SH...
Definition: fsl_flexio.c:247
@ kFLEXIO_PinActiveLow
Definition: fsl_flexio.h:60
@ kFLEXIO_ShifterTimerPolarityOnPositive
Definition: fsl_flexio.h:172
@ kFLEXIO_ShifterStartBitLow
Definition: fsl_flexio.h:216
@ kFLEXIO_ShifterModeTransmit
Definition: fsl_flexio.h:181
@ kFLEXIO_ShifterInputFromPin
Definition: fsl_flexio.h:197
@ kFLEXIO_PinConfigOpenDrainOrBidirection
Definition: fsl_flexio.h:51
@ kFLEXIO_ShifterStopBitHigh
Definition: fsl_flexio.h:206
Define FlexIO shifter configuration structure.
Definition: fsl_flexio.h:278
Parameters
baseFlexIO peripheral base address
indexShifter index
shifterConfigPointer to flexio_shifter_config_t structure

brief Configures the shifter with the shifter configuration. The configuration structure covers both the SHIFTCTL and SHIFTCFG registers. To configure the shifter to the proper mode, select which timer controls the shifter to shift, whether to generate start bit/stop bit, and the polarity of start bit and stop bit.

Example code flexio_shifter_config_t config = { .timerSelect = 0, .timerPolarity = kFLEXIO_ShifterTimerPolarityOnPositive, .pinConfig = kFLEXIO_PinConfigOpenDrainOrBidirection, .pinPolarity = kFLEXIO_PinActiveLow, .shifterMode = kFLEXIO_ShifterModeTransmit, .inputSource = kFLEXIO_ShifterInputFromPin, .shifterStop = kFLEXIO_ShifterStopBitHigh, .shifterStart = kFLEXIO_ShifterStartBitLow }; FLEXIO_SetShifterConfig(base, &config); endcode

param base FlexIO peripheral base address param index Shifter index param shifterConfig Pointer to flexio_shifter_config_t structure

◆ FLEXIO_SetTimerConfig()

void FLEXIO_SetTimerConfig ( FLEXIO_Type base,
uint8_t  index,
const flexio_timer_config_t timerConfig 
)

Configures the timer with the timer configuration. The configuration structure covers both the TIMCTL and TIMCFG registers. To configure the timer to the proper mode, select trigger source for timer and the timer pin output and the timing for timer.

Example

.triggerSelect = FLEXIO_TIMER_TRIGGER_SEL_SHIFTnSTAT(0),
.pinSelect = 0,
.pinPolarity = kFLEXIO_PinActiveHigh,
};
void FLEXIO_SetTimerConfig(FLEXIO_Type *base, uint8_t index, const flexio_timer_config_t *timerConfig)
Configures the timer with the timer configuration. The configuration structure covers both the TIMCTL...
Definition: fsl_flexio.c:292
@ kFLEXIO_TimerOutputZeroNotAffectedByReset
Definition: fsl_flexio.h:77
@ kFLEXIO_PinActiveHigh
Definition: fsl_flexio.h:59
@ kFLEXIO_TimerDisableOnTimerCompare
Definition: fsl_flexio.h:124
@ kFLEXIO_TimerTriggerPolarityActiveLow
Definition: fsl_flexio.h:37
@ kFLEXIO_TimerEnableOnTriggerHigh
Definition: fsl_flexio.h:137
@ kFLEXIO_TimerModeDual8BitBaudBit
Definition: fsl_flexio.h:67
@ kFLEXIO_TimerStartBitEnabled
Definition: fsl_flexio.h:159
@ kFLEXIO_TimerDecSrcOnFlexIOClockShiftTimerOutput
Definition: fsl_flexio.h:86
@ kFLEXIO_TimerTriggerSourceInternal
Definition: fsl_flexio.h:44
@ kFLEXIO_TimerResetOnTimerPinEqualToTimerOutput
Definition: fsl_flexio.h:111
@ kFLEXIO_TimerStopBitEnableOnTimerDisable
Definition: fsl_flexio.h:150
Define FlexIO timer configuration structure.
Definition: fsl_flexio.h:250
Parameters
baseFlexIO peripheral base address
indexTimer index
timerConfigPointer to the flexio_timer_config_t structure

brief Configures the timer with the timer configuration. The configuration structure covers both the TIMCTL and TIMCFG registers. To configure the timer to the proper mode, select trigger source for timer and the timer pin output and the timing for timer.

Example code flexio_timer_config_t config = { .triggerSelect = FLEXIO_TIMER_TRIGGER_SEL_SHIFTnSTAT(0), .triggerPolarity = kFLEXIO_TimerTriggerPolarityActiveLow, .triggerSource = kFLEXIO_TimerTriggerSourceInternal, .pinConfig = kFLEXIO_PinConfigOpenDrainOrBidirection, .pinSelect = 0, .pinPolarity = kFLEXIO_PinActiveHigh, .timerMode = kFLEXIO_TimerModeDual8BitBaudBit, .timerOutput = kFLEXIO_TimerOutputZeroNotAffectedByReset, .timerDecrement = kFLEXIO_TimerDecSrcOnFlexIOClockShiftTimerOutput, .timerReset = kFLEXIO_TimerResetOnTimerPinEqualToTimerOutput, .timerDisable = kFLEXIO_TimerDisableOnTimerCompare, .timerEnable = kFLEXIO_TimerEnableOnTriggerHigh, .timerStop = kFLEXIO_TimerStopBitEnableOnTimerDisable, .timerStart = kFLEXIO_TimerStartBitEnabled }; FLEXIO_SetTimerConfig(base, &config); endcode

param base FlexIO peripheral base address param index Timer index param timerConfig Pointer to the flexio_timer_config_t structure

◆ FLEXIO_UnregisterHandleIRQ()

status_t FLEXIO_UnregisterHandleIRQ ( void *  base)

Unregisters the handle and the interrupt handler for the FlexIO-simulated peripheral.

Parameters
basePointer to the FlexIO simulated peripheral type.
Return values
kStatus_SuccessSuccessfully create the handle.
kStatus_OutOfRangeThe FlexIO type/handle/ISR table out of range.

brief Unregisters the handle and the interrupt handler for the FlexIO-simulated peripheral.

param base Pointer to the FlexIO simulated peripheral type. retval kStatus_Success Successfully create the handle. retval kStatus_OutOfRange The FlexIO type/handle/ISR table out of range.

Variable Documentation

◆ enableFastAccess

bool _flexio_config_::enableFastAccess

Enable/disable fast access to FlexIO registers, fast access requires the FlexIO clock to be at least twice the frequency of the bus clock.

◆ enableFlexio

bool _flexio_config_::enableFlexio

Enable/disable FlexIO module

◆ enableInDebug

bool _flexio_config_::enableInDebug

Enable/disable FlexIO operation in debug mode

◆ enableInDoze

bool _flexio_config_::enableInDoze

Enable/disable FlexIO operation in doze mode

◆ inputSource

flexio_shifter_input_source_t _flexio_shifter_config::inputSource

Selects the input source for the shifter.

◆ pinConfig [1/2]

flexio_pin_config_t _flexio_timer_config::pinConfig

Timer Pin Configuration.

◆ pinConfig [2/2]

flexio_pin_config_t _flexio_shifter_config::pinConfig

Shifter Pin Configuration.

◆ pinPolarity [1/2]

flexio_pin_polarity_t _flexio_timer_config::pinPolarity

Timer Pin Polarity.

◆ pinPolarity [2/2]

flexio_pin_polarity_t _flexio_shifter_config::pinPolarity

Shifter Pin Polarity.

◆ pinSelect [1/2]

uint32_t _flexio_timer_config::pinSelect

Timer Pin number Select.

◆ pinSelect [2/2]

uint32_t _flexio_shifter_config::pinSelect

Shifter Pin number Select.

◆ shifterMode

flexio_shifter_mode_t _flexio_shifter_config::shifterMode

Configures the mode of the Shifter.

◆ shifterStart

flexio_shifter_start_bit_t _flexio_shifter_config::shifterStart

Shifter START bit.

◆ shifterStop

flexio_shifter_stop_bit_t _flexio_shifter_config::shifterStop

Shifter STOP bit.

◆ timerCompare

uint32_t _flexio_timer_config::timerCompare

Value for Timer Compare N Register.

◆ timerDecrement

flexio_timer_decrement_source_t _flexio_timer_config::timerDecrement

Configures the source of the Timer decrement and the source of the Shift clock.

◆ timerDisable

flexio_timer_disable_condition_t _flexio_timer_config::timerDisable

Configures the condition that causes the Timer to be disabled and stop decrementing.

◆ timerEnable

flexio_timer_enable_condition_t _flexio_timer_config::timerEnable

Configures the condition that causes the Timer to be enabled and start decrementing.

◆ timerMode

flexio_timer_mode_t _flexio_timer_config::timerMode

Timer work Mode.

◆ timerOutput

flexio_timer_output_t _flexio_timer_config::timerOutput

Configures the initial state of the Timer Output and whether it is affected by the Timer reset.

◆ timerPolarity

flexio_shifter_timer_polarity_t _flexio_shifter_config::timerPolarity

Timer Polarity.

◆ timerReset

flexio_timer_reset_condition_t _flexio_timer_config::timerReset

Configures the condition that causes the timer counter (and optionally the timer output) to be reset.

◆ timerSelect

uint32_t _flexio_shifter_config::timerSelect

Selects which Timer is used for controlling the logic/shift register and generating the Shift clock.

◆ timerStart

flexio_timer_start_bit_condition_t _flexio_timer_config::timerStart

Timer STRAT Bit generation.

◆ timerStop

flexio_timer_stop_bit_condition_t _flexio_timer_config::timerStop

Timer STOP Bit generation.

◆ triggerPolarity

flexio_timer_trigger_polarity_t _flexio_timer_config::triggerPolarity

Trigger Polarity.

◆ triggerSelect

uint32_t _flexio_timer_config::triggerSelect

The internal trigger selection number using MACROs.

◆ triggerSource

flexio_timer_trigger_source_t _flexio_timer_config::triggerSource

Trigger Source, internal (see 'trgsel') or external.