S32 SDK
flexio_hal.h File Reference
#include <stdbool.h>
#include "device_registers.h"

Go to the source code of this file.

Data Structures

struct  flexio_version_info_t
 FlexIO module version number Implements : flexio_version_info_t_Class. More...
 

Enumerations

enum  flexio_timer_polarity_t { FLEXIO_TIMER_POLARITY_POSEDGE = 0x00U, FLEXIO_TIMER_POLARITY_NEGEDGE = 0x01U }
 Shift clock polarity options Implements : flexio_timer_polarity_t_Class. More...
 
enum  flexio_pin_polarity_t { FLEXIO_PIN_POLARITY_HIGH = 0x00U, FLEXIO_PIN_POLARITY_LOW = 0x01U }
 Pin polarity options Implements : flexio_pin_polarity_t_Class. More...
 
enum  flexio_pin_config_t { FLEXIO_PIN_CONFIG_DISABLED = 0x00U, FLEXIO_PIN_CONFIG_OPEN_DRAIN = 0x01U, FLEXIO_PIN_CONFIG_BIDIR_OUTPUT = 0x02U, FLEXIO_PIN_CONFIG_OUTPUT = 0x03U }
 Pin configuration options Implements : flexio_pin_config_t_Class. More...
 
enum  flexio_shifter_mode_t {
  FLEXIO_SHIFTER_MODE_DISABLED = 0x00U, FLEXIO_SHIFTER_MODE_RECEIVE = 0x01U, FLEXIO_SHIFTER_MODE_TRANSMIT = 0x02U, FLEXIO_SHIFTER_MODE_MATCH_STORE = 0x04U,
  FLEXIO_SHIFTER_MODE_MATCH_CONTINUOUS = 0x05U
}
 Shifter mode options Implements : flexio_shifter_mode_t_Class. More...
 
enum  flexio_shifter_source_t { FLEXIO_SHIFTER_SOURCE_PIN = 0x00U, FLEXIO_SHIFTER_SOURCE_SHIFTER = 0x01U }
 Shifter input source options Implements : flexio_shifter_source_t_Class. More...
 
enum  flexio_shifter_buffer_mode_t { FLEXIO_SHIFTER_RW_MODE_NORMAL = 0x00U, FLEXIO_SHIFTER_RW_MODE_BIT_SWAP = 0x01U, FLEXIO_SHIFTER_RW_MODE_BYTE_SWAP = 0x02U, FLEXIO_SHIFTER_RW_MODE_BB_SWAP = 0x03U }
 Read/Write mode for shifter buffer Implements : flexio_shifter_buffer_mode_t_Class. More...
 
enum  flexio_trigger_polarity_t { FLEXIO_TRIGGER_POLARITY_HIGH = 0x00U, FLEXIO_TRIGGER_POLARITY_LOW = 0x01U }
 Trigger polarity Implements : flexio_trigger_polarity_t_Class. More...
 
enum  flexio_trigger_source_t { FLEXIO_TRIGGER_SOURCE_EXTERNAL = 0x00U, FLEXIO_TRIGGER_SOURCE_INTERNAL = 0x01U }
 Trigger sources Implements : flexio_trigger_source_t_Class. More...
 
enum  flexio_timer_mode_t { FLEXIO_TIMER_MODE_DISABLED = 0x00U, FLEXIO_TIMER_MODE_8BIT_BAUD = 0x01U, FLEXIO_TIMER_MODE_8BIT_PWM = 0x02U, FLEXIO_TIMER_MODE_16BIT = 0x03U }
 Timer mode options Implements : flexio_timer_mode_t_Class. More...
 
enum  flexio_timer_output_t { FLEXIO_TIMER_INITOUT_ONE = 0x00U, FLEXIO_TIMER_INITOUT_ZERO = 0x01U, FLEXIO_TIMER_INITOUT_ONE_RESET = 0x02U, FLEXIO_TIMER_INITOUT_ZERO_RESET = 0x03U }
 Timer initial output options Implements : flexio_timer_output_t_Class. More...
 
