MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

Overview

Data Structures

struct  flexio_config_t
 Define FlexIO user configuration structure. More...
 
struct  flexio_timer_config_t
 Define FlexIO timer configuration structure. More...
 
struct  flexio_shifter_config_t
 Define FlexIO shifter configuration structure. More...
 

Macros

#define FLEXIO_TIMER_TRIGGER_SEL_PININPUT(x)   ((uint32_t)(x) << 1U)
 Calculate FlexIO timer trigger. More...
 

Typedefs

typedef void(* flexio_isr_t )(void *base, void *handle)
 typedef for FlexIO simulated driver interrupt handler. More...
 

Enumerations

enum  flexio_timer_trigger_polarity_t {
  kFLEXIO_TimerTriggerPolarityActiveHigh = 0x0U,
  kFLEXIO_TimerTriggerPolarityActiveLow = 0x1U
}
 Define time of timer trigger polarity. More...
 
enum  flexio_timer_trigger_source_t {
  kFLEXIO_TimerTriggerSourceExternal = 0x0U,
  kFLEXIO_TimerTriggerSourceInternal = 0x1U
}
 Define type of timer trigger source. More...
 
enum  flexio_pin_config_t {
  kFLEXIO_PinConfigOutputDisabled = 0x0U,
  kFLEXIO_PinConfigOpenDrainOrBidirection = 0x1U,
  kFLEXIO_PinConfigBidirectionOutputData = 0x2U,
  kFLEXIO_PinConfigOutput = 0x3U
}
 Define type of timer/shifter pin configuration. More...
 
enum  flexio_pin_polarity_t {
  kFLEXIO_PinActiveHigh = 0x0U,
  kFLEXIO_PinActiveLow = 0x1U
}
 Definition of pin polarity. More...
 
enum  flexio_timer_mode_t {
  kFLEXIO_TimerModeDisabled = 0x0U,
  kFLEXIO_TimerModeDual8BitBaudBit = 0x1U,
  kFLEXIO_TimerModeDual8BitPWM = 0x2U,
  kFLEXIO_TimerModeSingle16Bit = 0x3U
}
 Define type of timer work mode. More...
 