enum  flexio_timer_decrement_t { FLEXIO_TIMER_DECREMENT_CLK_SHIFT_TMR = 0x00U, FLEXIO_TIMER_DECREMENT_TRG_SHIFT_TMR = 0x01U, FLEXIO_TIMER_DECREMENT_PIN_SHIFT_PIN = 0x02U, FLEXIO_TIMER_DECREMENT_TRG_SHIFT_TRG = 0x03U }
 Timer decrement options Implements : flexio_timer_decrement_t_Class. More...
 
enum  flexio_timer_reset_t {
  FLEXIO_TIMER_RESET_NEVER = 0x00U, FLEXIO_TIMER_RESET_PIN_OUT = 0x02U, FLEXIO_TIMER_RESET_TRG_OUT = 0x03U, FLEXIO_TIMER_RESET_PIN_RISING = 0x04U,
  FLEXIO_TIMER_RESET_TRG_RISING = 0x06U, FLEXIO_TIMER_RESET_TRG_BOTH = 0x07U
}
 Timer reset options Implements : flexio_timer_reset_t_Class. More...
 
enum  flexio_timer_disable_t {
  FLEXIO_TIMER_DISABLE_NEVER = 0x00U, FLEXIO_TIMER_DISABLE_TIM_DISABLE = 0x01U, FLEXIO_TIMER_DISABLE_TIM_CMP = 0x02U, FLEXIO_TIMER_DISABLE_TIM_CMP_TRG_LOW = 0x03U,
  FLEXIO_TIMER_DISABLE_PIN = 0x04U, FLEXIO_TIMER_DISABLE_PIN_TRG_HIGH = 0x05U, FLEXIO_TIMER_DISABLE_TRG = 0x06U
}
 Timer disable options Implements : flexio_timer_disable_t_Class. More...
 
enum  flexio_timer_enable_t {
  FLEXIO_TIMER_ENABLE_ALWAYS = 0x00U, FLEXIO_TIMER_ENABLE_TIM_ENABLE = 0x01U, FLEXIO_TIMER_ENABLE_TRG_HIGH = 0x02U, FLEXIO_TIMER_ENABLE_TRG_PIN_HIGH = 0x03U,
  FLEXIO_TIMER_ENABLE_PIN_POSEDGE = 0x04U, FLEXIO_TIMER_ENABLE_PIN_POSEDGE_TRG_HIGH = 0x05U, FLEXIO_TIMER_ENABLE_TRG_POSEDGE = 0x06U, FLEXIO_TIMER_ENABLE_TRG_EDGE = 0x07U
}
 Timer disable options Implements : flexio_timer_enable_t_Class. More...
 
enum  flexio_timer_stop_t { FLEXIO_TIMER_STOP_BIT_DISABLED = 0x00U, FLEXIO_TIMER_STOP_BIT_TIM_CMP = 0x01U, FLEXIO_TIMER_STOP_BIT_TIM_DIS = 0x02U, FLEXIO_TIMER_STOP_BIT_TIM_CMP_DIS = 0x03U }
 Timer stop bit options Implements : flexio_timer_stop_t_Class. More...
 
enum  flexio_shifter_stop_t { FLEXIO_SHIFTER_STOP_BIT_DISABLED = 0x00U, FLEXIO_SHIFTER_STOP_BIT_0 = 0x02U, FLEXIO_SHIFTER_STOP_BIT_1 = 0x03U }
 Timer stop bit options - for Transmit, Receive or Match Store modes only Implements : flexio_shifter_stop_t_Class. More...
 
enum  flexio_shifter_start_t { FLEXIO_SHIFTER_START_BIT_DISABLED = 0x00U, FLEXIO_SHIFTER_START_BIT_DISABLED_SH = 0x01U, FLEXIO_SHIFTER_START_BIT_0 = 0x02U, FLEXIO_SHIFTER_START_BIT_1 = 0x03U }
 Timer start bit options - for Transmit, Receive or Match Store modes only Implements : flexio_shifter_start_t_Class. More...
 
enum  flexio_timer_start_t { FLEXIO_TIMER_START_BIT_DISABLED = 0x00U, FLEXIO_TIMER_START_BIT_ENABLED = 0x01U }
 Timer start bit options Implements : flexio_timer_start_t_Class. More...
 

Functions

Template Group
static void FLEXIO_HAL_GetVersion (const FLEXIO_Type *baseAddr, flexio_version_info_t *versionInfo)
 Reads the version of the FlexIO module. More...
 
static uint8_t FLEXIO_HAL_GetTriggerNum (const FLEXIO_Type *baseAddr)
 Returns the number of external triggers of the FlexIO module. More...
 
static uint8_t FLEXIO_HAL_GetPinNum (const FLEXIO_Type *baseAddr)
 Returns the number of pins of the FlexIO module. More...
 
static uint8_t FLEXIO_HAL_GetTimerNum (const FLEXIO_Type *baseAddr)
 Returns the number of timers of the FlexIO module. More...
 
static uint8_t FLEXIO_HAL_GetShifterNum (const FLEXIO_Type *baseAddr)
 Returns the number of shifters of the FlexIO module. More...
 
static bool FLEXIO_HAL_GetDozeMode (const FLEXIO_Type *baseAddr)
 Returns the current doze mode setting. More...
 
static void FLEXIO_HAL_SetDozeMode (FLEXIO_Type *baseAddr, bool enable)
 Set the FlexIO module behavior in doze mode. More...
 
static bool FLEXIO_HAL_GetDebugMode (const FLEXIO_Type *baseAddr)
 Returns the current debug mode setting. More...
 
static void FLEXIO_HAL_SetDebugMode (FLEXIO_Type *baseAddr, bool enable)
 Set the FlexIO module behavior in debug mode. More...
 
static bool FLEXIO_HAL_GetFastAccess (const FLEXIO_Type *baseAddr)
 Returns the current fast access setting. More...
 
static void FLEXIO_HAL_SetFastAccess (FLEXIO_Type *baseAddr, bool enable)
 Configure the FlexIO fast access feature. More...
 
static bool FLEXIO_HAL_GetSoftwareReset (const FLEXIO_Type *baseAddr)
 Returns the current software reset state. More...
 
static void FLEXIO_HAL_SetSoftwareReset (FLEXIO_Type *baseAddr, bool enable)
 Set/clear the FlexIO reset command. More...
 
static bool FLEXIO_HAL_GetEnable (const FLEXIO_Type *baseAddr)
 Returns the current enable/disable setting of the FlexIO. More...
 
static void FLEXIO_HAL_SetEnable (FLEXIO_Type *baseAddr, bool enable)
 Enables of disables the FlexIO module. More...
 
static uint8_t FLEXIO_HAL_GetPinData (const FLEXIO_Type *baseAddr)
 Returns the current input data read from the FlexIO pins. More...
 
static bool FLEXIO_HAL_GetShifterStatus (const FLEXIO_Type *baseAddr, uint8_t shifter)
 Returns the current status of the specified shifter. More...
 
static uint32_t FLEXIO_HAL_GetAllShifterStatus (const FLEXIO_Type *baseAddr)
 Returns the current status flags for all shifters. More...
 
static void FLEXIO_HAL_ClearShifterStatus (FLEXIO_Type *baseAddr, uint8_t shifter)
 Clears the status of the specified shifter. More...
 
static bool FLEXIO_HAL_GetShifterErrorStatus (const FLEXIO_Type *baseAddr, uint8_t shifter)
 Returns the current error status of the specified shifter. More...
 
static uint32_t FLEXIO_HAL_GetAllShifterErrorStatus (const FLEXIO_Type *baseAddr)
 Returns the current error status for all shifters. More...
 
static void FLEXIO_HAL_ClearShifterErrorStatus (FLEXIO_Type *baseAddr, uint8_t shifter)
 Clears the error status of the specified shifter. More...
 
static bool FLEXIO_HAL_GetTimerStatus (const FLEXIO_Type *baseAddr, uint8_t timer)
 Returns the current status of the specified timer. More...
 