enum  flexio_timer_output_t {
  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_t {
  kFLEXIO_TimerDecSrcOnFlexIOClockShiftTimerOutput = 0x0U,
  kFLEXIO_TimerDecSrcOnTriggerInputShiftTimerOutput = 0x1U,
  kFLEXIO_TimerDecSrcOnPinInputShiftPinInput = 0x2U,
  kFLEXIO_TimerDecSrcOnTriggerInputShiftTriggerInput = 0x3U
}
 Define type of timer decrement. More...
 
enum  flexio_timer_reset_condition_t {
  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_t {
  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_t {
  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_t {
  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_t {
  kFLEXIO_TimerStartBitDisabled = 0x0U,
  kFLEXIO_TimerStartBitEnabled = 0x1U
}
 Define type of timer start bit generate condition. More...
 
enum  flexio_shifter_timer_polarity_t {
  kFLEXIO_ShifterTimerPolarityOnPositive = 0x0U,
  kFLEXIO_ShifterTimerPolarityOnNegitive = 0x1U
}
 Define type of timer polarity for shifter control. More...
 
enum  flexio_shifter_mode_t {
  kFLEXIO_ShifterDisabled = 0x0U,
  kFLEXIO_ShifterModeReceive = 0x1U,
  kFLEXIO_ShifterModeTransmit = 0x2U,
  kFLEXIO_ShifterModeMatchStore = 0x4U,
  kFLEXIO_ShifterModeMatchContinuous = 0x5U,
  kFLEXIO_ShifterModeState = 0x6U,
  kFLEXIO_ShifterModeLogic = 0x7U
}
 Define type of shifter working mode. More...
 
enum  flexio_shifter_input_source_t {
  kFLEXIO_ShifterInputFromPin = 0x0U,
  kFLEXIO_ShifterInputFromNextShifterOutput = 0x1U
}
 Define type of shifter input source. More...
 
enum  flexio_shifter_stop_bit_t {
  kFLEXIO_ShifterStopBitDisable = 0x0U,
  kFLEXIO_ShifterStopBitLow = 0x2U,
  kFLEXIO_ShifterStopBitHigh = 0x3U
}
 Define of STOP bit configuration. More...
 
enum  flexio_shifter_start_bit_t {
  kFLEXIO_ShifterStartBitDisabledLoadDataOnEnable = 0x0U,
  kFLEXIO_ShifterStartBitDisabledLoadDataOnShift = 0x1U,
  kFLEXIO_ShifterStartBitLow = 0x2U,
  kFLEXIO_ShifterStartBitHigh = 0x3U
}
 Define type of START bit configuration. More...
 
enum  flexio_shifter_buffer_type_t {
  kFLEXIO_ShifterBuffer = 0x0U,
  kFLEXIO_ShifterBufferBitSwapped = 0x1U,
  kFLEXIO_ShifterBufferByteSwapped = 0x2U,
  kFLEXIO_ShifterBufferBitByteSwapped = 0x3U,
  kFLEXIO_ShifterBufferNibbleByteSwapped = 0x4U,
  kFLEXIO_ShifterBufferHalfWordSwapped = 0x5U,
  kFLEXIO_ShifterBufferNibbleSwapped = 0x6U
}
 Define FlexIO shifter buffer type. More...
 

Variables

FLEXIO_Type *const s_flexioBases []
 Pointers to flexio bases for each instance. More...
 
const clock_ip_name_t s_flexioClocks []
 Pointers to flexio clocks for each instance. More...
 

Driver version

#define FSL_FLEXIO_DRIVER_VERSION   (MAKE_VERSION(2, 0, 3))
 FlexIO driver version 2.0.3. More...
 

FlexIO Initialization and De-initialization

void FLEXIO_GetDefaultConfig (flexio_config_t *userConfig)
 Gets the default configuration to configure the FlexIO module. More...
 
void FLEXIO_Init (FLEXIO_Type *base, const flexio_config_t *userConfig)
 Configures the FlexIO with a FlexIO configuration. More...
 
void FLEXIO_Deinit (FLEXIO_Type *base)
 Gates the FlexIO clock. More...
 
uint32_t FLEXIO_GetInstance (FLEXIO_Type *base)
 Get instance number for FLEXIO module. More...
 

FlexIO Basic Operation

void FLEXIO_Reset (FLEXIO_Type *base)
 Resets the FlexIO module. More...
 
static void FLEXIO_Enable (FLEXIO_Type *base, bool enable)
 Enables the FlexIO module operation. More...
 
static uint32_t FLEXIO_ReadPinInput (FLEXIO_Type *base)
 Reads the input data on each of the FlexIO pins. More...
 
static uint8_t FLEXIO_GetShifterState (FLEXIO_Type *base)
 Gets the current state pointer for state mode use. More...
 
void FLEXIO_SetShifterConfig (FLEXIO_Type *base, uint8_t index, const flexio_shifter_config_t *shifterConfig)
 Configures the shifter with the shifter configuration. More...
 
void FLEXIO_SetTimerConfig (FLEXIO_Type *base, uint8_t index, const flexio_timer_config_t *timerConfig)
 Configures the timer with the timer configuration. More...
 

FlexIO Interrupt Operation

static void FLEXIO_EnableShifterStatusInterrupts (FLEXIO_Type *base, uint32_t mask)
 Enables the shifter status interrupt. More...
 
static void FLEXIO_DisableShifterStatusInterrupts (FLEXIO_Type *base, uint32_t mask)
 Disables the shifter status interrupt. More...
 
static void FLEXIO_EnableShifterErrorInterrupts (FLEXIO_Type *base, uint32_t mask)
 Enables the shifter error interrupt. More...
 
static void FLEXIO_DisableShifterErrorInterrupts (FLEXIO_Type *base, uint32_t mask)
 Disables the shifter error interrupt. More...
 
static void FLEXIO_EnableTimerStatusInterrupts (FLEXIO_Type *base, uint32_t mask)
 Enables the timer status interrupt. More...
 
static void FLEXIO_DisableTimerStatusInterrupts (FLEXIO_Type *base, uint32_t mask)
 Disables the timer status interrupt. More...
 

FlexIO Status Operation

static uint32_t FLEXIO_GetShifterStatusFlags (FLEXIO_Type *base)
 Gets the shifter status flags. More...
 
static void FLEXIO_ClearShifterStatusFlags (FLEXIO_Type *base, uint32_t mask)
 Clears the shifter status flags. More...
 
static uint32_t FLEXIO_GetShifterErrorFlags (FLEXIO_Type *base)
 Gets the shifter error flags. More...
 
static void FLEXIO_ClearShifterErrorFlags (FLEXIO_Type *base, uint32_t mask)
 Clears the shifter error flags. More...
 
static uint32_t FLEXIO_GetTimerStatusFlags (FLEXIO_Type *base)
 Gets the timer status flags. More...
 
static void FLEXIO_ClearTimerStatusFlags (FLEXIO_Type *base, uint32_t mask)
 Clears the timer status flags. More...
 

FlexIO DMA Operation

static void FLEXIO_EnableShifterStatusDMA (FLEXIO_Type *base, uint32_t mask, bool enable)
 Enables/disables the shifter status DMA. More...
 
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. More...
 
status_t FLEXIO_RegisterHandleIRQ (void *base, void *handle, flexio_isr_t isr)
 Registers the handle and the interrupt handler for the FlexIO-simulated peripheral. More...
 
status_t FLEXIO_UnregisterHandleIRQ (void *base)
 Unregisters the handle and the interrupt handler for the FlexIO-simulated peripheral. More...
 

Data Structure Documentation

struct flexio_config_t

Data Fields

bool enableFlexio
 Enable/disable FlexIO module.
 
bool enableInDoze
 Enable/disable FlexIO operation in doze mode.
 
bool enableInDebug
 Enable/disable FlexIO operation in debug mode.
 
bool 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. More...

 

Field Documentation

bool flexio_config_t::enableFastAccess
struct flexio_timer_config_t

Data Fields

uint32_t triggerSelect
 The internal trigger selection number using MACROs. More...
 
flexio_timer_trigger_polarity_t triggerPolarity
 Trigger Polarity. More...
 
flexio_timer_trigger_source_t triggerSource
 Trigger Source, internal (see 'trgsel') or external. More...
 
flexio_pin_config_t pinConfig
 Timer Pin Configuration. More...
 
uint32_t pinSelect
 Timer Pin number Select. More...
 
flexio_pin_polarity_t pinPolarity
 Timer Pin Polarity. More...
 
flexio_timer_mode_t timerMode
 Timer work Mode. More...
 
flexio_timer_output_t timerOutput
 
 Configures the initial state of the Timer Output and

whether it is affected by the Timer reset. More...

 
flexio_timer_decrement_source_t timerDecrement
 
 Configures the source of the Timer decrement and the

source of the Shift clock. More...

 
flexio_timer_reset_condition_t timerReset
 
 Configures the condition that causes the timer counter

(and optionally the timer output) to be reset. More...

 
flexio_timer_disable_condition_t timerDisable
 
 Configures the condition that causes the Timer to be

disabled and stop decrementing. More...

 
flexio_timer_enable_condition_t timerEnable
 
 Configures the condition that causes the Timer to be

enabled and start decrementing. More...

 
flexio_timer_stop_bit_condition_t timerStop
 Timer STOP Bit generation. More...
 
flexio_timer_start_bit_condition_t timerStart
 Timer STRAT Bit generation. More...
 
uint32_t timerCompare
 Value for Timer Compare N Register. More...
 

Field Documentation

uint32_t flexio_timer_config_t::triggerSelect
flexio_timer_trigger_polarity_t flexio_timer_config_t::triggerPolarity
flexio_timer_trigger_source_t flexio_timer_config_t::triggerSource
flexio_pin_config_t flexio_timer_config_t::pinConfig
uint32_t flexio_timer_config_t::pinSelect
flexio_pin_polarity_t flexio_timer_config_t::pinPolarity
flexio_timer_mode_t flexio_timer_config_t::timerMode
flexio_timer_output_t flexio_timer_config_t::timerOutput
flexio_timer_decrement_source_t flexio_timer_config_t::timerDecrement
flexio_timer_reset_condition_t flexio_timer_config_t::timerReset
flexio_timer_disable_condition_t flexio_timer_config_t::timerDisable
flexio_timer_enable_condition_t flexio_timer_config_t::timerEnable
flexio_timer_stop_bit_condition_t flexio_timer_config_t::timerStop
flexio_timer_start_bit_condition_t flexio_timer_config_t::timerStart
uint32_t flexio_timer_config_t::timerCompare
struct flexio_shifter_config_t

Data Fields

uint32_t timerSelect
 
Selects which Timer is used for controlling the

logic/shift register and generating the Shift clock. More...

 
flexio_shifter_timer_polarity_t timerPolarity
 Timer Polarity. More...
 
flexio_pin_config_t pinConfig
 Shifter Pin Configuration. More...
 
uint32_t pinSelect
 Shifter Pin number Select. More...
 
flexio_pin_polarity_t pinPolarity
 Shifter Pin Polarity. More...
 
flexio_shifter_mode_t shifterMode
 Configures the mode of the Shifter. More...
 
uint32_t parallelWidth
 Configures the parallel width when using parallel mode. More...
 
flexio_shifter_input_source_t inputSource
 Selects the input source for the shifter. More...
 
flexio_shifter_stop_bit_t shifterStop
 Shifter STOP bit. More...
 
flexio_shifter_start_bit_t shifterStart
 Shifter START bit. More...
 

Field Documentation

uint32_t flexio_shifter_config_t::timerSelect
flexio_shifter_timer_polarity_t flexio_shifter_config_t::timerPolarity
flexio_pin_config_t flexio_shifter_config_t::pinConfig
uint32_t flexio_shifter_config_t::pinSelect
flexio_pin_polarity_t flexio_shifter_config_t::pinPolarity
flexio_shifter_mode_t flexio_shifter_config_t::shifterMode
uint32_t flexio_shifter_config_t::parallelWidth
flexio_shifter_input_source_t flexio_shifter_config_t::inputSource
flexio_shifter_stop_bit_t flexio_shifter_config_t::shifterStop
flexio_shifter_start_bit_t flexio_shifter_config_t::shifterStart

Macro Definition Documentation

#define FSL_FLEXIO_DRIVER_VERSION   (MAKE_VERSION(2, 0, 3))
#define FLEXIO_TIMER_TRIGGER_SEL_PININPUT (   x)    ((uint32_t)(x) << 1U)

Typedef Documentation

typedef void(* flexio_isr_t)(void *base, void *handle)

Enumeration Type Documentation

Enumerator
kFLEXIO_TimerTriggerPolarityActiveHigh 

Active high.

kFLEXIO_TimerTriggerPolarityActiveLow 

Active low.

Enumerator
kFLEXIO_TimerTriggerSourceExternal 

External trigger selected.

kFLEXIO_TimerTriggerSourceInternal 

Internal trigger selected.

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.

Enumerator
kFLEXIO_PinActiveHigh 

Active high.

kFLEXIO_PinActiveLow 

Active low.

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.

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.

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.

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.

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.

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.

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.

Enumerator
kFLEXIO_TimerStartBitDisabled 

Start bit disabled.

kFLEXIO_TimerStartBitEnabled 

Start bit enabled.

Enumerator
kFLEXIO_ShifterTimerPolarityOnPositive 

Shift on positive edge of shift clock.

kFLEXIO_ShifterTimerPolarityOnNegitive 

Shift on negative edge of shift clock.

Enumerator
kFLEXIO_ShifterDisabled 

Shifter is disabled.

kFLEXIO_ShifterModeReceive 

Receive mode.

kFLEXIO_ShifterModeTransmit 

Transmit mode.

kFLEXIO_ShifterModeMatchStore 

Match store mode.

kFLEXIO_ShifterModeMatchContinuous 

Match continuous mode.

kFLEXIO_ShifterModeState 

SHIFTBUF contents are used for storing programmable state attributes.

kFLEXIO_ShifterModeLogic 

SHIFTBUF contents are used for implementing programmable logic look up table.

Enumerator
kFLEXIO_ShifterInputFromPin 

Shifter input from pin.

kFLEXIO_ShifterInputFromNextShifterOutput 

Shifter input from Shifter N+1.

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.

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.

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.

kFLEXIO_ShifterBufferNibbleByteSwapped 

Shifter Buffer N Nibble Byte Swapped Register.

kFLEXIO_ShifterBufferHalfWordSwapped 

Shifter Buffer N Half Word Swapped Register.

kFLEXIO_ShifterBufferNibbleSwapped 

Shifter Buffer N Nibble Swapped Register.

Function Documentation

void FLEXIO_GetDefaultConfig ( flexio_config_t userConfig)

The configuration can used directly to call the FLEXIO_Configure().

Example:

Parameters
userConfigpointer to flexio_config_t structure
void FLEXIO_Init ( FLEXIO_Type *  base,
const flexio_config_t userConfig 
)

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

Example

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

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
uint32_t FLEXIO_GetInstance ( FLEXIO_Type *  base)
Parameters
baseFLEXIO peripheral base address.
void FLEXIO_Reset ( FLEXIO_Type *  base)
Parameters
baseFlexIO peripheral base address
static void FLEXIO_Enable ( FLEXIO_Type *  base,
bool  enable 
)
inlinestatic
Parameters
baseFlexIO peripheral base address
enabletrue to enable, false to disable.
static uint32_t FLEXIO_ReadPinInput ( FLEXIO_Type *  base)
inlinestatic
Parameters
baseFlexIO peripheral base address
Returns
FlexIO pin input data
static uint8_t FLEXIO_GetShifterState ( FLEXIO_Type *  base)
inlinestatic
Parameters
baseFlexIO peripheral base address
Returns
current State pointer
void FLEXIO_SetShifterConfig ( FLEXIO_Type *  base,
uint8_t  index,
const flexio_shifter_config_t shifterConfig 
)

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,
};
FLEXIO_SetShifterConfig(base, &config);
Parameters
baseFlexIO peripheral base address
indexShifter index
shifterConfigPointer to flexio_shifter_config_t structure
void FLEXIO_SetTimerConfig ( FLEXIO_Type *  base,
uint8_t  index,
const flexio_timer_config_t timerConfig 
)

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

Parameters
baseFlexIO peripheral base address
indexTimer index
timerConfigPointer to the flexio_timer_config_t structure
static void FLEXIO_EnableShifterStatusInterrupts ( FLEXIO_Type *  base,
uint32_t  mask 
)
inlinestatic

The interrupt generates when the corresponding SSF is set.

Parameters
baseFlexIO peripheral base address
maskThe shifter status mask which can be calculated by (1 << shifter index)
Note
For multiple shifter status interrupt enable, for example, two shifter status enable, can calculate the mask by using ((1 << shifter index0) | (1 << shifter index1))
static void FLEXIO_DisableShifterStatusInterrupts ( FLEXIO_Type *  base,
uint32_t  mask 
)
inlinestatic

The interrupt won't generate when the corresponding SSF is set.

Parameters
baseFlexIO peripheral base address
maskThe shifter status mask which can be calculated by (1 << shifter index)
Note
For multiple shifter status interrupt enable, for example, two shifter status enable, can calculate the mask by using ((1 << shifter index0) | (1 << shifter index1))
static void FLEXIO_EnableShifterErrorInterrupts ( FLEXIO_Type *  base,
uint32_t  mask 
)
inlinestatic

The interrupt generates when the corresponding SEF is set.

Parameters
baseFlexIO peripheral base address
maskThe shifter error mask which can be calculated by (1 << shifter index)
Note
For multiple shifter error interrupt enable, for example, two shifter error enable, can calculate the mask by using ((1 << shifter index0) | (1 << shifter index1))
static void FLEXIO_DisableShifterErrorInterrupts ( FLEXIO_Type *  base,
uint32_t  mask 
)
inlinestatic

The interrupt won't generate when the corresponding SEF is set.

Parameters
baseFlexIO peripheral base address
maskThe shifter error mask which can be calculated by (1 << shifter index)
Note
For multiple shifter error interrupt enable, for example, two shifter error enable, can calculate the mask by using ((1 << shifter index0) | (1 << shifter index1))
static void FLEXIO_EnableTimerStatusInterrupts ( FLEXIO_Type *  base,
uint32_t  mask 
)
inlinestatic

The interrupt generates when the corresponding SSF is set.

Parameters
baseFlexIO peripheral base address
maskThe timer status mask which can be calculated by (1 << timer index)
Note
For multiple timer status interrupt enable, for example, two timer status enable, can calculate the mask by using ((1 << timer index0) | (1 << timer index1))
static void FLEXIO_DisableTimerStatusInterrupts ( FLEXIO_Type *  base,
uint32_t  mask 
)
inlinestatic

The interrupt won't generate when the corresponding SSF is set.

Parameters
baseFlexIO peripheral base address
maskThe timer status mask which can be calculated by (1 << timer index)
Note
For multiple timer status interrupt enable, for example, two timer status enable, can calculate the mask by using ((1 << timer index0) | (1 << timer index1))
static uint32_t FLEXIO_GetShifterStatusFlags ( FLEXIO_Type *  base)
inlinestatic
Parameters
baseFlexIO peripheral base address
Returns
Shifter status flags
static void FLEXIO_ClearShifterStatusFlags ( FLEXIO_Type *  base,
uint32_t  mask 
)
inlinestatic
Parameters
baseFlexIO peripheral base address
maskThe shifter status mask which can be calculated by (1 << shifter index)
Note
For clearing multiple shifter status flags, for example, two shifter status flags, can calculate the mask by using ((1 << shifter index0) | (1 << shifter index1))
static uint32_t FLEXIO_GetShifterErrorFlags ( FLEXIO_Type *  base)
inlinestatic
Parameters
baseFlexIO peripheral base address
Returns
Shifter error flags
static void FLEXIO_ClearShifterErrorFlags ( FLEXIO_Type *  base,
uint32_t  mask 
)
inlinestatic
Parameters
baseFlexIO peripheral base address
maskThe shifter error mask which can be calculated by (1 << shifter index)
Note
For clearing multiple shifter error flags, for example, two shifter error flags, can calculate the mask by using ((1 << shifter index0) | (1 << shifter index1))
static uint32_t FLEXIO_GetTimerStatusFlags ( FLEXIO_Type *  base)
inlinestatic
Parameters
baseFlexIO peripheral base address
Returns
Timer status flags
static void FLEXIO_ClearTimerStatusFlags ( FLEXIO_Type *  base,
uint32_t  mask 
)
inlinestatic
Parameters
baseFlexIO peripheral base address
maskThe timer status mask which can be calculated by (1 << timer index)
Note
For clearing multiple timer status flags, for example, two timer status flags, can calculate the mask by using ((1 << timer index0) | (1 << timer index1))
static void FLEXIO_EnableShifterStatusDMA ( FLEXIO_Type *  base,
uint32_t  mask,
bool  enable 
)
inlinestatic

The DMA request generates when the corresponding SSF is set.

Note
For multiple shifter status DMA enables, for example, calculate the mask by using ((1 << shifter index0) | (1 << shifter index1))
Parameters
baseFlexIO peripheral base address
maskThe shifter status mask which can be calculated by (1 << shifter index)
enableTrue to enable, false to disable.
uint32_t FLEXIO_GetShifterBufferAddress ( FLEXIO_Type *  base,
flexio_shifter_buffer_type_t  type,
uint8_t  index 
)
Parameters
baseFlexIO peripheral base address
typeShifter type of flexio_shifter_buffer_type_t
indexShifter index
Returns
Corresponding shifter buffer index
status_t FLEXIO_RegisterHandleIRQ ( void *  base,
void *  handle,
flexio_isr_t  isr 
)
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.
status_t FLEXIO_UnregisterHandleIRQ ( void *  base)
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.

Variable Documentation

FLEXIO_Type* const s_flexioBases[]
const clock_ip_name_t s_flexioClocks[]