static uint32_t FLEXIO_HAL_GetAllTimerStatus (const FLEXIO_Type *baseAddr)
 Returns the current status of all timers. More...
 
static void FLEXIO_HAL_ClearTimerStatus (FLEXIO_Type *baseAddr, uint8_t timer)
 Clears the status of the specified timer. More...
 
static bool FLEXIO_HAL_GetShifterInterrupt (const FLEXIO_Type *baseAddr, uint8_t interruptNo)
 Returns the current status of the shifter interrupts. More...
 
static uint32_t FLEXIO_HAL_GetAllShifterInterrupt (const FLEXIO_Type *baseAddr)
 Returns the current status of all the shifter interrupts. More...
 
static void FLEXIO_HAL_SetShifterInterrupt (FLEXIO_Type *baseAddr, uint8_t interruptMask, bool enable)
 Enables or disables the shifter interrupts. More...
 
static bool FLEXIO_HAL_GetShifterErrorInterrupt (const FLEXIO_Type *baseAddr, uint8_t interruptNo)
 Returns the current status of the shifter error interrupts. More...
 
static uint32_t FLEXIO_HAL_GetAllShifterErrorInterrupt (const FLEXIO_Type *baseAddr)
 Returns the current status of all the shifter error interrupts. More...
 
static void FLEXIO_HAL_SetShifterErrorInterrupt (FLEXIO_Type *baseAddr, uint8_t interruptMask, bool enable)
 Enables or disables the shifter error interrupts. More...
 
static bool FLEXIO_HAL_GetTimerInterrupt (const FLEXIO_Type *baseAddr, uint8_t interruptNo)
 Returns the current status of the timer interrupts. More...
 
static uint32_t FLEXIO_HAL_GetAllTimerInterrupt (const FLEXIO_Type *baseAddr)
 Returns the current status of all the timer interrupts. More...
 
static void FLEXIO_HAL_SetTimerInterrupt (FLEXIO_Type *baseAddr, uint8_t interruptMask, bool enable)
 Enables or disables the timer interrupts. More...
 
static bool FLEXIO_HAL_GetShifterDMARequest (const FLEXIO_Type *baseAddr, uint8_t requestNo)
 Returns the current status of the shifter DMA requests. More...
 
static void FLEXIO_HAL_SetShifterDMARequest (FLEXIO_Type *baseAddr, uint8_t requestMask, bool enable)
 Enables or disables the shifter DMA requests. More...
 
static void FLEXIO_HAL_GetShifterTimer (const FLEXIO_Type *baseAddr, uint8_t shifter, uint8_t *timer, flexio_timer_polarity_t *polarity)
 Returns the timer currently assigned to control the specified shifter. More...
 
static void FLEXIO_HAL_SetShifterTimer (FLEXIO_Type *baseAddr, uint8_t shifter, uint8_t timer, flexio_timer_polarity_t polarity)
 Assigns the specified timer to control the specified shifter. More...
 
static void FLEXIO_HAL_GetShifterPin (const FLEXIO_Type *baseAddr, uint8_t shifter, uint8_t *pin, flexio_pin_polarity_t *polarity, flexio_pin_config_t *config)
 Returns the pin currently assigned to the specified shifter, and its configured settings. More...
 
static void FLEXIO_HAL_SetShifterPin (FLEXIO_Type *baseAddr, uint8_t shifter, uint8_t pin, flexio_pin_polarity_t polarity, flexio_pin_config_t config)
 Assigns the specified pin to the specified shifter. More...
 
static void FLEXIO_HAL_SetShifterPinConfig (FLEXIO_Type *baseAddr, uint8_t shifter, flexio_pin_config_t config)
 Configures the pin assigned to the specified shifter. More...
 
static flexio_shifter_mode_t FLEXIO_HAL_GetShifterMode (const FLEXIO_Type *baseAddr, uint8_t shifter)
 Returns the mode of the specified shifter. More...
 
static void FLEXIO_HAL_SetShifterMode (FLEXIO_Type *baseAddr, uint8_t shifter, flexio_shifter_mode_t mode)
 Sets the mode of the specified shifter. More...
 
static void FLEXIO_HAL_SetShifterControl (FLEXIO_Type *baseAddr, uint8_t shifter, flexio_shifter_mode_t mode, uint8_t pin, flexio_pin_polarity_t pinPolarity, flexio_pin_config_t pinConfig, uint8_t timer, flexio_timer_polarity_t timerPolarity)
 Sets all control settings for the specified shifter. More...
 
static flexio_shifter_source_t FLEXIO_HAL_GetShifterInputSource (const FLEXIO_Type *baseAddr, uint8_t shifter)
 Returns the input source of the specified shifter. More...
 
static void FLEXIO_HAL_SetShifterInputSource (FLEXIO_Type *baseAddr, uint8_t shifter, flexio_shifter_source_t source)
 Configures the input source of the specified shifter. More...
 
static flexio_shifter_stop_t FLEXIO_HAL_GetShifterStopBit (const FLEXIO_Type *baseAddr, uint8_t shifter)
 Returns the stop bit configuration for the specified shifter. More...
 
static void FLEXIO_HAL_SetShifterStopBit (FLEXIO_Type *baseAddr, uint8_t shifter, flexio_shifter_stop_t stop)
 Configures the stop bit of the specified shifter. More...
 
static flexio_shifter_start_t FLEXIO_HAL_GetShifterStartBit (const FLEXIO_Type *baseAddr, uint8_t shifter)
 Returns the start bit configuration for the specified shifter. More...
 
static void FLEXIO_HAL_SetShifterStartBit (FLEXIO_Type *baseAddr, uint8_t shifter, flexio_shifter_start_t start)
 Configures the start bit of the specified shifter. More...
 
static void FLEXIO_HAL_SetShifterConfig (FLEXIO_Type *baseAddr, uint8_t shifter, flexio_shifter_start_t start, flexio_shifter_stop_t stop, flexio_shifter_source_t source)
 Sets all configuration settings for specified shifter. More...
 
static uint32_t FLEXIO_HAL_ReadShifterBuffer (const FLEXIO_Type *baseAddr, uint8_t shifter, flexio_shifter_buffer_mode_t mode)
 Reads the value from the specified shifter buffer. More...
 
static void FLEXIO_HAL_WriteShifterBuffer (FLEXIO_Type *baseAddr, uint8_t shifter, uint32_t value, flexio_shifter_buffer_mode_t mode)
 Writes a value in the specified shifter buffer. More...
 
static void FLEXIO_HAL_GetTimerTrigger (const FLEXIO_Type *baseAddr, uint8_t timer, uint8_t *trigger, flexio_trigger_polarity_t *polarity, flexio_trigger_source_t *source)
 Returns the currently configured trigger for the specified timer. More...
 
static void FLEXIO_HAL_SetTimerTrigger (FLEXIO_Type *baseAddr, uint8_t timer, uint8_t trigger, flexio_trigger_polarity_t polarity, flexio_trigger_source_t source)
 Configures the trigger for the specified timer. More...
 
static void FLEXIO_HAL_GetTimerPin (const FLEXIO_Type *baseAddr, uint8_t timer, uint8_t *pin, flexio_pin_polarity_t *polarity, flexio_pin_config_t *config)
 Returns the currently configured pin for the specified timer. More...
 
static void FLEXIO_HAL_SetTimerPin (FLEXIO_Type *baseAddr, uint8_t timer, uint8_t pin, flexio_pin_polarity_t polarity, flexio_pin_config_t config)
 Configures the pin for the specified timer. More...
 
static flexio_timer_mode_t FLEXIO_HAL_GetTimerMode (const FLEXIO_Type *baseAddr, uint8_t timer)
 Returns the mode of the specified timer. More...
 
static void FLEXIO_HAL_SetTimerMode (FLEXIO_Type *baseAddr, uint8_t timer, flexio_timer_mode_t mode)
 Sets the mode of the specified timer. More...
 
static void FLEXIO_HAL_SetTimerControl (FLEXIO_Type *baseAddr, uint8_t timer, uint8_t trigger, flexio_trigger_polarity_t triggerPolarity, flexio_trigger_source_t triggerSource, uint8_t pin, flexio_pin_polarity_t pinPolarity, flexio_pin_config_t pinConfig, flexio_timer_mode_t mode)
 Sets all control settings for specified timer. More...
 
static flexio_timer_output_t FLEXIO_HAL_GetTimerInitialOutput (const FLEXIO_Type *baseAddr, uint8_t timer)
 Returns the initial output configuration of the specified timer. More...
 
static void FLEXIO_HAL_SetTimerInitialOutput (FLEXIO_Type *baseAddr, uint8_t timer, flexio_timer_output_t output)
 Configures the initial output of the specified timer. More...
 
static flexio_timer_decrement_t FLEXIO_HAL_GetTimerDecrement (const FLEXIO_Type *baseAddr, uint8_t timer)
 Returns the decrement configuration of the specified timer. More...
 
static void FLEXIO_HAL_SetTimerDecrement (FLEXIO_Type *baseAddr, uint8_t timer, flexio_timer_decrement_t decrement)
 Configures the decrement condition for the specified timer. More...
 
static flexio_timer_reset_t FLEXIO_HAL_GetTimerReset (const FLEXIO_Type *baseAddr, uint8_t timer)
 Returns the reset configuration of the specified timer. More...
 
static void FLEXIO_HAL_SetTimerReset (FLEXIO_Type *baseAddr, uint8_t timer, flexio_timer_reset_t reset)
 Configures the reset condition for the specified timer. More...
 
static flexio_timer_disable_t FLEXIO_HAL_GetTimerDisable (const FLEXIO_Type *baseAddr, uint8_t timer)
 Returns the disable configuration of the specified timer. More...
 
static void FLEXIO_HAL_SetTimerDisable (FLEXIO_Type *baseAddr, uint8_t timer, flexio_timer_disable_t disable)
 Configures the disable condition for the specified timer. More...
 
static flexio_timer_enable_t FLEXIO_HAL_GetTimerEnable (const FLEXIO_Type *baseAddr, uint8_t timer)
 Returns the enable condition configuration of the specified timer. More...
 
static void FLEXIO_HAL_SetTimerEnable (FLEXIO_Type *baseAddr, uint8_t timer, flexio_timer_enable_t enable)
 Configures the enable condition for the specified timer. More...
 
static flexio_timer_stop_t FLEXIO_HAL_GetTimerStop (const FLEXIO_Type *baseAddr, uint8_t timer)
 Returns the stop bit configuration of the specified timer. More...
 
static void FLEXIO_HAL_SetTimerStop (FLEXIO_Type *baseAddr, uint8_t timer, flexio_timer_stop_t stop)
 Configures the stop bit for the specified timer. More...
 
static flexio_timer_start_t FLEXIO_HAL_GetTimerStart (const FLEXIO_Type *baseAddr, uint8_t timer)
 Returns the start bit configuration of the specified timer. More...
 
static void FLEXIO_HAL_SetTimerStart (FLEXIO_Type *baseAddr, uint8_t timer, flexio_timer_start_t start)
 Configures the start bit for the specified timer. More...
 
static void FLEXIO_HAL_SetTimerConfig (FLEXIO_Type *baseAddr, uint8_t timer, flexio_timer_start_t start, flexio_timer_stop_t stop, flexio_timer_enable_t enable, flexio_timer_disable_t disable, flexio_timer_reset_t reset, flexio_timer_decrement_t decrement, flexio_timer_output_t output)
 Sets all configuration settings for specified timer. More...
 
static uint16_t FLEXIO_HAL_GetTimerCompare (const FLEXIO_Type *baseAddr, uint8_t timer)
 Returns the compare value of the specified timer. More...
 
static void FLEXIO_HAL_SetTimerCompare (FLEXIO_Type *baseAddr, uint8_t timer, uint16_t value)
 Configures the compare value for the specified timer. More...
 
void FLEXIO_HAL_Init (FLEXIO_Type *baseAddr)
 Initializes the FlexIO module to a known state. More...