PDL for FM0+  Version1.0
Peripheral Driverl Library for FM0+
Multi Function Serial Interface (MFS)

Data Structures

struct  stc_mfs_fifo_config
 Mfs FIFO configuration. More...
struct  stc_uart_int_sel
 UART interrupt selection. More...
struct  stc_uart_int_cb
 UART interrupt callback function. More...
struct  stc_mfs_uart_config
 UART configuration structure. More...
struct  stc_csio_serial_timer
 CSIO serial timer configuration. More...
struct  stc_csio_cs
 CSIO chip selection configuration. More...
struct  stc_csio_int_sel
 CSIO interrupt selection. More...
struct  stc_csio_int_cb
 CSIO interrupt callback function. More...
struct  stc_mfs_csio_config
 CSIO configuration structure. More...
struct  stc_i2c_int_sel
 I2C interrupt selection. More...
struct  stc_i2c_int_cb
 I2C interrupt callback function. More...
struct  stc_mfs_i2c_config
 I2C configuration structure. More...
struct  stc_lin_int_sel
 LIN interrupt selection. More...
struct  stc_lin_int_cb
 LIN interrupt callback function. More...
struct  stc_mfs_lin_config
 LIN configuration structure. More...
struct  stc_mfsn
 MFS common instance structure. More...
struct  stc_mfs_intern_data
 MFS module internal data, storing internal information for each enabled MFS instance. More...
struct  stc_mfs_instance_data
 MFS instance data type. More...

Defines

#define UartInstanceToIndex(Instance)   ((uint32_t)Instance - (uint32_t)&UART0)/0x100u
#define CsioInstanceToIndex(Instance)   ((uint32_t)Instance - (uint32_t)&CSIO0)/0x100u
#define I2cInstanceToIndex(Instance)   ((uint32_t)Instance - (uint32_t)&I2C0)/0x100u
#define LinInstanceToIndex(Instance)   ((uint32_t)Instance - (uint32_t)&LIN0)/0x100u
#define stc_mfsn_uart_t   FM0P_MFS_UART_TypeDef
#define stc_mfsn_csio_t   FM0P_MFS_CSIO_TypeDef
#define stc_mfsn_i2c_t   FM0P_MFS_I2C_TypeDef
#define stc_mfsn_lin_t   FM0P_MFS_LIN_TypeDef
#define UART0   (*((volatile stc_mfsn_uart_t *) FM0P_MFS0_UART_BASE))
#define UART1   (*((volatile stc_mfsn_uart_t *) FM0P_MFS1_UART_BASE))
#define UART2   (*((volatile stc_mfsn_uart_t *) FM0P_MFS2_UART_BASE))
#define UART3   (*((volatile stc_mfsn_uart_t *) FM0P_MFS3_UART_BASE))
#define UART4   (*((volatile stc_mfsn_uart_t *) FM0P_MFS4_UART_BASE))
#define UART5   (*((volatile stc_mfsn_uart_t *) FM0P_MFS5_UART_BASE))
#define UART6   (*((volatile stc_mfsn_uart_t *) FM0P_MFS6_UART_BASE))
#define UART7   (*((volatile stc_mfsn_uart_t *) FM0P_MFS7_UART_BASE))
#define UART8   (*((volatile stc_mfsn_uart_t *) FM0P_MFS8_UART_BASE))
#define UART9   (*((volatile stc_mfsn_uart_t *) FM0P_MFS9_UART_BASE))
#define UART10   (*((volatile stc_mfsn_uart_t *) FM0P_MFS10_UART_BASE))
#define UART11   (*((volatile stc_mfsn_uart_t *) FM0P_MFS11_UART_BASE))
#define UART12   (*((volatile stc_mfsn_uart_t *) FM0P_MFS12_UART_BASE))
#define UART13   (*((volatile stc_mfsn_uart_t *) FM0P_MFS13_UART_BASE))
#define UART14   (*((volatile stc_mfsn_uart_t *) FM0P_MFS14_UART_BASE))
#define UART15   (*((volatile stc_mfsn_uart_t *) FM0P_MFS15_UART_BASE))
#define CSIO0   (*((volatile stc_mfsn_csio_t *) FM0P_MFS0_CSIO_BASE))
#define CSIO1   (*((volatile stc_mfsn_csio_t *) FM0P_MFS1_CSIO_BASE))
#define CSIO2   (*((volatile stc_mfsn_csio_t *) FM0P_MFS2_CSIO_BASE))
#define CSIO3   (*((volatile stc_mfsn_csio_t *) FM0P_MFS3_CSIO_BASE))
#define CSIO4   (*((volatile stc_mfsn_csio_t *) FM0P_MFS4_CSIO_BASE))
#define CSIO5   (*((volatile stc_mfsn_csio_t *) FM0P_MFS5_CSIO_BASE))
#define CSIO6   (*((volatile stc_mfsn_csio_t *) FM0P_MFS6_CSIO_BASE))
#define CSIO7   (*((volatile stc_mfsn_csio_t *) FM0P_MFS7_CSIO_BASE))
#define CSIO8   (*((volatile stc_mfsn_csio_t *) FM0P_MFS8_CSIO_BASE))
#define CSIO9   (*((volatile stc_mfsn_csio_t *) FM0P_MFS9_CSIO_BASE))
#define CSIO10   (*((volatile stc_mfsn_csio_t *) FM0P_MFS10_CSIO_BASE))
#define CSIO11   (*((volatile stc_mfsn_csio_t *) FM0P_MFS11_CSIO_BASE))
#define CSIO12   (*((volatile stc_mfsn_csio_t *) FM0P_MFS12_CSIO_BASE))
#define CSIO13   (*((volatile stc_mfsn_csio_t *) FM0P_MFS13_CSIO_BASE))
#define CSIO14   (*((volatile stc_mfsn_csio_t *) FM0P_MFS14_CSIO_BASE))
#define CSIO15   (*((volatile stc_mfsn_csio_t *) FM0P_MFS15_CSIO_BASE))
#define I2C0   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS0_I2C_BASE))
#define I2C1   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS1_I2C_BASE))
#define I2C2   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS2_I2C_BASE))
#define I2C3   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS3_I2C_BASE))
#define I2C4   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS4_I2C_BASE))
#define I2C5   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS5_I2C_BASE))
#define I2C6   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS6_I2C_BASE))
#define I2C7   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS7_I2C_BASE))
#define I2C8   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS8_I2C_BASE))
#define I2C9   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS9_I2C_BASE))
#define I2C10   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS10_I2C_BASE))
#define I2C11   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS11_I2C_BASE))
#define I2C12   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS12_I2C_BASE))
#define I2C13   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS13_I2C_BASE))
#define I2C14   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS14_I2C_BASE))
#define I2C15   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS15_I2C_BASE))
#define LIN0   (*((volatile stc_mfsn_lin_t *) FM0P_MFS0_LIN_BASE))
#define LIN1   (*((volatile stc_mfsn_lin_t *) FM0P_MFS1_LIN_BASE))
#define LIN2   (*((volatile stc_mfsn_lin_t *) FM0P_MFS2_LIN_BASE))
#define LIN3   (*((volatile stc_mfsn_lin_t *) FM0P_MFS3_LIN_BASE))
#define LIN4   (*((volatile stc_mfsn_lin_t *) FM0P_MFS4_LIN_BASE))
#define LIN5   (*((volatile stc_mfsn_lin_t *) FM0P_MFS5_LIN_BASE))
#define LIN6   (*((volatile stc_mfsn_lin_t *) FM0P_MFS6_LIN_BASE))
#define LIN7   (*((volatile stc_mfsn_lin_t *) FM0P_MFS7_LIN_BASE))
#define LIN8   (*((volatile stc_mfsn_lin_t *) FM0P_MFS8_LIN_BASE))
#define LIN9   (*((volatile stc_mfsn_lin_t *) FM0P_MFS9_LIN_BASE))
#define LIN10   (*((volatile stc_mfsn_lin_t *) FM0P_MFS10_LIN_BASE))
#define LIN11   (*((volatile stc_mfsn_lin_t *) FM0P_MFS11_LIN_BASE))
#define LIN12   (*((volatile stc_mfsn_lin_t *) FM0P_MFS12_LIN_BASE))
#define LIN13   (*((volatile stc_mfsn_lin_t *) FM0P_MFS13_LIN_BASE))
#define LIN14   (*((volatile stc_mfsn_lin_t *) FM0P_MFS14_LIN_BASE))
#define LIN15   (*((volatile stc_mfsn_lin_t *) FM0P_MFS15_LIN_BASE))
#define MFS_INSTANCE_COUNT
#define MFS0_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS0_UART->TDR)
#define MFS1_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS1_UART->TDR)
#define MFS2_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS2_UART->TDR)
#define MFS3_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS3_UART->TDR)
#define MFS4_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS4_UART->TDR)
#define MFS5_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS5_UART->TDR)
#define MFS6_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS6_UART->TDR)
#define MFS7_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS7_UART->TDR)
#define MFS8_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS8_UART->TDR)
#define MFS9_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS9_UART->TDR)
#define MFS10_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS10_UART->TDR)
#define MFS11_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS11_UART->TDR)
#define MFS12_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS12_UART->TDR)
#define MFS13_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS13_UART->TDR)
#define MFS14_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS14_UART->TDR)
#define MFS15_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS15_UART->TDR)

Typedefs

typedef enum en_mfs_fifo_sel en_mfs_fifo_sel_t
 Mfs FIFO Selection.
typedef struct stc_mfs_fifo_config stc_mfs_fifo_config_t
 Mfs FIFO configuration.
typedef enum en_mfs_fifo en_mfs_fifo_t
 Mfs FIFO Number.
typedef enum en_mfs_uart_mode en_uart_mode_t
 MFS UART mode.
typedef enum en_uart_data_len en_uart_data_len_t
 UART data length.
typedef enum en_uart_parity en_uart_parity_t
 UART parity format.
typedef enum en_uart_stop_bit en_uart_stop_bit_t
 UART stop bits length.
typedef enum en_uart_data_dir en_uart_data_dir_t
 UART data direction.
typedef enum en_uart_func en_uart_func_t
 UART functions.
typedef struct stc_uart_int_sel stc_uart_int_sel_t
 UART interrupt selection.
typedef struct stc_uart_int_cb stc_uart_int_cb_t
 UART interrupt callback function.
typedef enum en_uart_status en_uart_status_t
 UART status types.
typedef struct stc_mfs_uart_config stc_mfs_uart_config_t
 UART configuration structure.
typedef enum en_csio_ms_mode en_csio_ms_mode_t
 CSIO mode (Master/Slave)
typedef enum en_csio_act_mode en_csio_act_mode_t
 CSIO active mode (Normal/SPI)
typedef enum en_csio_data_len en_csio_data_len_t
 CSIO data length.
typedef enum en_csio_sync_wait_time en_csio_sync_wait_time_t
 CSIO synchronous wait time.
typedef enum en_csio_data_dir en_csio_data_dir_t
 CSIO bit direction.
typedef enum en_csio_timer_clk en_csio_timer_clk_t
 CSIO serial timer clock division.
typedef struct
stc_csio_serial_timer 
stc_csio_serial_timer_t
 CSIO serial timer configuration.
typedef enum en_cs_pin_sel en_cs_pin_sel_t
 CSIO chip selection pin.
typedef enum en_cs_pin_level en_cs_pin_level_t
 CSIO chip selection pin level.
typedef enum en_cs_timing_clk en_cs_timing_clk_t
 CSIO chip selection clock division.
typedef struct stc_csio_cs stc_csio_cs_t
 CSIO chip selection configuration.
typedef enum en_csio_func en_csio_func_t
 CSIO function.
typedef struct stc_csio_int_sel stc_csio_int_sel_t
 CSIO interrupt selection.
typedef struct stc_csio_int_cb stc_csio_int_cb_t
 CSIO interrupt callback function.
typedef enum en_csio_status en_csio_status_t
 CSIO status types.
typedef struct stc_mfs_csio_config stc_mfs_csio_config_t
 CSIO configuration structure.
typedef enum en_i2c_mode en_i2c_mode_t
 I2C mode.
typedef enum en_i2c_ack en_i2c_ack_t
 I2C ACK types.
typedef struct stc_i2c_int_sel stc_i2c_int_sel_t
 I2C interrupt selection.
typedef struct stc_i2c_int_cb stc_i2c_int_cb_t
 I2C interrupt callback function.
typedef enum en_i2c_status en_i2c_status_t
 I2C status types.
typedef enum en_i2c_data_dir en_i2c_data_dir_t
 I2C data direction(used in slave mode)
typedef struct stc_mfs_i2c_config stc_mfs_i2c_config_t
 I2C configuration structure.
typedef enum en_lin_ms_mode en_lin_ms_mode_t
 MFS LIN mode (Master/Slave)
typedef enum en_lin_stop_bit en_lin_stop_bit_t
 LIN stop bit length.
typedef enum en_lin_break_length en_lin_break_len_t
 Mfs Lin Break Generation Length (only applicable in LIN master mode)
typedef enum
en_lin_delimiter_length 
en_lin_delimiter_len_t
 Mfs Lin Break Delimiter Length (only applicable in LIN master mode)
typedef enum en_lin_func en_lin_func_t
 LIN function.
typedef struct stc_lin_int_sel stc_lin_int_sel_t
 LIN interrupt selection.
typedef struct stc_lin_int_cb stc_lin_int_cb_t
 LIN interrupt callback function.
typedef enum en_lin_status en_lin_status_t
 LIN status types.
typedef struct stc_mfs_lin_config stc_mfs_lin_config_t
 LIN configuration structure.
typedef enum en_mfs_instance_index en_mfs_instance_index_t
 Enumeration to define an index for each enabled MFS instance.
typedef struct stc_mfsn stc_mfsn_t
 MFS common instance structure.
typedef enum en_mfs_mode en_mfs_mode_t
 MFS mode.
typedef struct stc_mfs_intern_data stc_mfs_intern_data_t
 MFS module internal data, storing internal information for each enabled MFS instance.
typedef struct
stc_mfs_instance_data 
stc_mfs_instance_data_t
 MFS instance data type.

Enumerations

enum  en_mfs_fifo_sel { MfsTxFifo1RxFifo2 = 0u, MfsTxFifo2RxFifo1 = 1u }
 Mfs FIFO Selection. More...
enum  en_mfs_fifo { MfsFifo1 = 0u, MfsFifo2 = 1u }
 Mfs FIFO Number. More...
enum  en_mfs_uart_mode { UartNormal = 0u, UartMulti = 1u }
 MFS UART mode. More...
enum  en_uart_data_len {
  UartEightBits = 0u, UartFiveBits = 1u, UartSixBits = 2u, UartSevenBits = 3u,
  UartNineBits = 4u
}
 UART data length. More...
enum  en_uart_parity { UartParityNone = 0u, UartParityEven = 2u, UartParityOdd = 3u }
 UART parity format. More...
enum  en_uart_stop_bit { UartOneStopBit = 0u, UartTwoStopBits = 1u, UartThreeStopBits = 2u, UartFourStopBits = 3u }
 UART stop bits length. More...
enum  en_uart_data_dir { UartDataLsbFirst = 0u, UartDataMsbFirst = 1u }
 UART data direction. More...
enum  en_uart_func { UartTx = 0u, UartRx = 1u }
 UART functions. More...
enum  en_uart_status {
  UartParityError = 0u, UartFrameError = 1u, UartOverrunError = 2u, UartRxFull = 3u,
  UartTxEmpty = 4u, UartTxIdle = 5u, UartTxFifoRequest = 6u
}
 UART status types. More...
enum  en_csio_ms_mode { CsioMaster = 0, CsioSlave = 1 }
 CSIO mode (Master/Slave) More...
enum  en_csio_act_mode { CsioActNormalMode = 0u, CsioActSpiMode = 1u }
 CSIO active mode (Normal/SPI) More...
enum  en_csio_data_len {
  CsioFiveBits = 0u, CsioSixBits = 1u, CsioSevenBits = 2u, CsioEightBits = 3u,
  CsioNineBits = 4u, CsioTenBits = 5u, CsioElevenBits = 6u, CsioTwelveBits = 7u,
  CsioThirteenBits = 8u, CsioFourteenBits = 9u, CsioFifteenBits = 10u, CsioSixteenBits = 11u
}
 CSIO data length. More...
enum  en_csio_sync_wait_time { CsioSyncWaitZero = 0u, CsioSyncWaitOne = 1u, CsioSyncWaitTwo = 2u, CsioSyncWaitThree = 3u }
 CSIO synchronous wait time. More...
enum  en_csio_data_dir { CsioDataLsbFirst = 0u, CsioDataMsbFirst = 1u }
 CSIO bit direction. More...
enum  en_csio_timer_clk {
  CsioTimerNoDiv = 0u, CsioTimerDiv2 = 1u, CsioTimerDiv4 = 2u, CsioTimerDiv8 = 3u,
  CsioTimerDiv16 = 4u, CsioTimerDiv32 = 5u, CsioTimerDiv64 = 6u, CsioTimerDiv128 = 7u,
  CsioTimerDiv256 = 8u
}
 CSIO serial timer clock division. More...
enum  en_cs_pin_sel { CsPinScs0 = 0u, CsPinScs1 = 1u, CsPinScs2 = 2u, CsPinScs3 = 3u }
 CSIO chip selection pin. More...
enum  en_cs_pin_level { CsLowActive = 0u, CsHighActive = 1u }
 CSIO chip selection pin level. More...
enum  en_cs_timing_clk {
  CsClkNoDiv = 0u, CsClkDiv2 = 1u, CsClkDiv4 = 2u, CsClkDiv8 = 3u,
  CsClkDiv16 = 4u, CsClkDiv32 = 5u, CsClkDiv64 = 6u
}
 CSIO chip selection clock division. More...
enum  en_csio_func { CsioTx = 0u, CsioRx = 1u, CsioSerialTimer = 2u, CsioCsErrOccur = 3u }
 CSIO function. More...
enum  en_csio_status {
  CsioOverrunError, CsioRxFull, CsioTxEmpty, CsioTxIdle,
  CsioTxFifoRequest, CsioCsErrIntFlag, CsioTimerIntFlag
}
 CSIO status types. More...
enum  en_i2c_mode { I2cMaster = 0u, I2cSlave = 1u }
 I2C mode. More...
enum  en_i2c_ack { I2cAck = 0u, I2cNAck = 1u }
 I2C ACK types. More...
enum  en_i2c_status {
  I2cOverrunError = 0u, I2cRxFull = 1u, I2cTxEmpty = 2u, I2cTxIdle = 3u,
  I2cTxFifoRequest = 4u, I2cFirstByteDetect = 5u, I2cReservedByteDetect = 6u, I2cStopDetect = 7u,
  I2cBusStatus = 8u, I2cBusErr = 9u, I2cRxTxInt = 10u, I2cDevAddrMatch = 11u
}
 I2C status types. More...
enum  en_i2c_data_dir { i2c_master_tx_slave_rx = 0u, i2c_slave_tx_master_rx = 1u }
 I2C data direction(used in slave mode) More...
enum  en_lin_ms_mode { LinMasterMode = 0u, LinSlaveMode = 1u }
 MFS LIN mode (Master/Slave) More...
enum  en_lin_stop_bit { LinOneStopBit = 0u, LinTwoStopBits = 1u, LinThreeStopBits = 2u, LinFourStopBits = 3u }
 LIN stop bit length. More...
enum  en_lin_break_length { LinBreakLength13 = 0u, LinBreakLength14 = 1u, LinBreakLength15 = 2u, LinBreakLength16 = 3u }
 Mfs Lin Break Generation Length (only applicable in LIN master mode) More...
enum  en_lin_delimiter_length { LinDelimiterLength1 = 0u, LinDelimiterLength2 = 1u, LinDelimiterLength3 = 2u, LinDelimiterLength4 = 3u }
 Mfs Lin Break Delimiter Length (only applicable in LIN master mode) More...
enum  en_lin_func { LinTx = 0u, LinRx = 1u }
 LIN function. More...
enum  en_lin_status {
  LinFrameError = 0u, LinOverrunError = 1u, LinRxFull = 2u, LinTxEmpty = 3u,
  LinTxIdle = 4u, LinBreakFlag = 5u, LinTxFifoRequest = 6u
}
 LIN status types. More...
enum  en_mfs_instance_index {
  MfsInstanceIndexMfs0, MfsInstanceIndexMfs1, MfsInstanceIndexMfs2, MfsInstanceIndexMfs3,
  MfsInstanceIndexMfs4, MfsInstanceIndexMfs5, MfsInstanceIndexMfs6, MfsInstanceIndexMfs7,
  MfsInstanceIndexMfs8, MfsInstanceIndexMfs9, MfsInstanceIndexMfs10, MfsInstanceIndexMfs11,
  MfsInstanceIndexMfs12, MfsInstanceIndexMfs13, MfsInstanceIndexMfs14, MfsInstanceIndexMfs15,
  MfsInstanceIndexMax, MfsInstanceIndexUnknown = 0xFFu
}
 Enumeration to define an index for each enabled MFS instance. More...
enum  en_mfs_mode {
  MfsInitMode = 0u, MfsUartMode = 1u, MfsCsioMode = 2u, MfsI2cMode = 3u,
  MfsLinMode = 4u
}
 MFS mode. More...

Functions

static stc_mfs_intern_data_tMfsUartGetInternDataPtr (volatile FM0P_MFS_UART_TypeDef *pstcUart)
 Return the internal data for a certain UART instance.
static stc_mfs_intern_data_tMfsCsioGetInternDataPtr (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio)
 Return the internal data for a certain CSIO instance.
static stc_mfs_intern_data_tMfsI2cGetInternDataPtr (volatile FM0P_MFS_I2C_TypeDef *pstcI2c)
 Return the internal data for a certain I2C instance.
static stc_mfs_intern_data_tMfsLinGetInternDataPtr (volatile FM0P_MFS_LIN_TypeDef *pstcLin)
 Return the internal data for a certain MFS instance.
static void Mfs_InitIrq (en_mfs_instance_index_t enIndex, boolean_t bRxTx)
 Device dependent initialization of transmit interrupts according CMSIS with level defined in pdl.h.
static void Mfs_DeInitIrq (en_mfs_instance_index_t enIndex, boolean_t bRxTx)
 Device dependent de-initialization of interrupts according CMSIS.
static en_mfs_instance_index_t MfsUartGetInstanceIndex (volatile FM0P_MFS_UART_TypeDef *pstcUart)
 Return instance index for a certain UART instance.
void MfsUartIrqHandlerRx (volatile FM0P_MFS_UART_TypeDef *pstcUart, stc_mfs_intern_data_t *pstcMfsInternData)
 UART receive interrupt service routine.
void MfsUartIrqHandlerTx (volatile FM0P_MFS_UART_TypeDef *pstcUart, stc_mfs_intern_data_t *pstcMfsInternData)
 MFS transmit interrupt service routine.
en_result_t Mfs_Uart_EnableInt (volatile FM0P_MFS_UART_TypeDef *pstcUart, stc_uart_int_sel_t *pstcInt, stc_uart_int_cb_t *pstcIntCb)
 Enable UART interrupts.
en_result_t Mfs_Uart_DisableInt (volatile FM0P_MFS_UART_TypeDef *pstcUart, stc_uart_int_sel_t *pstcInt)
 Disable UART interrupts.
en_result_t Mfs_Uart_Init (volatile FM0P_MFS_UART_TypeDef *pstcUart, const stc_mfs_uart_config_t *pstcConfig)
 Initialization of a MFS module to activate as UART.
en_result_t Mfs_Uart_DeInit (volatile FM0P_MFS_UART_TypeDef *pstcUart)
 Deinitialisation of a MFS module activating as UART.
en_result_t Mfs_Uart_SetBaudRate (volatile FM0P_MFS_UART_TypeDef *pstcUart, uint32_t u32BaudRate)
 Set the baudrate of UART.
en_result_t Mfs_Uart_EnableFunc (volatile FM0P_MFS_UART_TypeDef *pstcUart, en_uart_func_t enFunc)
 Enable UART functions.
en_result_t Mfs_Uart_DisableFunc (volatile FM0P_MFS_UART_TypeDef *pstcUart, en_uart_func_t enFunc)
 Disable UART functions.
boolean_t Mfs_Uart_GetStatus (volatile FM0P_MFS_UART_TypeDef *pstcUart, en_uart_status_t enStatus)
 Get status of UART according to status type.
en_result_t Mfs_Uart_ClrStatus (volatile FM0P_MFS_UART_TypeDef *pstcUart, en_uart_status_t enStatus)
 Clear status of UART according to status type.
en_result_t Mfs_Uart_SendData (volatile FM0P_MFS_UART_TypeDef *pstcUart, uint16_t u16Data)
 Write UART data buffer.
uint16_t Mfs_Uart_ReceiveData (volatile FM0P_MFS_UART_TypeDef *pstcUart)
 Read UART data buffer.
en_result_t Mfs_Uart_ResetFifo (volatile FM0P_MFS_UART_TypeDef *pstcUart, en_mfs_fifo_t enFifo)
 Reset UART FIFO.
en_result_t Mfs_Uart_SetFifoCount (volatile FM0P_MFS_UART_TypeDef *pstcUart, en_mfs_fifo_t enFifo, uint8_t u8Count)
 Set UART FIFO count.
uint8_t Mfs_Uart_GetFifoCount (volatile FM0P_MFS_UART_TypeDef *pstcUart, en_mfs_fifo_t enFifo)
 Get UART FIFO count.
static en_mfs_instance_index_t MfsCsioGetInstanceIndex (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio)
 Return instance index for a certain CSIO instance.
void MfsCsioIrqHandlerRx (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio, stc_mfs_intern_data_t *pstcMfsInternData)
 CSIO receive interrupt service routine.
void MfsCsioIrqHandlerTx (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio, stc_mfs_intern_data_t *pstcMfsInternData)
 CSIO transfer interrupt service routine.
void MfsCsioIrqHandlerStatus (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio, stc_mfs_intern_data_t *pstcMfsInternData)
 CSIO status interrupt service routine.
en_result_t Mfs_Csio_EnableInt (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio, stc_csio_int_sel_t *pstcInt, stc_csio_int_cb_t *pstcIntCb)
 Enable CSIO interrupts.
en_result_t Mfs_Csio_DisableInt (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio, stc_csio_int_sel_t *pstcInt)
 Disable CSIO interrupts.
en_result_t Mfs_Csio_Init (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio, const stc_mfs_csio_config_t *pstcConfig)
 Initialization of a MFS module to activate as CSIO.
en_result_t Mfs_Csio_DeInit (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio)
 Deinitialisation of a MFS module activating as CSIO.
en_result_t Mfs_Csio_SetBaudRate (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio, uint32_t u32BaudRate)
 Set the baudrate of CSIO.
en_result_t Mfs_Csio_SetTimerCompareValue (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio, uint16_t u16CompareValue)
 Set the compare value of CSIO serial timer.
en_result_t Mfs_Csio_SetCsTransferByteCount (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio, en_cs_pin_sel_t enCsPin, uint8_t u8ByteCnt)
 Set the transfer byte count of a selected chip selection pin.
en_result_t Mfs_Csio_SetCsHoldStatus (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio, boolean_t bHold)
 Set the hold status of chip selection pin.
en_result_t Mfs_Csio_SetTimerTransferByteCount (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio, uint8_t u8ByteCnt)
 Set the transfer byte count of CSIO serial timer.
en_result_t Mfs_Csio_EnableFunc (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio, en_csio_func_t enFunc)
 Enable CSIO functions.
en_result_t Mfs_Csio_DisableFunc (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio, en_csio_func_t enFunc)
 Disable CSIO functions.
boolean_t Mfs_Csio_GetStatus (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio, en_csio_status_t enStatus)
 Get status of CSIO according to status type.
en_result_t Mfs_Csio_ClrStatus (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio, en_csio_status_t enStatus)
 Clear status of CSIO according to status type.
en_result_t Mfs_Csio_SendData (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio, uint16_t u16Data, boolean_t bSotEn)
 Write CSIO data buffer.
uint16_t Mfs_Csio_ReceiveData (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio)
 Read CSIO data buffer.
en_result_t Mfs_Csio_ResetFifo (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio, en_mfs_fifo_t enFifo)
 Reset CSIO FIFO.
en_result_t Mfs_Csio_SetFifoCount (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio, en_mfs_fifo_t enFifo, uint8_t u8Count)
 Set CSIO FIFO count.
uint8_t Mfs_Csio_GetFifoCount (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio, en_mfs_fifo_t enFifo)
 Get CSIO FIFO count.
static en_mfs_instance_index_t MfsI2cGetInstanceIndex (volatile FM0P_MFS_I2C_TypeDef *pstcI2c)
 Return instance index for a certain I2C instance.
void MfsI2cIrqHandlerRx (volatile FM0P_MFS_I2C_TypeDef *pstcI2c, stc_mfs_intern_data_t *pstcMfsInternData)
 I2C receive interrupt service routine.
void MfsI2cIrqHandlerTx (volatile FM0P_MFS_I2C_TypeDef *pstcI2c, stc_mfs_intern_data_t *pstcMfsInternData)
 I2C transfer interrupt service routine.
void MfsI2cIrqHandlerStatus (volatile FM0P_MFS_I2C_TypeDef *pstcI2c, stc_mfs_intern_data_t *pstcMfsInternData)
 I2C status interrupt service routine.
en_result_t Mfs_I2c_EnableInt (volatile FM0P_MFS_I2C_TypeDef *pstcI2c, stc_i2c_int_sel_t *pstcInt, stc_i2c_int_cb_t *pstcIntCb)
 Enable I2C interrupts.
en_result_t Mfs_I2c_DisableInt (volatile FM0P_MFS_I2C_TypeDef *pstcI2c, stc_i2c_int_sel_t *pstcInt)
 Disable I2C interrupts.
en_result_t Mfs_I2c_Init (volatile FM0P_MFS_I2C_TypeDef *pstcI2c, const stc_mfs_i2c_config_t *pstcConfig)
 Initialization of a MFS module to activate as I2C.
en_result_t Mfs_I2c_DeInit (volatile FM0P_MFS_I2C_TypeDef *pstcI2c)
 Deinitialisation of a MFS module activating as I2C.
en_result_t Mfs_I2c_SetBaudRate (volatile FM0P_MFS_I2C_TypeDef *pstcI2c, uint32_t u32BaudRate)
 Set the baudrate of I2C.
en_result_t Mfs_I2c_GenerateStart (volatile FM0P_MFS_I2C_TypeDef *pstcI2c)
 Generate start signal of I2C.
en_result_t Mfs_I2c_GenerateRestart (volatile FM0P_MFS_I2C_TypeDef *pstcI2c)
 Generate restart signal of I2C.
en_result_t Mfs_I2c_GenerateStop (volatile FM0P_MFS_I2C_TypeDef *pstcI2c)
 Generate stop signal of I2C.
en_result_t Mfs_I2c_SendData (volatile FM0P_MFS_I2C_TypeDef *pstcI2c, uint8_t u8Data)
 Write I2C data buffer.
uint8_t Mfs_I2c_ReceiveData (volatile FM0P_MFS_I2C_TypeDef *pstcI2c)
 Read I2C data buffer.
en_result_t Mfs_I2c_ConfigAck (volatile FM0P_MFS_I2C_TypeDef *pstcI2c, en_i2c_ack_t enAck)
 Configure ACK signal sent to master.
en_i2c_ack_t Mfs_I2c_GetAck (volatile FM0P_MFS_I2C_TypeDef *pstcI2c)
 Get the ACK signal from slave.
boolean_t Mfs_I2c_GetStatus (volatile FM0P_MFS_I2C_TypeDef *pstcI2c, en_i2c_status_t enStatus)
 Get status of I2C according to status type.
en_result_t Mfs_I2c_ClrStatus (volatile FM0P_MFS_I2C_TypeDef *pstcI2c, en_i2c_status_t enStatus)
 Clear status of I2C according to status type.
en_i2c_data_dir_t Mfs_I2c_GetDataDir (volatile FM0P_MFS_I2C_TypeDef *pstcI2c)
 Get direction of I2C data in slave mode.
en_result_t Mfs_I2c_ResetFifo (volatile FM0P_MFS_I2C_TypeDef *pstcI2c, en_mfs_fifo_t enFifo)
 Reset I2C FIFO.
en_result_t Mfs_I2c_SetFifoCount (volatile FM0P_MFS_I2C_TypeDef *pstcI2c, en_mfs_fifo_t enFifo, uint8_t u8Count)
 Set I2C FIFO count.
uint8_t Mfs_I2c_GetFifoCount (volatile FM0P_MFS_I2C_TypeDef *pstcI2c, en_mfs_fifo_t enFifo)
 Get I2C FIFO count.
static en_mfs_instance_index_t MfsLinGetInstanceIndex (volatile FM0P_MFS_LIN_TypeDef *pstcLin)
 Return instance index for a certain LIN instance.
void MfsLinIrqHandlerRx (volatile FM0P_MFS_LIN_TypeDef *pstcLin, stc_mfs_intern_data_t *pstcMfsInternData)
 LIN receive interrupt service routine.
void MfsLinIrqHandlerTx (volatile FM0P_MFS_LIN_TypeDef *pstcLin, stc_mfs_intern_data_t *pstcMfsInternData)
 LIN transmit interrupt service routine.
void MfsLinIrqHandlerStatus (volatile FM0P_MFS_LIN_TypeDef *pstcLin, stc_mfs_intern_data_t *pstcMfsInternData)
 LIN status interrupt service routine.
en_result_t Mfs_Lin_EnableInt (volatile FM0P_MFS_LIN_TypeDef *pstcLin, stc_lin_int_sel_t *pstcInt, stc_lin_int_cb_t *pstcIntCb)
 Enable LIN interrupts.
en_result_t Mfs_Lin_DisableInt (volatile FM0P_MFS_LIN_TypeDef *pstcLin, stc_lin_int_sel_t *pstcInt)
 Disable LIN interrupts.
en_result_t Mfs_Lin_Init (volatile FM0P_MFS_LIN_TypeDef *pstcLin, const stc_mfs_lin_config_t *pstcConfig)
 Initialization of a MFS module to activate as LIN.
en_result_t Mfs_Lin_DeInit (volatile FM0P_MFS_LIN_TypeDef *pstcLin)
 Deinitialisation of a MFS module activating as LIN.
en_result_t Mfs_Lin_SetBaudRate (volatile FM0P_MFS_LIN_TypeDef *pstcLin, uint32_t u32BaudRate)
 Set the baudrate of LIN.
en_result_t Mfs_Lin_GenerateBreakField (volatile FM0P_MFS_LIN_TypeDef *pstcLin)
 Generate LIN break filed.
en_result_t Mfs_Lin_EnableFunc (volatile FM0P_MFS_LIN_TypeDef *pstcLin, en_lin_func_t enFunc)
 Enable LIN functions.
en_result_t Mfs_Lin_DisableFunc (volatile FM0P_MFS_LIN_TypeDef *pstcLin, en_lin_func_t enFunc)
 Disable LIN functions.
boolean_t Mfs_Lin_GetStatus (volatile FM0P_MFS_LIN_TypeDef *pstcLin, en_lin_status_t enStatus)
 Get status of LIN according to status type.
en_result_t Mfs_Lin_ClrStatus (volatile FM0P_MFS_LIN_TypeDef *pstcLin, en_lin_status_t enStatus)
 Clear status of LIN according to status type.
en_result_t Mfs_Lin_SendData (volatile FM0P_MFS_LIN_TypeDef *pstcLin, uint8_t Data)
 Write LIN data buffer.
uint8_t Mfs_Lin_ReceiveData (volatile FM0P_MFS_LIN_TypeDef *pstcLin)
 Read LIN data buffer.
en_result_t Mfs_Lin_ResetFifo (volatile FM0P_MFS_LIN_TypeDef *pstcLin, en_mfs_fifo_t enFifo)
 Reset LIN FIFO.
en_result_t Mfs_Lin_SetFifoCount (volatile FM0P_MFS_LIN_TypeDef *pstcLin, en_mfs_fifo_t enFifo, uint8_t u8Count)
 Set LIN FIFO count.
uint8_t Mfs_Lin_GetFifoCount (volatile FM0P_MFS_LIN_TypeDef *pstcLin, en_mfs_fifo_t enFifo)
 Get LIN FIFO count.

Variables

stc_mfs_instance_data_t m_astcMfsInstanceDataLut [(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS0==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS1==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS2==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS3==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS4==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS5==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS6==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS7==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS8==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS9==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS10==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS11==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS12==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS13==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS14==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS15==PDL_ON)]
 Look-up table for all enabled MFS instances and their internal data.
stc_mfs_instance_data_t m_astcMfsInstanceDataLut [(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS0==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS1==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS2==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS3==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS4==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS5==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS6==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS7==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS8==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS9==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS10==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS11==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS12==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS13==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS14==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFS15==PDL_ON)]
 Look-up table for all enabled MFS instances and their internal data.

Detailed Description

Provided functions of MFS module:

Mfs_Uart_Init() is used to initialize an MFS instance to UART mode with parameter pstcConfig of type stc_mfs_uart_config_t. This function is only set basically UART configuration. Mfs_Uart_DeInit() is used to reset all MFS UART related register.

Mfs_Uart_EnableInt() enables UART interrupt sources selected by parameter Mfs_Uart_EnableInt::pstcInt and sets the according interrupt callback functions in the internal data structure. Mfs_Uart_DisableInt() disables the UART interrupt sources selected.

MfsUartIrqHandlerTx() is UART transfer IRQ handler function and MfsUartIrqHandlerRx() is UART receive IRQ handler, they are called in the interrupts.c

Mfs_Uart_SetBaudRate() provides a possibility to change the UART baudrate after UART is initialized.

Mfs_Uart_EnableFunc() enables UART function selected by the parameter Mfs_Uart_EnableFunc::enFunc and Mfs_Uart_DisableFunc() disables UART function.

Mfs_Uart_GetStatus() gets the status selected by Mfs_Uart_GetStatus::enStatus and Mfs_Uart_ClrStatus() clears the UART status selected, some status can only be cleared by hardware automatically.

Mfs_Uart_SendData() writes a byte data into UART transfer buffer and Mfs_Uart_ReceiveData() reads a byte data from UART receive buffer.

Mfs_Uart_ResetFifo() resets UART hardware FIFO. Mfs_Uart_SetFifoCount() provides a possibility to change FIFO size after UART is initialized. Mfs_Uart_GetFifoCount() gets the current data count in FIFO.

Mfs_Csio_Init() is used to initialize an MFS instance to CSIO mode with parameter pstcConfig of type stc_mfs_csio_config_t. Mfs_Csio_DeInit() is used to reset all MFS CSIO related register. So this function is used after initialization by Mfs_Csio_Init().

Mfs_Csio_EnableInt() enables CSIO interrupt sources selected by parameter Mfs_Csio_EnableInt::pstcInt and sets the according interrupt callback functions in the internal data structure. Mfs_Csio_DisableInt() disables the CSIO interrupt sources selected

MfsCsioIrqHandlerTx() is CSIO transfer IRQ handler function, MfsCsioIrqHandlerRx() is CSIO receive IRQ handler, and MfsCsioIrqHandlerStatus() is CSIO status IRQ handler. they are called in the interrupts.c

Mfs_Csio_SetBaudRate() provides a possibility to change the CSIO baudrate after CSIO is initialized.

Mfs_Csio_SetTimerCompareValue() can change the compare value of CSIO serial timer.

Mfs_Csio_SetCsTransferByteCount() can change the transfer byte count of the Chip Selection Pin selected.

Mfs_Csio_SetTimerTransferByteCount() sets the transfer byte count of the transfer process triggered by serial timer.

Mfs_Csio_SetCsHoldStatus() sets the hold status of CS pin after one transfer is finished.

Mfs_Csio_EnableFunc() enables CSIO function selected by the parameter Mfs_Csio_EnableFunc::enFunc and Mfs_Csio_DisableFunc() disables CSIO function.

Mfs_Csio_GetStatus() gets the status selected by Mfs_Csio_GetStatus::enStatus and Mfs_Csio_ClrStatus() clears the CSIO status selected, some status can only be cleared by hardware automatically.

Mfs_Csio_SendData() writes a byte data into CSIO transfer buffer and Mfs_Csio_ReceiveData() reads a byte data from CSIO receive buffer. The bit length of data is configured in the Mfs_Csio_Init().

Mfs_Csio_ResetFifo() resets CSIO hardware FIFO. Mfs_Csio_SetFifoCount() provides a possibility to change FIFO size after UART is initialized. Mfs_Uart_GetFifoCount() gets the current data count in FIFO.

Mfs_I2c_Init() is used to initialize an MFS instance to I2C mode with parameter pstcConfig of type stc_mfs_i2c_config_t. This function is only set basically I2C configuration. Mfs_I2c_DeInit() is used to reset all MFS I2C related register. So this function is used after initialization by Mfs_I2c_Init().

Mfs_I2c_EnableInt() enables I2C interrupt sources selected by parameter Mfs_I2c_EnableInt::pstcInt and sets the according interrupt callback functions in the internal data structure. Mfs_I2c_DisableInt() disables the I2C interrupt sources selected.

MfsI2cIrqHandlerTx() is I2C transfer IRQ handler function, MfsI2cIrqHandlerRx() is I2C receive IRQ handler, and MfsI2cIrqHandlerStatus() is I2C status IRQ handler. they are called in the interrupts.c

Mfs_I2c_SetBaudRate() provides a possibility to change the I2C baudrate after I2C is initialized.

Mfs_I2c_SendData() writes a byte data into I2C transfer buffer and Mfs_I2c_ReceiveData() reads a byte data from I2C receive buffer.

Mfs_I2c_GenerateStart() generates a I2C start signal. Mfs_I2c_GenerateRestart() generates a I2C re-start signal. Mfs_I2c_GenerateStop() generates a I2C stop signal.

Mfs_I2c_ConfigAck() configures ACK signal when receive a data. Mfs_I2c_GetAck() gets the ACK signal status after receiving a ACK.

Mfs_I2c_GetStatus() gets the status selected by Mfs_I2c_GetStatus::enStatus and Mfs_I2c_ClrStatus() clears the I2C status selected, some status can only be cleared by hardware automatically.

Mfs_I2c_GetDataDir() gets the data direction of I2C in the slave mode.

Mfs_I2c_ResetFifo() resets I2C hardware FIFO. Mfs_I2c_SetFifoCount() provides a possibility to change FIFO size after I2C is initialized. Mfs_I2c_GetFifoCount() gets the current data count in FIFO.

Mfs_Lin_Init() is used to initialize an MFS instance to LIN mode with its dedicated LIN configuration (stc_mfs_lin_config_t). This function is only set basically LIN configuration. Mfs_Lin_DeInit() is used to reset all MFS LIN related register.

Mfs_Lin_EnableInt() enables LIN interrupt sources selected by parameter Mfs_Lin_EnableInt::pstcInt and sets the according interrupt callback functions in the internal data structure. Mfs_Lin_DisableInt() disables the LIN interrupt sources selected.

MfsLinIrqHandlerTx() is LIN transfer IRQ handler function, MfsLinIrqHandlerRx() is LIN receive IRQ handler, and MfsLinIrqHandlerStatus() is LIN status IRQ handler. they are called in the interrupts.c

Mfs_Lin_SetBaudRate() provides a possibility to change the LIN baudrate after LIN is initialized.

Mfs_Lin_GenerateBreakField() generates LIN break field, which can also be detected by ownself.

Mfs_Lin_EnableFunc() enables LIN function selected by the parameter Mfs_Lin_EnableFunc::enFunc and Mfs_Lin_DisableFunc() disables LIN function.

Mfs_Lin_GetStatus() gets the status selected by Mfs_Lin_GetStatus::enStatus and Mfs_Lin_ClrStatus() clears the LIN status selected, some status can only be cleared by hardware automatically.

Mfs_Lin_SendData() writes a byte data into LIN transfer buffer and Mfs_Lin_ReceiveData() reads a byte data from LIN receive buffer.

Mfs_Lin_ResetFifo() resets LIN hardware FIFO. Mfs_Lin_SetFifoCount() provides a possibility to change FIFO size after LIN is initialized. Mfs_Lin_GetFifoCount() gets the current data count in FIFO.


Define Documentation

#define CSIO0   (*((volatile stc_mfsn_csio_t *) FM0P_MFS0_CSIO_BASE))

Definition at line 330 of file mfs.h.

Referenced by MFS0_8_RX_IRQHandler(), and MFS0_8_TX_IRQHandler().

#define CSIO1   (*((volatile stc_mfsn_csio_t *) FM0P_MFS1_CSIO_BASE))

Definition at line 331 of file mfs.h.

Referenced by MFS1_9_RX_IRQHandler(), and MFS1_9_TX_IRQHandler().

#define CSIO10   (*((volatile stc_mfsn_csio_t *) FM0P_MFS10_CSIO_BASE))

Definition at line 340 of file mfs.h.

Referenced by MFS2_10_RX_IRQHandler(), and MFS2_10_TX_IRQHandler().

#define CSIO11   (*((volatile stc_mfsn_csio_t *) FM0P_MFS11_CSIO_BASE))

Definition at line 341 of file mfs.h.

Referenced by MFS3_11_RX_IRQHandler(), and MFS3_11_TX_IRQHandler().

#define CSIO12   (*((volatile stc_mfsn_csio_t *) FM0P_MFS12_CSIO_BASE))

Definition at line 342 of file mfs.h.

Referenced by MFS4_12_RX_IRQHandler(), and MFS4_12_TX_IRQHandler().

#define CSIO13   (*((volatile stc_mfsn_csio_t *) FM0P_MFS13_CSIO_BASE))

Definition at line 343 of file mfs.h.

Referenced by MFS5_13_RX_IRQHandler(), and MFS5_13_TX_IRQHandler().

#define CSIO14   (*((volatile stc_mfsn_csio_t *) FM0P_MFS14_CSIO_BASE))

Definition at line 344 of file mfs.h.

Referenced by MFS6_14_RX_DMA0_IRQHandler(), and MFS6_14_TX_DMA1_IRQHandler().

#define CSIO15   (*((volatile stc_mfsn_csio_t *) FM0P_MFS15_CSIO_BASE))

Definition at line 345 of file mfs.h.

Referenced by MFS7_15_RX_DMA2_IRQHandler(), and MFS7_15_TX_DMA3_IRQHandler().

#define CSIO2   (*((volatile stc_mfsn_csio_t *) FM0P_MFS2_CSIO_BASE))

Definition at line 332 of file mfs.h.

Referenced by MFS2_10_RX_IRQHandler(), and MFS2_10_TX_IRQHandler().

#define CSIO3   (*((volatile stc_mfsn_csio_t *) FM0P_MFS3_CSIO_BASE))

Definition at line 333 of file mfs.h.

Referenced by MFS3_11_RX_IRQHandler(), and MFS3_11_TX_IRQHandler().

#define CSIO4   (*((volatile stc_mfsn_csio_t *) FM0P_MFS4_CSIO_BASE))

Definition at line 334 of file mfs.h.

Referenced by MFS4_12_RX_IRQHandler(), and MFS4_12_TX_IRQHandler().

#define CSIO5   (*((volatile stc_mfsn_csio_t *) FM0P_MFS5_CSIO_BASE))

Definition at line 335 of file mfs.h.

Referenced by MFS5_13_RX_IRQHandler(), and MFS5_13_TX_IRQHandler().

#define CSIO6   (*((volatile stc_mfsn_csio_t *) FM0P_MFS6_CSIO_BASE))

Definition at line 336 of file mfs.h.

Referenced by MFS6_14_RX_DMA0_IRQHandler(), and MFS6_14_TX_DMA1_IRQHandler().

#define CSIO7   (*((volatile stc_mfsn_csio_t *) FM0P_MFS7_CSIO_BASE))

Definition at line 337 of file mfs.h.

Referenced by MFS7_15_RX_DMA2_IRQHandler(), and MFS7_15_TX_DMA3_IRQHandler().

#define CSIO8   (*((volatile stc_mfsn_csio_t *) FM0P_MFS8_CSIO_BASE))

Definition at line 338 of file mfs.h.

Referenced by MFS0_8_RX_IRQHandler(), and MFS0_8_TX_IRQHandler().

#define CSIO9   (*((volatile stc_mfsn_csio_t *) FM0P_MFS9_CSIO_BASE))

Definition at line 339 of file mfs.h.

Referenced by MFS1_9_RX_IRQHandler(), and MFS1_9_TX_IRQHandler().

#define CsioInstanceToIndex (   Instance)    ((uint32_t)Instance - (uint32_t)&CSIO0)/0x100u

Definition at line 72 of file mfs.c.

Referenced by Mfs_Csio_DisableInt().

#define I2C0   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS0_I2C_BASE))

Definition at line 347 of file mfs.h.

Referenced by MFS0_8_RX_IRQHandler(), and MFS0_8_TX_IRQHandler().

#define I2C1   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS1_I2C_BASE))

Definition at line 348 of file mfs.h.

Referenced by MFS1_9_RX_IRQHandler(), and MFS1_9_TX_IRQHandler().

#define I2C10   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS10_I2C_BASE))

Definition at line 357 of file mfs.h.

Referenced by MFS2_10_RX_IRQHandler(), and MFS2_10_TX_IRQHandler().

#define I2C11   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS11_I2C_BASE))

Definition at line 358 of file mfs.h.

Referenced by MFS3_11_RX_IRQHandler(), and MFS3_11_TX_IRQHandler().

#define I2C12   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS12_I2C_BASE))

Definition at line 359 of file mfs.h.

Referenced by MFS4_12_RX_IRQHandler(), and MFS4_12_TX_IRQHandler().

#define I2C13   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS13_I2C_BASE))

Definition at line 360 of file mfs.h.

Referenced by MFS5_13_RX_IRQHandler(), and MFS5_13_TX_IRQHandler().

#define I2C14   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS14_I2C_BASE))

Definition at line 361 of file mfs.h.

Referenced by MFS6_14_RX_DMA0_IRQHandler(), and MFS6_14_TX_DMA1_IRQHandler().

#define I2C15   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS15_I2C_BASE))

Definition at line 362 of file mfs.h.

Referenced by MFS7_15_RX_DMA2_IRQHandler(), and MFS7_15_TX_DMA3_IRQHandler().

#define I2C2   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS2_I2C_BASE))

Definition at line 349 of file mfs.h.

Referenced by MFS2_10_RX_IRQHandler(), and MFS2_10_TX_IRQHandler().

#define I2C3   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS3_I2C_BASE))

Definition at line 350 of file mfs.h.

Referenced by MFS3_11_RX_IRQHandler(), and MFS3_11_TX_IRQHandler().

#define I2C4   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS4_I2C_BASE))

Definition at line 351 of file mfs.h.

Referenced by MFS4_12_RX_IRQHandler(), and MFS4_12_TX_IRQHandler().

#define I2C5   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS5_I2C_BASE))

Definition at line 352 of file mfs.h.

Referenced by MFS5_13_RX_IRQHandler(), and MFS5_13_TX_IRQHandler().

#define I2C6   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS6_I2C_BASE))

Definition at line 353 of file mfs.h.

Referenced by MFS6_14_RX_DMA0_IRQHandler(), and MFS6_14_TX_DMA1_IRQHandler().

#define I2C7   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS7_I2C_BASE))

Definition at line 354 of file mfs.h.

Referenced by MFS7_15_RX_DMA2_IRQHandler(), and MFS7_15_TX_DMA3_IRQHandler().

#define I2C8   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS8_I2C_BASE))

Definition at line 355 of file mfs.h.

Referenced by MFS0_8_RX_IRQHandler(), and MFS0_8_TX_IRQHandler().

#define I2C9   (*((volatile stc_mfsn_i2c_t *) FM0P_MFS9_I2C_BASE))

Definition at line 356 of file mfs.h.

Referenced by MFS1_9_RX_IRQHandler(), and MFS1_9_TX_IRQHandler().

#define I2cInstanceToIndex (   Instance)    ((uint32_t)Instance - (uint32_t)&I2C0)/0x100u

Definition at line 73 of file mfs.c.

Referenced by Mfs_I2c_DisableInt().

#define LIN0   (*((volatile stc_mfsn_lin_t *) FM0P_MFS0_LIN_BASE))

Definition at line 364 of file mfs.h.

Referenced by MFS0_8_RX_IRQHandler(), and MFS0_8_TX_IRQHandler().

#define LIN1   (*((volatile stc_mfsn_lin_t *) FM0P_MFS1_LIN_BASE))

Definition at line 365 of file mfs.h.

Referenced by MFS1_9_RX_IRQHandler(), and MFS1_9_TX_IRQHandler().

#define LIN10   (*((volatile stc_mfsn_lin_t *) FM0P_MFS10_LIN_BASE))

Definition at line 374 of file mfs.h.

Referenced by MFS2_10_RX_IRQHandler(), and MFS2_10_TX_IRQHandler().

#define LIN11   (*((volatile stc_mfsn_lin_t *) FM0P_MFS11_LIN_BASE))

Definition at line 375 of file mfs.h.

Referenced by MFS3_11_RX_IRQHandler(), and MFS3_11_TX_IRQHandler().

#define LIN12   (*((volatile stc_mfsn_lin_t *) FM0P_MFS12_LIN_BASE))

Definition at line 376 of file mfs.h.

Referenced by MFS4_12_RX_IRQHandler(), and MFS4_12_TX_IRQHandler().

#define LIN13   (*((volatile stc_mfsn_lin_t *) FM0P_MFS13_LIN_BASE))

Definition at line 377 of file mfs.h.

Referenced by MFS5_13_RX_IRQHandler(), and MFS5_13_TX_IRQHandler().

#define LIN14   (*((volatile stc_mfsn_lin_t *) FM0P_MFS14_LIN_BASE))

Definition at line 378 of file mfs.h.

Referenced by MFS6_14_RX_DMA0_IRQHandler(), and MFS6_14_TX_DMA1_IRQHandler().

#define LIN15   (*((volatile stc_mfsn_lin_t *) FM0P_MFS15_LIN_BASE))

Definition at line 379 of file mfs.h.

Referenced by MFS7_15_RX_DMA2_IRQHandler(), and MFS7_15_TX_DMA3_IRQHandler().

#define LIN2   (*((volatile stc_mfsn_lin_t *) FM0P_MFS2_LIN_BASE))

Definition at line 366 of file mfs.h.

Referenced by MFS2_10_RX_IRQHandler(), and MFS2_10_TX_IRQHandler().

#define LIN3   (*((volatile stc_mfsn_lin_t *) FM0P_MFS3_LIN_BASE))

Definition at line 367 of file mfs.h.

Referenced by MFS3_11_RX_IRQHandler(), and MFS3_11_TX_IRQHandler().

#define LIN4   (*((volatile stc_mfsn_lin_t *) FM0P_MFS4_LIN_BASE))

Definition at line 368 of file mfs.h.

Referenced by MFS4_12_RX_IRQHandler(), and MFS4_12_TX_IRQHandler().

#define LIN5   (*((volatile stc_mfsn_lin_t *) FM0P_MFS5_LIN_BASE))

Definition at line 369 of file mfs.h.

Referenced by MFS5_13_RX_IRQHandler(), and MFS5_13_TX_IRQHandler().

#define LIN6   (*((volatile stc_mfsn_lin_t *) FM0P_MFS6_LIN_BASE))

Definition at line 370 of file mfs.h.

Referenced by MFS6_14_RX_DMA0_IRQHandler(), and MFS6_14_TX_DMA1_IRQHandler().

#define LIN7   (*((volatile stc_mfsn_lin_t *) FM0P_MFS7_LIN_BASE))

Definition at line 371 of file mfs.h.

Referenced by MFS7_15_RX_DMA2_IRQHandler(), and MFS7_15_TX_DMA3_IRQHandler().

#define LIN8   (*((volatile stc_mfsn_lin_t *) FM0P_MFS8_LIN_BASE))

Definition at line 372 of file mfs.h.

Referenced by MFS0_8_RX_IRQHandler(), and MFS0_8_TX_IRQHandler().

#define LIN9   (*((volatile stc_mfsn_lin_t *) FM0P_MFS9_LIN_BASE))

Definition at line 373 of file mfs.h.

Referenced by MFS1_9_RX_IRQHandler(), and MFS1_9_TX_IRQHandler().

#define LinInstanceToIndex (   Instance)    ((uint32_t)Instance - (uint32_t)&LIN0)/0x100u

Definition at line 74 of file mfs.c.

Referenced by Mfs_Lin_DisableInt().

#define MFS0_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS0_UART->TDR)

Definition at line 399 of file mfs.h.

#define MFS10_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS10_UART->TDR)

Definition at line 409 of file mfs.h.

#define MFS11_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS11_UART->TDR)

Definition at line 410 of file mfs.h.

#define MFS12_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS12_UART->TDR)

Definition at line 411 of file mfs.h.

#define MFS13_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS13_UART->TDR)

Definition at line 412 of file mfs.h.

#define MFS14_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS14_UART->TDR)

Definition at line 413 of file mfs.h.

#define MFS15_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS15_UART->TDR)

Definition at line 414 of file mfs.h.

#define MFS1_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS1_UART->TDR)

Definition at line 400 of file mfs.h.

#define MFS2_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS2_UART->TDR)

Definition at line 401 of file mfs.h.

#define MFS3_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS3_UART->TDR)

Definition at line 402 of file mfs.h.

#define MFS4_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS4_UART->TDR)

Definition at line 403 of file mfs.h.

#define MFS5_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS5_UART->TDR)

Definition at line 404 of file mfs.h.

#define MFS6_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS6_UART->TDR)

Definition at line 405 of file mfs.h.

#define MFS7_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS7_UART->TDR)

Definition at line 406 of file mfs.h.

#define MFS8_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS8_UART->TDR)

Definition at line 407 of file mfs.h.

#define MFS9_DATA_REG_ADDR   (uint32_t)(&FM0P_MFS9_UART->TDR)

Definition at line 408 of file mfs.h.

#define UART0   (*((volatile stc_mfsn_uart_t *) FM0P_MFS0_UART_BASE))

Definition at line 313 of file mfs.h.

Referenced by MFS0_8_RX_IRQHandler(), and MFS0_8_TX_IRQHandler().

#define UART1   (*((volatile stc_mfsn_uart_t *) FM0P_MFS1_UART_BASE))

Definition at line 314 of file mfs.h.

Referenced by MFS1_9_RX_IRQHandler(), and MFS1_9_TX_IRQHandler().

#define UART10   (*((volatile stc_mfsn_uart_t *) FM0P_MFS10_UART_BASE))

Definition at line 323 of file mfs.h.

Referenced by MFS2_10_RX_IRQHandler(), and MFS2_10_TX_IRQHandler().

#define UART11   (*((volatile stc_mfsn_uart_t *) FM0P_MFS11_UART_BASE))

Definition at line 324 of file mfs.h.

Referenced by MFS3_11_RX_IRQHandler(), and MFS3_11_TX_IRQHandler().

#define UART12   (*((volatile stc_mfsn_uart_t *) FM0P_MFS12_UART_BASE))

Definition at line 325 of file mfs.h.

Referenced by MFS4_12_RX_IRQHandler(), and MFS4_12_TX_IRQHandler().

#define UART13   (*((volatile stc_mfsn_uart_t *) FM0P_MFS13_UART_BASE))

Definition at line 326 of file mfs.h.

Referenced by MFS5_13_RX_IRQHandler(), and MFS5_13_TX_IRQHandler().

#define UART14   (*((volatile stc_mfsn_uart_t *) FM0P_MFS14_UART_BASE))

Definition at line 327 of file mfs.h.

Referenced by MFS6_14_RX_DMA0_IRQHandler(), and MFS6_14_TX_DMA1_IRQHandler().

#define UART15   (*((volatile stc_mfsn_uart_t *) FM0P_MFS15_UART_BASE))

Definition at line 328 of file mfs.h.

Referenced by MFS7_15_RX_DMA2_IRQHandler(), and MFS7_15_TX_DMA3_IRQHandler().

#define UART2   (*((volatile stc_mfsn_uart_t *) FM0P_MFS2_UART_BASE))

Definition at line 315 of file mfs.h.

Referenced by MFS2_10_RX_IRQHandler(), and MFS2_10_TX_IRQHandler().

#define UART3   (*((volatile stc_mfsn_uart_t *) FM0P_MFS3_UART_BASE))

Definition at line 316 of file mfs.h.

Referenced by MFS3_11_RX_IRQHandler(), and MFS3_11_TX_IRQHandler().

#define UART4   (*((volatile stc_mfsn_uart_t *) FM0P_MFS4_UART_BASE))

Definition at line 317 of file mfs.h.

Referenced by MFS4_12_RX_IRQHandler(), and MFS4_12_TX_IRQHandler().

#define UART5   (*((volatile stc_mfsn_uart_t *) FM0P_MFS5_UART_BASE))

Definition at line 318 of file mfs.h.

Referenced by MFS5_13_RX_IRQHandler(), and MFS5_13_TX_IRQHandler().

#define UART6   (*((volatile stc_mfsn_uart_t *) FM0P_MFS6_UART_BASE))

Definition at line 319 of file mfs.h.

Referenced by MFS6_14_RX_DMA0_IRQHandler(), and MFS6_14_TX_DMA1_IRQHandler().

#define UART7   (*((volatile stc_mfsn_uart_t *) FM0P_MFS7_UART_BASE))

Definition at line 320 of file mfs.h.

Referenced by MFS7_15_RX_DMA2_IRQHandler(), and MFS7_15_TX_DMA3_IRQHandler().

#define UART8   (*((volatile stc_mfsn_uart_t *) FM0P_MFS8_UART_BASE))

Definition at line 321 of file mfs.h.

Referenced by MFS0_8_RX_IRQHandler(), and MFS0_8_TX_IRQHandler().

#define UART9   (*((volatile stc_mfsn_uart_t *) FM0P_MFS9_UART_BASE))

Definition at line 322 of file mfs.h.

Referenced by MFS1_9_RX_IRQHandler(), and MFS1_9_TX_IRQHandler().

#define UartInstanceToIndex (   Instance)    ((uint32_t)Instance - (uint32_t)&UART0)/0x100u

Definition at line 71 of file mfs.c.

Referenced by Mfs_Uart_DisableInt().


Typedef Documentation

CSIO chip selection pin level.

Note:
It is only available for SCS0 pin for each CSIO channel

CSIO chip selection pin.

CSIO chip selection clock division.

CSIO active mode (Normal/SPI)

CSIO bit direction.

CSIO data length.

CSIO function.

CSIO mode (Master/Slave)

CSIO status types.

CSIO synchronous wait time.

CSIO serial timer clock division.

typedef enum en_i2c_ack en_i2c_ack_t

I2C ACK types.

I2C data direction(used in slave mode)

typedef enum en_i2c_mode en_i2c_mode_t

I2C mode.

I2C status types.

Mfs Lin Break Generation Length (only applicable in LIN master mode)

Mfs Lin Break Delimiter Length (only applicable in LIN master mode)

typedef enum en_lin_func en_lin_func_t

LIN function.

MFS LIN mode (Master/Slave)

LIN status types.

LIN stop bit length.

Mfs FIFO Selection.

typedef enum en_mfs_fifo en_mfs_fifo_t

Mfs FIFO Number.

Enumeration to define an index for each enabled MFS instance.

typedef enum en_mfs_mode en_mfs_mode_t

MFS mode.

UART data direction.

UART data length.

UART functions.

MFS UART mode.

UART parity format.

UART status types.

UART stop bits length.

typedef struct stc_csio_cs stc_csio_cs_t

CSIO chip selection configuration.

CSIO interrupt callback function.

CSIO interrupt selection.

CSIO serial timer configuration.

I2C interrupt callback function.

I2C interrupt selection.

LIN interrupt callback function.

LIN interrupt selection.

CSIO configuration structure.

Mfs FIFO configuration.

I2C configuration structure.

MFS instance data type.

MFS module internal data, storing internal information for each enabled MFS instance.

LIN configuration structure.

UART configuration structure.

typedef struct stc_mfsn stc_mfsn_t

MFS common instance structure.

UART interrupt callback function.

UART interrupt selection.


Enumeration Type Documentation

CSIO chip selection pin level.

Note:
It is only available for SCS0 pin for each CSIO channel
Enumerator:
CsLowActive 

Set high as active level for SCS0 pin.

CsHighActive 

Set low as active level for SCS0 pin.

Definition at line 699 of file mfs.h.

CSIO chip selection pin.

Enumerator:
CsPinScs0 

Use SCS0 as chip selection pin.

CsPinScs1 

Use SCS1 as chip selection pin.

CsPinScs2 

Use SCS2 as chip selection pin.

CsPinScs3 

Use SCS3 as chip selection pin.

Definition at line 685 of file mfs.h.

CSIO chip selection clock division.

Enumerator:
CsClkNoDiv 

Chip selection clock = PCLK.

CsClkDiv2 

Chip selection clock = PCLK/2.

CsClkDiv4 

Chip selection clock = PCLK/4.

CsClkDiv8 

Chip selection clock = PCLK/8.

CsClkDiv16 

Chip selection clock = PCLK/16.

CsClkDiv32 

Chip selection clock = PCLK/32.

CsClkDiv64 

Chip selection clock = PCLK/64.

Definition at line 710 of file mfs.h.

CSIO active mode (Normal/SPI)

Enumerator:
CsioActNormalMode 

Normal mode.

CsioActSpiMode 

SPI mode.

Definition at line 603 of file mfs.h.

CSIO bit direction.

Enumerator:
CsioDataLsbFirst 

LSB first.

CsioDataMsbFirst 

MSB first.

Definition at line 645 of file mfs.h.

CSIO data length.

Enumerator:
CsioFiveBits 

5 Bit character length

CsioSixBits 

6 Bit character length

CsioSevenBits 

7 Bit character length

CsioEightBits 

8 Bit character length

CsioNineBits 

9 Bit character length

CsioTenBits 

10 Bit character length

CsioElevenBits 

11 Bit character length

CsioTwelveBits 

12 Bit character length

CsioThirteenBits 

13 Bit character length

CsioFourteenBits 

14 Bit character length

CsioFifteenBits 

15 Bit character length

CsioSixteenBits 

16 Bit character length

Definition at line 613 of file mfs.h.

CSIO function.

Enumerator:
CsioTx 

CSIO TX.

CsioRx 

CSIO RX.

CsioSerialTimer 

CSIO Serial TImer.

CsioCsErrOccur 

CSIO chip selection error occurrence.

Definition at line 751 of file mfs.h.

CSIO mode (Master/Slave)

Enumerator:
CsioMaster 

Master mode (generating serial clock)

CsioSlave 

Slave mode (external serial clock)

Definition at line 593 of file mfs.h.

CSIO status types.

Enumerator:
CsioOverrunError 

CSIO overrun error.

CsioRxFull 

CSIO RX completion.

CsioTxEmpty 

CSIO TX buffer empty.

CsioTxIdle 

CSIO TX idle.

CsioTxFifoRequest 

CSIO TX FIFO request.

CsioCsErrIntFlag 

CSIO chip selection error occurrence.

CsioTimerIntFlag 

CSIO serial timer interrupt.

Definition at line 794 of file mfs.h.

CSIO synchronous wait time.

Enumerator:
CsioSyncWaitZero 

0 wait time insertion

CsioSyncWaitOne 

1 wait time insertion

CsioSyncWaitTwo 

2 wait time insertion

CsioSyncWaitThree 

3 wait time insertion

Definition at line 633 of file mfs.h.

CSIO serial timer clock division.

Enumerator:
CsioTimerNoDiv 

Serial Timer clock = PCLK.

CsioTimerDiv2 

Serial Timer clock = PCLK/2.

CsioTimerDiv4 

Serial Timer clock = PCLK/4.

CsioTimerDiv8 

Serial Timer clock = PCLK/8.

CsioTimerDiv16 

Serial Timer clock = PCLK/16.

CsioTimerDiv32 

Serial Timer clock = PCLK/32.

CsioTimerDiv64 

Serial Timer clock = PCLK/64.

CsioTimerDiv128 

Serial Timer clock = PCLK/128.

CsioTimerDiv256 

Serial Timer clock = PCLK/256.

Definition at line 655 of file mfs.h.

enum en_i2c_ack

I2C ACK types.

Enumerator:
I2cAck 

I2C normal ACK.

I2cNAck 

I2C NACK.

Definition at line 850 of file mfs.h.

I2C data direction(used in slave mode)

Enumerator:
i2c_master_tx_slave_rx 

Data from master to slave.

i2c_slave_tx_master_rx 

Data from slave to master.

Definition at line 911 of file mfs.h.

I2C mode.

Enumerator:
I2cMaster 

I2C Master mode.

I2cSlave 

I2C Slave mode.

Definition at line 839 of file mfs.h.

I2C status types.

Enumerator:
I2cOverrunError 

I2C overrun error.

I2cRxFull 

I2C RX buffer full.

I2cTxEmpty 

I2C TX buffer empty.

I2cTxIdle 

I2C TX idle.

I2cTxFifoRequest 

I2C TX FIFO request.

I2cFirstByteDetect 

I2C First byte detection.

I2cReservedByteDetect 

I2C reserved byte detection.

I2cStopDetect 

I2C stop condition detection.

I2cBusStatus 

I2C Bus status.

I2cBusErr 

I2C Bus error.

I2cRxTxInt 

I2C transimission or reception interrupt flag.

I2cDevAddrMatch 

I2C received slave address matchs with pre-set address.

Definition at line 891 of file mfs.h.

Mfs Lin Break Generation Length (only applicable in LIN master mode)

Enumerator:
LinBreakLength13 

Lin Break Length 13 Bit Times.

LinBreakLength14 

Lin Break Length 14 Bit Times.

LinBreakLength15 

Lin Break Length 15 Bit Times.

LinBreakLength16 

Lin Break Length 16 Bit Times.

Definition at line 965 of file mfs.h.

Mfs Lin Break Delimiter Length (only applicable in LIN master mode)

Enumerator:
LinDelimiterLength1 

Lin Break Delimiter Length 1 Bit Time.

LinDelimiterLength2 

Lin Break Delimiter Length 2 Bit Times.

LinDelimiterLength3 

Lin Break Delimiter Length 3 Bit Times.

LinDelimiterLength4 

Lin Break Delimiter Length 4 Bit Times.

Definition at line 977 of file mfs.h.

LIN function.

Enumerator:
LinTx 

Lin TX.

LinRx 

Lin RX.

Definition at line 989 of file mfs.h.

MFS LIN mode (Master/Slave)

Enumerator:
LinMasterMode 

LIN Master Mode.

LinSlaveMode 

LIN Slave Mode.

Definition at line 943 of file mfs.h.

LIN status types.

Enumerator:
LinFrameError 

LIN Frame error.

LinOverrunError 

LIN overrun error.

LinRxFull 

LIN RX buffer full.

LinTxEmpty 

LIN TX buffer empty.

LinTxIdle 

LIN TX idle.

LinBreakFlag 

LIN break field detection flag.

LinTxFifoRequest 

LIN FIFO request.

Definition at line 1028 of file mfs.h.

LIN stop bit length.

Enumerator:
LinOneStopBit 

1 Stop Bit

LinTwoStopBits 

2 Stop Bits

LinThreeStopBits 

3 Stop Bits

LinFourStopBits 

4 Stop Bits

Definition at line 953 of file mfs.h.

Mfs FIFO Number.

Enumerator:
MfsFifo1 

FIFO No.1.

MfsFifo2 

FIFO No.2.

Definition at line 448 of file mfs.h.

Mfs FIFO Selection.

Enumerator:
MfsTxFifo1RxFifo2 

Transmit FIFO:FIFO1, Received FIFO:FIFO2.

MfsTxFifo2RxFifo1 

Transmit FIFO:FIFO2, Received FIFO:FIFO1.

Definition at line 427 of file mfs.h.

Enumeration to define an index for each enabled MFS instance.

Enumerator:
MfsInstanceIndexMfs0 
MfsInstanceIndexMfs1 
MfsInstanceIndexMfs2 
MfsInstanceIndexMfs3 
MfsInstanceIndexMfs4 
MfsInstanceIndexMfs5 
MfsInstanceIndexMfs6 
MfsInstanceIndexMfs7 
MfsInstanceIndexMfs8 
MfsInstanceIndexMfs9 
MfsInstanceIndexMfs10 
MfsInstanceIndexMfs11 
MfsInstanceIndexMfs12 
MfsInstanceIndexMfs13 
MfsInstanceIndexMfs14 
MfsInstanceIndexMfs15 
MfsInstanceIndexMax 
MfsInstanceIndexUnknown 

Definition at line 1061 of file mfs.h.

MFS mode.

Enumerator:
MfsInitMode 

MFS initial mode.

MfsUartMode 

MFS UART mode.

MfsCsioMode 

MFS CSIO mode.

MfsI2cMode 

MFS I2C mode.

MfsLinMode 

MFS LIN mode.

Definition at line 1126 of file mfs.h.

MFS UART mode.

Enumerator:
UartNormal 

Normal mode.

UartMulti 

Multi-Processor Mode.

Definition at line 461 of file mfs.h.

UART data direction.

Enumerator:
UartDataLsbFirst 

LSB first.

UartDataMsbFirst 

MSB first.

Definition at line 507 of file mfs.h.

UART data length.

Enumerator:
UartEightBits 

8 Bit character length

UartFiveBits 

5 Bit character length

UartSixBits 

6 Bit character length

UartSevenBits 

7 Bit character length

UartNineBits 

9 Bit character length

Definition at line 471 of file mfs.h.

UART functions.

Enumerator:
UartTx 

UART TX.

UartRx 

UART RX.

Definition at line 517 of file mfs.h.

UART parity format.

Enumerator:
UartParityNone 

No parity bit is used.

UartParityEven 

Even parity bit is used.

UartParityOdd 

Odd parity bit is used.

Definition at line 484 of file mfs.h.

UART status types.

Enumerator:
UartParityError 

Parity error.

UartFrameError 

Frame error.

UartOverrunError 

Overrun error.

UartRxFull 

RX completion.

UartTxEmpty 

TX buffer empty.

UartTxIdle 

TX idle.

UartTxFifoRequest 

TX FIFO request.

Definition at line 554 of file mfs.h.

UART stop bits length.

Enumerator:
UartOneStopBit 

1 Stop Bit

UartTwoStopBits 

2 Stop Bits

UartThreeStopBits 

3 Stop Bits

UartFourStopBits 

4 Stop Bits

Definition at line 495 of file mfs.h.


Function Documentation

en_result_t Mfs_Csio_ClrStatus ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio,
en_csio_status_t  enStatus 
)

Clear status of CSIO according to status type.

Parameters:
[in]pstcCsioPointer to CSIO instance
[in]enStatusUART status type
  • CsioOverrunError CSIO overrun error
  • CsioRxFull CSIO receive buffer full
  • CsioTxEmpty CSIO tranfer buffer empty
  • CsioTxIdle CSIO tranfer idle status
  • CsioTxFifoRequest CSIO transfer FIFO request
  • CsioCsErrIntFlag CSIO chip selection error occurrance
Return values:
OkStatus has been cleared normally
ErrorInvalidParameterIf one of following conditions are met:
  • pstcUart == NULL
Note:
The following status can only be cleared by hardware behavior:
  • CsioRxFull
  • CsioTxEmpty
  • CsioTxIdle

Definition at line 3114 of file mfs.c.

References CsioCsErrIntFlag, CsioOverrunError, CsioRxFull, CsioTimerIntFlag, CsioTxEmpty, CsioTxFifoRequest, CsioTxIdle, ErrorInvalidParameter, and Ok.

en_result_t Mfs_Csio_DeInit ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio)

Deinitialisation of a MFS module activating as CSIO.

All used CSIO register are reset to their default values.

Parameters:
[in]pstcCsioPointer to CSIO instance register area
Return values:
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 2717 of file mfs.c.

References ErrorInvalidParameter, FALSE, MfsCsioGetInternDataPtr(), Ok, and TRUE.

Here is the call graph for this function:

en_result_t Mfs_Csio_DisableFunc ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio,
en_csio_func_t  enFunc 
)

Disable CSIO functions.

Parameters:
[in]pstcCsioPointer to CSIO instance
[in]enFuncCSIO function types
  • CsioTx CSIO transfer function
  • CsioRx CSIO receive function
  • CsioSerialTimer CSIO transfer function
  • CsioCsErrOccur CSIO receive function
Return values:
OkFunction has been disabled normally
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL

Definition at line 2997 of file mfs.c.

References CsioCsErrOccur, CsioRx, CsioSerialTimer, CsioTx, ErrorInvalidParameter, and Ok.

Referenced by CsioRxData(), CsioRxReg(), CsioTxCmd(), CsioTxCmdAddr(), and CsioTxData().

Here is the caller graph for this function:

en_result_t Mfs_Csio_DisableInt ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio,
stc_csio_int_sel_t pstcInt 
)

Disable CSIO interrupts.

Parameters:
[in]pstcCsioPointer to CSIO instance
[in]pstcIntPointer to the selection structure of CSIO interrupt
Return values:
OkInterrupts has been disabled and callback function pointers are set to NULL
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL
  • pstcInt == NULL

The NVIC IRQ is also disabled in this function if all interrupt sources are disable.

Definition at line 2192 of file mfs.c.

References stc_csio_int_sel::bCsErrInt, stc_csio_int_sel::bRxInt, stc_csio_int_sel::bSerialTimerInt, stc_csio_int_sel::bTxFifoInt, stc_csio_int_sel::bTxIdle, stc_csio_int_sel::bTxInt, CsioInstanceToIndex, ErrorInvalidParameter, FALSE, Mfs_DeInitIrq(), MfsCsioGetInstanceIndex(), MfsCsioGetInternDataPtr(), MfsInstanceIndexUnknown, Ok, stc_csio_int_cb::pfnCsErrIntCb, stc_csio_int_cb::pfnRxIntCb, stc_csio_int_cb::pfnSerialTimerIntCb, stc_csio_int_cb::pfnTxFifoIntCb, stc_csio_int_cb::pfnTxIdleCb, stc_csio_int_cb::pfnTxIntCb, stc_mfs_intern_data::stcCsioInternIntCb, and TRUE.

Referenced by CsioMasterRxIntCallback(), and CsioMasterTxIntCallback().

Here is the call graph for this function:

Here is the caller graph for this function:

en_result_t Mfs_Csio_EnableFunc ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio,
en_csio_func_t  enFunc 
)

Enable CSIO functions.

Parameters:
[in]pstcCsioPointer to CSIO instance
[in]enFuncCSIO function types
  • CsioTx CSIO transfer function
  • CsioRx CSIO receive function
  • CsioSerialTimer CSIO serial timer function
  • CsioCsErrOccur CSIO chip selection error detection function
Return values:
OkFunction has been enabled normally
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL

Definition at line 2953 of file mfs.c.

References CsioCsErrOccur, CsioRx, CsioSerialTimer, CsioTx, ErrorInvalidParameter, and Ok.

Referenced by CsioRxData(), CsioRxReg(), CsioTxCmd(), CsioTxCmdAddr(), and CsioTxData().

Here is the caller graph for this function:

en_result_t Mfs_Csio_EnableInt ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio,
stc_csio_int_sel_t pstcInt,
stc_csio_int_cb_t pstcIntCb 
)

Enable CSIO interrupts.

Parameters:
[in]pstcCsioPointer to CSIO instance
[in]pstcIntPointer to the selection structure of CSIO interrupt
[in]pstcIntCbPointer to the structure of CSIO interrupt callback functions
Return values:
OkInterrupts has been enabled and callback functions are set
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL
  • pstcInt == NULL
  • pstcIntCb == NULL
  • Other invalid configuration

The NVIC IRQ is also enabled in this function.

Definition at line 2105 of file mfs.c.

References stc_csio_int_sel::bCsErrInt, stc_csio_int_sel::bRxInt, stc_csio_int_sel::bSerialTimerInt, stc_csio_int_sel::bTxFifoInt, stc_csio_int_sel::bTxIdle, stc_csio_int_sel::bTxInt, ErrorInvalidParameter, FALSE, Mfs_InitIrq(), MfsCsioGetInstanceIndex(), MfsCsioGetInternDataPtr(), MfsInstanceIndexUnknown, Ok, stc_csio_int_cb::pfnCsErrIntCb, stc_csio_int_cb::pfnRxIntCb, stc_csio_int_cb::pfnSerialTimerIntCb, stc_csio_int_cb::pfnTxFifoIntCb, stc_csio_int_cb::pfnTxIdleCb, stc_csio_int_cb::pfnTxIntCb, stc_mfs_intern_data::stcCsioInternIntCb, and TRUE.

Referenced by CsioRxData(), CsioRxReg(), CsioTxCmd(), CsioTxCmdAddr(), and CsioTxData().

Here is the call graph for this function:

Here is the caller graph for this function:

uint8_t Mfs_Csio_GetFifoCount ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio,
en_mfs_fifo_t  enFifo 
)

Get CSIO FIFO count.

Parameters:
[in]pstcCsioPointer to CSIO instance
[in]enFifoFIFO1 or FIFO2
Return values:
FIFOcount

This function gets the current data count in selected FIFO.

Note:
0xFF will be return value if FIFO index is error.

Definition at line 3278 of file mfs.c.

References MfsFifo1, and MfsFifo2.

boolean_t Mfs_Csio_GetStatus ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio,
en_csio_status_t  enStatus 
)

Get status of CSIO according to status type.

Parameters:
[in]pstcCsioPointer to CSIO instance
[in]enStatusCSIO status type
  • CsioOverrunError CSIO parity error
  • CsioRxFull CSIO receive buffer full
  • CsioTxEmpty CSIO tranfer buffer empty
  • CsioTxIdle CSIO tranfer idle status
  • CsioTxFifoRequest CSIO transfer FIFO request
  • CsioCsErrIntFlag CSIO chip selection error occurrance
  • CsioTimerIntFlag CSIO serial timer interrupt flag
Return values:
FALSEIf one of following conditions are met:
  • No CSIO overrun error [enStatus = CsioOverrunError]
  • CSIO receive buffer is not full [enStatus = CsioRxFull]
  • CSIO tranfer buffer is not empty [enStatus = CsioTxEmpty]
  • CSIO tranfer is on-going [enStatus = CsioTxIdle]
  • No CSIO transfer FIFO request [enStatus = CsioTxFifoRequest]
  • CSIO chip selection error doesn't occur [enStatus = CsioCsErrIntFlag]
  • CSIO serial timer interrupt doesn't occur [enStatus = CsioTimerIntFlag]
TRUEIf one of following conditions are met:
  • CSIO overrun error occurs [enStatus = CsioOverrunError]
  • CSIO receive buffer is full [enStatus = CsioRxFull]
  • CSIO tranfer buffer is empty [enStatus = CsioTxEmpty]
  • CSIO tranfer is idle [enStatus = CsioTxIdle]
  • CSIO transfer FIFO request issues [enStatus = CsioTxFifoRequest]
  • CSIO chip selection error occurs [enStatus = CsioCsErrIntFlag]
  • CSIO serial timer interrupt occurs [enStatus = CsioTimerIntFlag]

Definition at line 3057 of file mfs.c.

References CsioCsErrIntFlag, CsioOverrunError, CsioRxFull, CsioTimerIntFlag, CsioTxEmpty, CsioTxFifoRequest, CsioTxIdle, FALSE, and TRUE.

Referenced by CsioRxData(), CsioRxReg(), CsioTxCmd(), CsioTxCmdAddr(), and CsioTxData().

Here is the caller graph for this function:

en_result_t Mfs_Csio_Init ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio,
const stc_mfs_csio_config_t pstcConfig 
)

Initialization of a MFS module to activate as CSIO.

Set registers to active MFS as CSIO.

Parameters:
[in]pstcCsioPointer to CSIO instance register area
[in]pstcConfigMFS CSIO configuration
Return values:
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL
  • pstcConfig == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 2348 of file mfs.c.

References stc_csio_cs::bActiveHold, stc_mfs_csio_config::bEnableFifo, stc_mfs_csio_config::bEnChipSelection, stc_mfs_csio_config::bEnSyncTransfer, stc_mfs_csio_config::bInvertClk, stc_csio_cs::bScs0En, stc_csio_cs::bScs1En, stc_csio_cs::bScs2En, stc_csio_cs::bScs3En, CsClkDiv16, CsClkDiv2, CsClkDiv32, CsClkDiv4, CsClkDiv64, CsClkDiv8, CsClkNoDiv, CsHighActive, CsioActNormalMode, CsioActSpiMode, CsioDataLsbFirst, CsioDataMsbFirst, CsioEightBits, CsioElevenBits, CsioFifteenBits, CsioFiveBits, CsioFourteenBits, CsioMaster, CsioNineBits, CsioSevenBits, CsioSixBits, CsioSixteenBits, CsioSlave, CsioSyncWaitOne, CsioSyncWaitThree, CsioSyncWaitTwo, CsioSyncWaitZero, CsioTenBits, CsioThirteenBits, CsioTimerDiv128, CsioTimerDiv16, CsioTimerDiv2, CsioTimerDiv256, CsioTimerDiv32, CsioTimerDiv4, CsioTimerDiv64, CsioTimerDiv8, CsioTimerNoDiv, CsioTwelveBits, CsLowActive, CsPinScs0, CsPinScs1, CsPinScs2, CsPinScs3, stc_mfs_csio_config::enActMode, stc_mfs_csio_config::enBitDirection, stc_csio_serial_timer::enClkDiv, stc_csio_cs::enClkDiv, stc_csio_cs::enCsEndPin, stc_csio_cs::enCsStartPin, stc_mfs_csio_config::enDataLength, stc_mfs_fifo_config::enFifoSel, stc_csio_cs::enLevel, stc_mfs_intern_data::enMode, stc_mfs_csio_config::enMsMode, stc_mfs_csio_config::enSyncWaitTime, ErrorInvalidParameter, FALSE, Mfs_Csio_SetBaudRate(), MfsCsioGetInternDataPtr(), MfsCsioMode, MfsTxFifo1RxFifo2, MfsTxFifo2RxFifo1, Ok, stc_mfs_csio_config::stcCsConfig, stc_mfs_csio_config::stcFifoConfig, stc_mfs_csio_config::stcSerialTimer, TRUE, stc_csio_serial_timer::u16CompareVal, stc_csio_cs::u16CsDeselectTime, stc_mfs_csio_config::u32BaudRate, stc_mfs_fifo_config::u8ByteCount1, stc_mfs_fifo_config::u8ByteCount2, stc_csio_cs::u8CsHoldDelayTime, stc_csio_cs::u8CsSetupDelayTime, stc_csio_cs::u8Scs0TransferByteCnt, stc_csio_cs::u8Scs1TransferByteCnt, stc_csio_cs::u8Scs2TransferByteCnt, stc_csio_cs::u8Scs3TransferByteCnt, and stc_csio_serial_timer::u8TransferByteCnt.

Referenced by S25fl127s_Init().

Here is the call graph for this function:

Here is the caller graph for this function:

uint16_t Mfs_Csio_ReceiveData ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio)

Read CSIO data buffer.

Parameters:
[in]pstcCsioPointer to CSIO instance
Return values:
Receivedata

Definition at line 3187 of file mfs.c.

Referenced by CsioMasterRxIntCallback().

Here is the caller graph for this function:

en_result_t Mfs_Csio_ResetFifo ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio,
en_mfs_fifo_t  enFifo 
)

Reset CSIO FIFO.

Parameters:
[in]pstcCsioPointer to CSIO instance
[in]enFifoFIFO1 or FIFO2
Return values:
OkFIFO has been successfully reset
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL

Definition at line 3204 of file mfs.c.

References ErrorInvalidParameter, MfsFifo1, MfsFifo2, and Ok.

en_result_t Mfs_Csio_SendData ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio,
uint16_t  u16Data,
boolean_t  bSotEn 
)

Write CSIO data buffer.

Parameters:
[in]pstcCsioPointer to CSIO instance
[in]u16DataSend data
[in]bSotEnSOT output enable
  • FALSE Mask SOT output
  • TRUE Enable SOT output
Return values:
OkData has been successfully sent
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL

Definition at line 3162 of file mfs.c.

References ErrorInvalidParameter, Ok, and TRUE.

Referenced by CsioMasterTxIntCallback(), CsioRxData(), and CsioRxReg().

Here is the caller graph for this function:

en_result_t Mfs_Csio_SetBaudRate ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio,
uint32_t  u32BaudRate 
)

Set the baudrate of CSIO.

Parameters:
[in]pstcCsioPointer to CSIO instance
[in]u32BaudRateBaudrate value [bps]
Return values:
OkCSIO baud rate has been successfully modified
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL
  • u32BaudRate < 3
Note:
The CSIO baud rate can be initialized in the Mfs_Csio_Init() and be modified in the funciton.

Definition at line 2786 of file mfs.c.

References __HCLK, APBC1_PSR_Val, ErrorInvalidParameter, and Ok.

Referenced by Mfs_Csio_Init().

Here is the caller graph for this function:

en_result_t Mfs_Csio_SetCsHoldStatus ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio,
boolean_t  bHold 
)

Set the hold status of chip selection pin.

Parameters:
[in]pstcCsioPointer to CSIO instance
[in]bHold
  • FALSE Make the CS pin inactive if specified count bytes are transferred
  • TRUE Hold the CS pin status even if specified count bytes are transferred
Return values:
OkHold status of chip selection pin is set
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL

Definition at line 2895 of file mfs.c.

References ErrorInvalidParameter, Ok, and TRUE.

Referenced by CsioRxData(), and CsioTxData().

Here is the caller graph for this function:

en_result_t Mfs_Csio_SetCsTransferByteCount ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio,
en_cs_pin_sel_t  enCsPin,
uint8_t  u8ByteCnt 
)

Set the transfer byte count of a selected chip selection pin.

Parameters:
[in]pstcCsioPointer to CSIO instance
[in]enCsPinCS pin index
[in]u8ByteCntTransfer byte count of a CS pin
Return values:
OkTransfer byte count has been successfully modified
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL
Note:
The transfer byte count of chip selection pin can be initialized in the Mfs_Csio_Init() and be modified in this funciton.

Definition at line 2849 of file mfs.c.

References CsPinScs0, CsPinScs1, CsPinScs2, CsPinScs3, ErrorInvalidParameter, and Ok.

Referenced by CsioRxData(), CsioRxReg(), CsioTxCmd(), CsioTxCmdAddr(), and CsioTxData().

Here is the caller graph for this function:

en_result_t Mfs_Csio_SetFifoCount ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio,
en_mfs_fifo_t  enFifo,
uint8_t  u8Count 
)

Set CSIO FIFO count.

Parameters:
[in]pstcCsioPointer to CSIO instance
[in]enFifoFIFO1 or FIFO2
[in]u8CountFIFO count
Return values:
OkFIFO count has been successfully set
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL

Definition at line 3240 of file mfs.c.

References ErrorInvalidParameter, MfsFifo1, MfsFifo2, and Ok.

en_result_t Mfs_Csio_SetTimerCompareValue ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio,
uint16_t  u16CompareValue 
)

Set the compare value of CSIO serial timer.

Parameters:
[in]pstcCsioPointer to CSIO instance
[in]u16CompareValueCompare value
Return values:
OkCompare value has been successfully modified
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL
Note:
The compare value of CSIO serial timer can be initialized in the Mfs_Csio_Init() and be modified in this function.

Definition at line 2819 of file mfs.c.

References ErrorInvalidParameter, and Ok.

en_result_t Mfs_Csio_SetTimerTransferByteCount ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio,
uint8_t  u8ByteCnt 
)

Set the transfer byte count of CSIO serial timer.

Parameters:
[in]pstcCsioPointer to CSIO instance
[in]u8ByteCntTransfer byte count
Return values:
OkTransfer byte count has been successfully modified
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL
Note:
The transfer byte count of CSIO serial timer can be initialized in the Mfs_Csio_Init() and be modified in this function.

Definition at line 2924 of file mfs.c.

References ErrorInvalidParameter, and Ok.

static void Mfs_DeInitIrq ( en_mfs_instance_index_t  enIndex,
boolean_t  bRxTx 
) [static]
en_result_t Mfs_I2c_ClrStatus ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c,
en_i2c_status_t  enStatus 
)

Clear status of I2C according to status type.

Parameters:
[in]pstcI2cPointer to I2C instance
[in]enStatusI2C status type
  • I2cOverrunError I2C overrun error
  • I2cRxFull I2C receive buffer full
  • I2cTxEmpty I2C tranfer buffer empty
  • I2cTxFifoRequest I2C transfer FIFO request
  • I2cTxIdle I2C tranfer idle status
  • I2cFirstByteDetect I2C first byte detection
  • I2cReservedByteDetect I2C reserved address detection
  • I2cStopDetect I2C stop condition detection
  • I2cBusStatus I2C bus status
  • I2cBusErr I2C bus error
  • I2cRxTxInt I2C transfer and receive interrupt flag
Return values:
OkStatus has been cleared normally
ErrorInvalidParameterIf one of following conditions are met:
  • pstcI2c == NULL
Note:
The following status can only be cleared by hardware behavior:
  • I2cRxFull
  • I2cTxEmpty
  • I2cTxIdle
  • I2cFirstByteDetect
  • I2cReservedByteDetect
  • I2cBusStatus
  • I2cBusErr

Definition at line 4235 of file mfs.c.

References ErrorInvalidParameter, I2cBusErr, I2cBusStatus, I2cDevAddrMatch, I2cFirstByteDetect, I2cOverrunError, I2cReservedByteDetect, I2cRxFull, I2cRxTxInt, I2cStopDetect, I2cTxEmpty, I2cTxFifoRequest, I2cTxIdle, and Ok.

Referenced by I2cIntCallback(), I2cRead(), I2cRxCallback(), I2cSendData(), I2cStop(), I2cStopDetectCallback(), and I2cTxCallback().

Here is the caller graph for this function:

en_result_t Mfs_I2c_ConfigAck ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c,
en_i2c_ack_t  enAck 
)

Configure ACK signal sent to master.

Parameters:
[in]pstcI2cPointer to I2C instance
[in]enAckACK to be sent
  • I2cAck ACK will be sent as response signal
  • I2cNAck NACK will be sent as response signal
Return values:
OkACK signal has been successfully configured
ErrorInvalidParameterIf one of following conditions are met:
  • pstcI2c == NULL

This function is only meaningful when I2C is in slave mode

Definition at line 4061 of file mfs.c.

References ErrorInvalidParameter, I2cAck, and Ok.

Referenced by I2cIntCallback(), I2cRead(), I2cRestart(), I2cRxCallback(), I2cStart(), and I2cTxCallback().

Here is the caller graph for this function:

en_result_t Mfs_I2c_DeInit ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c)

Deinitialisation of a MFS module activating as I2C.

All used I2C register are reset to their default values.

Parameters:
[in]pstcI2cPointer to I2C instance register area
Return values:
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcI2c == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 3835 of file mfs.c.

References ErrorInvalidParameter, FALSE, MfsI2cGetInternDataPtr(), Ok, and TRUE.

Here is the call graph for this function:

en_result_t Mfs_I2c_DisableInt ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c,
stc_i2c_int_sel_t pstcInt 
)

Disable I2C interrupts.

Parameters:
[in]pstcI2cPointer to I2C instance
[in]pstcIntPointer to the selection structure of I2C interrupt
Return values:
OkInterrupts has been disabled and callback functions are set to NULL
ErrorInvalidParameterIf one of following conditions are met:
  • pstcI2c == NULL
  • pstcInt == NULL
  • pstcIntCb == NULL
  • Other invalid configuration

The NVIC IRQ is also disabled in this function if all interrupt sources are disable.

Definition at line 3580 of file mfs.c.

References stc_i2c_int_sel::bRxInt, stc_i2c_int_sel::bStopDetectInt, stc_i2c_int_sel::bTxFifoInt, stc_i2c_int_sel::bTxIdle, stc_i2c_int_sel::bTxInt, stc_i2c_int_sel::bTxRxInt, ErrorInvalidParameter, I2cInstanceToIndex, Mfs_DeInitIrq(), MfsI2cGetInstanceIndex(), MfsI2cGetInternDataPtr(), MfsInstanceIndexUnknown, Ok, stc_i2c_int_cb::pfnRxIntCb, stc_i2c_int_cb::pfnStopDetectCb, stc_i2c_int_cb::pfnTxFifoIntCb, stc_i2c_int_cb::pfnTxIdleCb, stc_i2c_int_cb::pfnTxIntCb, stc_i2c_int_cb::pfnTxRxCb, stc_mfs_intern_data::stcI2cInternIntCb, and TRUE.

Referenced by I2cStopDetectCallback(), and I2cTxCallback().

Here is the call graph for this function:

Here is the caller graph for this function:

en_result_t Mfs_I2c_EnableInt ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c,
stc_i2c_int_sel_t pstcInt,
stc_i2c_int_cb_t pstcIntCb 
)

Enable I2C interrupts.

Parameters:
[in]pstcI2cPointer to I2C instance
[in]pstcIntPointer to the selection structure of I2C interrupt
[in]pstcIntCbPointer to the structure of I2C interrupt callback functions
Return values:
OkInterrupts has been enabled and callback functions are set
ErrorInvalidParameterIf one of following conditions are met:
  • pstcI2c == NULL
  • pstcInt == NULL
  • pstcIntCb == NULL
  • Other invalid configuration

The NVIC IRQ is also enabled in this function.

Definition at line 3491 of file mfs.c.

References stc_i2c_int_sel::bRxInt, stc_i2c_int_sel::bStopDetectInt, stc_i2c_int_sel::bTxFifoInt, stc_i2c_int_sel::bTxIdle, stc_i2c_int_sel::bTxInt, stc_i2c_int_sel::bTxRxInt, ErrorInvalidParameter, FALSE, Mfs_InitIrq(), MfsI2cGetInstanceIndex(), MfsI2cGetInternDataPtr(), MfsInstanceIndexUnknown, Ok, stc_i2c_int_cb::pfnRxIntCb, stc_i2c_int_cb::pfnStopDetectCb, stc_i2c_int_cb::pfnTxFifoIntCb, stc_i2c_int_cb::pfnTxIdleCb, stc_i2c_int_cb::pfnTxIntCb, stc_i2c_int_cb::pfnTxRxCb, stc_mfs_intern_data::stcI2cInternIntCb, and TRUE.

Referenced by I2cRxData(), I2cTxData(), and I2cTxRxData().

Here is the call graph for this function:

Here is the caller graph for this function:

en_result_t Mfs_I2c_GenerateRestart ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c)

Generate restart signal of I2C.

Parameters:
[in]pstcI2cPointer to I2C instance
Return values:
OkGenerate restart signal successfully
ErrorInvalidParameterpstcI2c == NULL
ErrorTimeoutTimeout when generating a restart signal

Definition at line 3953 of file mfs.c.

References ErrorInvalidParameter, ErrorTimeout, Ok, and SystemCoreClock.

Referenced by I2cRestart(), and I2cTxCallback().

Here is the caller graph for this function:

en_result_t Mfs_I2c_GenerateStart ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c)

Generate start signal of I2C.

Parameters:
[in]pstcI2cPointer to I2C instance
Return values:
OkGenerate start signal successfully
ErrorInvalidParameterpstcI2c == NULL
ErrorTimeoutTimeout when generating a start signal

Definition at line 3921 of file mfs.c.

References ErrorInvalidParameter, ErrorTimeout, Ok, and SystemCoreClock.

Referenced by I2cStart(), and I2cTxCallback().

Here is the caller graph for this function:

en_result_t Mfs_I2c_GenerateStop ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c)

Generate stop signal of I2C.

Parameters:
[in]pstcI2cPointer to I2C instance
Return values:
OkGenerate stop signal successfully
ErrorInvalidParameterpstcI2c == NULL
ErrorTimeoutTimeout when generating a stop signal

Definition at line 3986 of file mfs.c.

References ErrorInvalidParameter, ErrorTimeout, Ok, and SystemCoreClock.

Referenced by I2cRxCallback(), I2cStop(), and I2cTxCallback().

Here is the caller graph for this function:

en_i2c_ack_t Mfs_I2c_GetAck ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c)

Get the ACK signal from slave.

Parameters:
[in]pstcI2cPointer to I2C instance
Return values:
I2cAckReceive the ACK from I2C Slave
I2cNAckReceive the NACK from I2C Slave

This function applies in the I2C master mode.

Definition at line 4092 of file mfs.c.

References I2cAck, and I2cNAck.

Referenced by I2cIntCallback(), I2cRestart(), I2cSendData(), and I2cStart().

Here is the caller graph for this function:

en_i2c_data_dir_t Mfs_I2c_GetDataDir ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c)

Get direction of I2C data in slave mode.

Parameters:
[in]pstcI2cPointer to I2C instance
Return values:
i2c_master_tx_slave_rxMaster will send data to slave
i2c_slave_tx_master_rxMaster will receive data from slave

This function can be called after receiving the device address from master in the slave mode.

Definition at line 4291 of file mfs.c.

References i2c_master_tx_slave_rx, and i2c_slave_tx_master_rx.

uint8_t Mfs_I2c_GetFifoCount ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c,
en_mfs_fifo_t  enFifo 
)

Get I2C FIFO count.

Parameters:
[in]pstcI2cPointer to I2C instance
[in]enFifoFIFO1 or FIFO2
Return values:
FIFOcount

This function gets the current data count in selected FIFO.

Note:
0xFF will be return value if FIFO index is error.

Definition at line 4386 of file mfs.c.

References MfsFifo1, and MfsFifo2.

boolean_t Mfs_I2c_GetStatus ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c,
en_i2c_status_t  enStatus 
)

Get status of I2C according to status type.

Parameters:
[in]pstcI2cPointer to I2C instance
[in]enStatusI2C status type
  • I2cOverrunError I2C overrun error
  • I2cRxFull I2C receive buffer full
  • I2cTxEmpty I2C tranfer buffer empty
  • I2cTxFifoRequest I2C transfer FIFO request
  • I2cTxIdle I2C tranfer idle status
  • I2cFirstByteDetect I2C first byte detection
  • I2cReservedByteDetect I2C reserved address detection
  • I2cStopDetect I2C stop condition detection
  • I2cBusStatus I2C bus status
  • I2cBusErr I2C bus error
  • I2cRxTxInt I2C transfer and receive interrupt flag
Return values:
FALSEIf one of following conditions are met:
  • No I2C overrun error [enStatus = I2cOverrunError]
  • I2C receive buffer is not full [enStatus = I2cRxFull]
  • I2C tranfer buffer is not empty [enStatus = I2cTxEmpty]
  • I2C tranfer FIFO request doesn't issue [enStatus = I2cTxFifoRequest]
  • I2C tranfer is on-going [enStatus = I2cTxIdle]
  • I2C first byte is not detected [enStatus = I2cFirstByteDetect]
  • I2C reserved address is not detected [enStatus = I2cReservedByteDetect]
  • I2C stop condition is not detected [enStatus = I2cStopDetect]
  • I2C bus is idle [enStatus = I2cBusStatus]
  • I2C bus error doesn't occur [enStatus = I2cBusErr]
  • I2C transfer or receive is not completed. [enStatus = I2cRxTxInt]
TRUEIf one of following conditions are met:
  • I2C overrun error occurs [enStatus = I2cOverrunError]
  • I2C receive buffer is full [enStatus = I2cRxFull]
  • I2C tranfer buffer is empty [enStatus = I2cTxEmpty]
  • I2C tranfer FIFO request issues [enStatus = I2cTxFifoRequest]
  • I2C tranfer is idle [enStatus = I2cTxIdle]
  • I2C first byte is detected [enStatus = I2cFirstByteDetect]
  • I2C reserved address is detected [enStatus = I2cReservedByteDetect]
  • I2C stop condition is detected [enStatus = I2cStopDetect]
  • I2C bus is busy [enStatus = I2cBusStatus]
  • I2C bus error occurs [enStatus = I2cBusErr]
  • I2C transfer or receive is completed. [enStatus = I2cRxTxInt]

Definition at line 4146 of file mfs.c.

References FALSE, I2cBusErr, I2cBusStatus, I2cDevAddrMatch, I2cFirstByteDetect, I2cOverrunError, I2cReservedByteDetect, I2cRxFull, I2cRxTxInt, I2cStopDetect, I2cTxEmpty, I2cTxFifoRequest, I2cTxIdle, and TRUE.

Referenced by I2cCheckErrorStatus(), I2cIntCallback(), I2cRead(), I2cRestart(), I2cSendData(), I2cStart(), I2cStop(), and I2cStopDetectCallback().

Here is the caller graph for this function:

en_result_t Mfs_I2c_Init ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c,
const stc_mfs_i2c_config_t pstcConfig 
)

Initialization of a MFS module to activate as I2C.

Set registers to active MFS as I2C.

Parameters:
[in]pstcI2cPointer to I2C instance register area
[in]pstcConfigMFS I2C configuration
Return values:
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcI2c == NULL
  • pstcConfig == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 3712 of file mfs.c.

References stc_mfs_i2c_config::bDmaEnable, stc_mfs_i2c_config::bEnableFifo, stc_mfs_fifo_config::enFifoSel, stc_mfs_intern_data::enMode, stc_mfs_i2c_config::enMsMode, ErrorInvalidParameter, I2cMaster, I2cSlave, Mfs_I2c_SetBaudRate(), MfsI2cGetInternDataPtr(), MfsI2cMode, MfsTxFifo1RxFifo2, MfsTxFifo2RxFifo1, Ok, stc_mfs_i2c_config::stcFifoConfig, TRUE, stc_mfs_i2c_config::u32BaudRate, stc_mfs_fifo_config::u8ByteCount1, stc_mfs_fifo_config::u8ByteCount2, stc_mfs_i2c_config::u8SlaveAddr, and stc_mfs_i2c_config::u8SlaveMaskAddr.

Referenced by At24cxx_Init().

Here is the call graph for this function:

Here is the caller graph for this function:

uint8_t Mfs_I2c_ReceiveData ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c)

Read I2C data buffer.

Parameters:
[in]pstcI2cPointer to I2C instance
Return values:
Receivedata

Definition at line 4040 of file mfs.c.

Referenced by I2cRead(), and I2cRxCallback().

Here is the caller graph for this function:

en_result_t Mfs_I2c_ResetFifo ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c,
en_mfs_fifo_t  enFifo 
)

Reset I2C FIFO.

Parameters:
[in]pstcI2cPointer to I2C instance
[in]enFifoFIFO1 or FIFO2
Return values:
OkFIFO has been successfully reset
ErrorInvalidParameterIf one of following conditions are met:
  • pstcI2c == NULL

Definition at line 4312 of file mfs.c.

References ErrorInvalidParameter, MfsFifo1, MfsFifo2, and Ok.

en_result_t Mfs_I2c_SendData ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c,
uint8_t  u8Data 
)

Write I2C data buffer.

Parameters:
[in]pstcI2cPointer to I2C instance
[in]u8DataData to be sent
Return values:
OkData has been successfully sent
ErrorInvalidParameterIf one of following conditions are met:
  • pstcI2c == NULL

Definition at line 4019 of file mfs.c.

References ErrorInvalidParameter, and Ok.

Referenced by I2cRestart(), I2cSendData(), I2cStart(), and I2cTxCallback().

Here is the caller graph for this function:

en_result_t Mfs_I2c_SetBaudRate ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c,
uint32_t  u32BaudRate 
)

Set the baudrate of I2C.

Parameters:
[in]pstcI2cPointer to I2C instance
[in]u32BaudRateBaudrate value [bps]
Return values:
OkI2C baud rate has been successfully modified
ErrorInvalidParameterIf one of following conditions are met:
  • pstcI2c == NULL
  • u32BaudRate < 3

The I2C baud rate can be initialized in the Mfs_I2c_Init() and be modified with this function.

Definition at line 3890 of file mfs.c.

References __HCLK, APBC1_PSR_Val, ErrorInvalidParameter, FALSE, and Ok.

Referenced by Mfs_I2c_Init().

Here is the caller graph for this function:

en_result_t Mfs_I2c_SetFifoCount ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c,
en_mfs_fifo_t  enFifo,
uint8_t  u8Count 
)

Set I2C FIFO count.

Parameters:
[in]pstcI2cPointer to I2C instance
[in]enFifoFIFO1 or FIFO2
[in]u8CountFIFO count
Return values:
OkFIFO count has been successfully set
ErrorInvalidParameterIf one of following conditions are met:
  • pstcI2c == NULL

Definition at line 4348 of file mfs.c.

References ErrorInvalidParameter, MfsFifo1, MfsFifo2, and Ok.

en_result_t Mfs_Lin_ClrStatus ( volatile FM0P_MFS_LIN_TypeDef *  pstcLin,
en_lin_status_t  enStatus 
)

Clear status of LIN according to status type.

Parameters:
[in]pstcLinPointer to LIN instance
[in]enStatusLIN status type
  • LinParityError LIN parity error
  • LinFrameError LIN frame error
  • LinRxFull LIN receive buffer full
  • LinTxEmpty LIN tranfer buffer empty
  • LinTxIdle LIN tranfer idle status
  • LinBreakFlag LIN break field detection flag
  • LinTxFifoRequest LIN transfer FIFO request
Return values:
OkStatus has been cleared normally
ErrorInvalidParameterIf one of following conditions are met:
  • pstcLin == NULL
Note:
The following status can only be cleared by hardware behavior:
  • LinRxFull
  • LinTxEmpty
  • LinTxIdle

Definition at line 5254 of file mfs.c.

References ErrorInvalidParameter, LinBreakFlag, LinFrameError, LinOverrunError, LinRxFull, LinTxEmpty, LinTxFifoRequest, LinTxIdle, and Ok.

en_result_t Mfs_Lin_DeInit ( volatile FM0P_MFS_LIN_TypeDef *  pstcLin)

Deinitialisation of a MFS module activating as LIN.

All used LIN register are reset to their default values.

Parameters:
[in]pstcLinPointer to LIN instance register area
Return values:
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcLin == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 4990 of file mfs.c.

References ErrorInvalidParameter, FALSE, MfsLinGetInternDataPtr(), Ok, and TRUE.

Here is the call graph for this function:

en_result_t Mfs_Lin_DisableFunc ( volatile FM0P_MFS_LIN_TypeDef *  pstcLin,
en_lin_func_t  enFunc 
)

Disable LIN functions.

Parameters:
[in]pstcLinPointer to LIN instance
[in]enFuncLIN function types
  • LinTx LIN transfer function
  • LinRx LIN receive function
Return values:
OkFunction has been disabled normally
ErrorInvalidParameterIf one of following conditions are met:
  • pstcLin == NULL

Definition at line 5142 of file mfs.c.

References ErrorInvalidParameter, LinRx, LinTx, and Ok.

en_result_t Mfs_Lin_DisableInt ( volatile FM0P_MFS_LIN_TypeDef *  pstcLin,
stc_lin_int_sel_t pstcInt 
)

Disable LIN interrupts.

Parameters:
[in]pstcLinPointer to LIN instance
[in]pstcIntPointer to the selection structure of LIN interrupt
Return values:
OkInterrupts has been disabled and callback fucntion pointers are set to NULL
ErrorInvalidParameterIf one of following conditions are met:
  • pstcLin == NULL
  • pstcInt == NULL

The NVIC IRQ is also disabled in this function.

Definition at line 4668 of file mfs.c.

References stc_lin_int_sel::bLinBreakInt, stc_lin_int_sel::bRxInt, stc_lin_int_sel::bTxFifoInt, stc_lin_int_sel::bTxIdle, stc_lin_int_sel::bTxInt, ErrorInvalidParameter, FALSE, LinInstanceToIndex, Mfs_DeInitIrq(), MfsLinGetInstanceIndex(), MfsLinGetInternDataPtr(), Ok, stc_lin_int_cb::pfnLinBreakIntCb, stc_lin_int_cb::pfnRxIntCb, stc_lin_int_cb::pfnTxFifoIntCb, stc_lin_int_cb::pfnTxIdleIntCb, stc_lin_int_cb::pfnTxIntCb, stc_mfs_intern_data::stcLinInternIntCb, and TRUE.

Here is the call graph for this function:

en_result_t Mfs_Lin_EnableFunc ( volatile FM0P_MFS_LIN_TypeDef *  pstcLin,
en_lin_func_t  enFunc 
)

Enable LIN functions.

Parameters:
[in]pstcLinPointer to LIN instance
[in]enFuncLIN function types
  • LinTx LIN transfer function
  • LinRx LIN receive function
Return values:
OkFunction has been enabled normally
ErrorInvalidParameterIf one of following conditions are met:
  • pstcLin == NULL

Definition at line 5106 of file mfs.c.

References ErrorInvalidParameter, LinRx, LinTx, and Ok.

en_result_t Mfs_Lin_EnableInt ( volatile FM0P_MFS_LIN_TypeDef *  pstcLin,
stc_lin_int_sel_t pstcInt,
stc_lin_int_cb_t pstcIntCb 
)

Enable LIN interrupts.

Parameters:
[in]pstcLinPointer to LIN instance
[in]pstcIntPointer to the selection structure of LIN interrupt
[in]pstcIntCbPointer to the structure of LIN interrupt callback functions
Return values:
OkInterrupts has been enabled and callback functions are set
ErrorInvalidParameterIf one of following conditions are met:
  • pstcLin == NULL
  • pstcInt == NULL
  • pstcIntCb == NULL
  • Other invalid configuration

The NVIC IRQ is also disabled in this function if all interrupt sources are disable.

Definition at line 4589 of file mfs.c.

References stc_lin_int_sel::bLinBreakInt, stc_lin_int_sel::bRxInt, stc_lin_int_sel::bTxFifoInt, stc_lin_int_sel::bTxIdle, stc_lin_int_sel::bTxInt, ErrorInvalidParameter, FALSE, Mfs_InitIrq(), MfsInstanceIndexUnknown, MfsLinGetInstanceIndex(), MfsLinGetInternDataPtr(), Ok, stc_lin_int_cb::pfnLinBreakIntCb, stc_lin_int_cb::pfnRxIntCb, stc_lin_int_cb::pfnTxFifoIntCb, stc_lin_int_cb::pfnTxIdleIntCb, stc_lin_int_cb::pfnTxIntCb, stc_mfs_intern_data::stcLinInternIntCb, and TRUE.

Here is the call graph for this function:

en_result_t Mfs_Lin_GenerateBreakField ( volatile FM0P_MFS_LIN_TypeDef *  pstcLin)

Generate LIN break filed.

Parameters:
[in]pstcLinPointer to LIN instance
Return values:
OkBreak filed has been successfully generated
ErrorInvalidParameterIf one of following conditions are met:
  • pstcLin == NULL

Definition at line 5080 of file mfs.c.

References ErrorInvalidParameter, and Ok.

uint8_t Mfs_Lin_GetFifoCount ( volatile FM0P_MFS_LIN_TypeDef *  pstcLin,
en_mfs_fifo_t  enFifo 
)

Get LIN FIFO count.

Parameters:
[in]pstcLinPointer to LIN instance
[in]enFifoFIFO1 or FIFO2
Return values:
FIFOcount

This function gets the current data count in selected FIFO.

Note:
0xFF will be return value if FIFO index is error.

Definition at line 5409 of file mfs.c.

References MfsFifo1, and MfsFifo2.

boolean_t Mfs_Lin_GetStatus ( volatile FM0P_MFS_LIN_TypeDef *  pstcLin,
en_lin_status_t  enStatus 
)

Get status of LIN according to status type.

Parameters:
[in]pstcLinPointer to LIN instance
[in]enStatusLIN status type
  • LinParityError LIN parity error
  • LinFrameError LIN frame error
  • LinRxFull LIN receive buffer full
  • LinTxEmpty LIN tranfer buffer empty
  • LinTxIdle LIN tranfer idle status
  • LinBreakFlag LIN break field detection flag
  • LinTxFifoRequest LIN transfer FIFO request
Return values:
FALSEIf one of following conditions are met:
  • No LIN parity error [enStatus = LinParityError]
  • No LIN frame error [enStatus = LinFrameError]
  • LIN receive buffer is not full [enStatus = LinRxFull]
  • LIN tranfer buffer is not empty [enStatus = LinTxEmpty]
  • LIN tranfer is on-going [enStatus = LinTxIdle]
  • LIN break field is not detected [enStatus = LinBreakFlag]
  • No LIN transfer FIFO request [enStatus = LinTxFifoRequest]
TRUEIf one of following conditions are met:
  • LIN parity error occurs [enStatus = LinParityError]
  • LIN frame error occurs [enStatus = LinFrameError]
  • LIN receive buffer is full [enStatus = LinRxFull]
  • LIN tranfer buffer is empty [enStatus = LinTxEmpty]
  • LIN tranfer is idle [enStatus = LinTxIdle]
  • LIN break field is detected [enStatus = LinBreakFlag]
  • LIN transfer FIFO request issues [enStatus = LinTxFifoRequest]

Definition at line 5196 of file mfs.c.

References FALSE, LinBreakFlag, LinFrameError, LinOverrunError, LinRxFull, LinTxEmpty, LinTxFifoRequest, LinTxIdle, and TRUE.

en_result_t Mfs_Lin_Init ( volatile FM0P_MFS_LIN_TypeDef *  pstcLin,
const stc_mfs_lin_config_t pstcConfig 
)

Initialization of a MFS module to activate as LIN.

Set registers to active MFS as LIN.

Parameters:
[in]pstcLinPointer to LIN instance register area
[in]pstcConfigMFS LIN configuration
Return values:
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcLin == NULL
  • pstcConfig == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 4814 of file mfs.c.

References stc_mfs_lin_config::bEnableFifo, stc_mfs_lin_config::enBreakLength, stc_mfs_lin_config::enDelimiterLength, stc_mfs_fifo_config::enFifoSel, stc_mfs_intern_data::enMode, stc_mfs_lin_config::enMsMode, stc_mfs_lin_config::enStopBits, ErrorInvalidParameter, FALSE, LinBreakLength13, LinBreakLength14, LinBreakLength15, LinBreakLength16, LinDelimiterLength1, LinDelimiterLength2, LinDelimiterLength3, LinDelimiterLength4, LinFourStopBits, LinMasterMode, LinOneStopBit, LinSlaveMode, LinThreeStopBits, LinTwoStopBits, Mfs_Lin_SetBaudRate(), MfsLinGetInternDataPtr(), MfsLinMode, MfsTxFifo1RxFifo2, MfsTxFifo2RxFifo1, Ok, stc_mfs_lin_config::stcFifoConfig, TRUE, stc_mfs_lin_config::u32BaudRate, stc_mfs_fifo_config::u8ByteCount1, and stc_mfs_fifo_config::u8ByteCount2.

Here is the call graph for this function:

uint8_t Mfs_Lin_ReceiveData ( volatile FM0P_MFS_LIN_TypeDef *  pstcLin)

Read LIN data buffer.

Parameters:
[in]pstcLinPointer to LIN instance
Return values:
Receivedata

Definition at line 5318 of file mfs.c.

en_result_t Mfs_Lin_ResetFifo ( volatile FM0P_MFS_LIN_TypeDef *  pstcLin,
en_mfs_fifo_t  enFifo 
)

Reset LIN FIFO.

Parameters:
[in]pstcLinPointer to LIN instance
[in]enFifoFIFO1 or FIFO2
Return values:
OkFIFO has been successfully reset
ErrorInvalidParameterIf one of following conditions are met:
  • pstcLin == NULL

Definition at line 5335 of file mfs.c.

References ErrorInvalidParameter, MfsFifo1, MfsFifo2, and Ok.

en_result_t Mfs_Lin_SendData ( volatile FM0P_MFS_LIN_TypeDef *  pstcLin,
uint8_t  Data 
)

Write LIN data buffer.

Parameters:
[in]pstcLinPointer to LIN instance
[in]DataData to be sent
Return values:
OkData has been successfully sent
ErrorInvalidParameterIf one of following conditions are met:
  • pstcLin == NULL

Definition at line 5297 of file mfs.c.

References ErrorInvalidParameter, and Ok.

en_result_t Mfs_Lin_SetBaudRate ( volatile FM0P_MFS_LIN_TypeDef *  pstcLin,
uint32_t  u32BaudRate 
)

Set the baudrate of LIN.

Parameters:
[in]pstcLinPointer to LIN instance
[in]u32BaudRateBaudrate value [bps]
Return values:
OkLIN baud rate has been successfully modified
ErrorInvalidParameterIf one of following conditions are met:
  • pstcLin == NULL
  • u32BaudRate < 3
Note:
The LIN baud rate can be initialized in the Mfs_Lin_Init() and be modified with the function.

Definition at line 5052 of file mfs.c.

References __HCLK, APBC1_PSR_Val, ErrorInvalidParameter, and Ok.

Referenced by Mfs_Lin_Init().

Here is the caller graph for this function:

en_result_t Mfs_Lin_SetFifoCount ( volatile FM0P_MFS_LIN_TypeDef *  pstcLin,
en_mfs_fifo_t  enFifo,
uint8_t  u8Count 
)

Set LIN FIFO count.

Parameters:
[in]pstcLinPointer to LIN instance
[in]enFifoFIFO1 or FIFO2
[in]u8CountFIFO count
Return values:
OkFIFO count has been successfully set
ErrorInvalidParameterIf one of following conditions are met:
  • pstcLin == NULL

Definition at line 5371 of file mfs.c.

References ErrorInvalidParameter, MfsFifo1, MfsFifo2, and Ok.

en_result_t Mfs_Uart_ClrStatus ( volatile FM0P_MFS_UART_TypeDef *  pstcUart,
en_uart_status_t  enStatus 
)

Clear status of UART according to status type.

Parameters:
[in]pstcUartPointer to UART instance
[in]enStatusUART status type
  • UartParityError UART parity error
  • UartFrameError UART frame error
  • UartRxFull UART receive buffer full
  • UartTxEmpty UART tranfer buffer empty
  • UartTxIdle UART tranfer idle status
  • UartTxFifoRequest UART transfer FIFO request
Return values:
OkStatus has been cleared normally
ErrorInvalidParameterIf one of following conditions are met:
  • pstcUart == NULL
Note:
The following status can only be cleared by hardware behavior:
  • UartRxFull
  • UartTxEmpty
  • UartTxIdle

Definition at line 1737 of file mfs.c.

References ErrorInvalidParameter, Ok, UartFrameError, UartOverrunError, UartParityError, UartRxFull, UartTxEmpty, UartTxFifoRequest, and UartTxIdle.

en_result_t Mfs_Uart_DeInit ( volatile FM0P_MFS_UART_TypeDef *  pstcUart)

Deinitialisation of a MFS module activating as UART.

All used uart register are reset to their default values.

Parameters:
[in]pstcUartPointer to UART instance register area
Return values:
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcUart == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 1499 of file mfs.c.

References ErrorInvalidParameter, FALSE, MfsUartGetInternDataPtr(), Ok, and TRUE.

Here is the call graph for this function:

en_result_t Mfs_Uart_DisableFunc ( volatile FM0P_MFS_UART_TypeDef *  pstcUart,
en_uart_func_t  enFunc 
)

Disable UART functions.

Parameters:
[in]pstcUartPointer to UART instance
[in]enFuncUART function types
  • UartTx UART transfer function
  • UartRx UART receive function
Return values:
OkFunction has been disabled normally
ErrorInvalidParameterIf one of following conditions are met:
  • pstcUart == NULL
  • Other invalid configuration

Definition at line 1629 of file mfs.c.

References ErrorInvalidParameter, Ok, UartRx, and UartTx.

en_result_t Mfs_Uart_DisableInt ( volatile FM0P_MFS_UART_TypeDef *  pstcUart,
stc_uart_int_sel_t pstcInt 
)

Disable UART interrupts.

Parameters:
[in]pstcUartPointer to UART instance
[in]pstcIntPointer to the selection structure of UART interrupt
Return values:
OkInterrupts has been disabled and callback function pointers are set to NULL
ErrorInvalidParameterIf one of following conditions are met:
  • pstcUart == NULL
  • pstcInt == NULL

The NVIC IRQ is also disabled in this function if all interrupt sources are disable.

Definition at line 1177 of file mfs.c.

References stc_uart_int_sel::bRxInt, stc_uart_int_sel::bTxFifoInt, stc_uart_int_sel::bTxIdle, stc_uart_int_sel::bTxInt, ErrorInvalidParameter, FALSE, Mfs_DeInitIrq(), MfsInstanceIndexUnknown, MfsUartGetInstanceIndex(), MfsUartGetInternDataPtr(), Ok, stc_uart_int_cb::pfnRxIntCb, stc_uart_int_cb::pfnTxFifoIntCb, stc_uart_int_cb::pfnTxIdleCb, stc_uart_int_cb::pfnTxIntCb, stc_mfs_intern_data::stcUartInternIntCb, TRUE, and UartInstanceToIndex.

Here is the call graph for this function:

en_result_t Mfs_Uart_EnableFunc ( volatile FM0P_MFS_UART_TypeDef *  pstcUart,
en_uart_func_t  enFunc 
)

Enable UART functions.

Parameters:
[in]pstcUartPointer to UART instance
[in]enFuncUART function types
  • UartTx UART transfer function
  • UartRx UART receive function
Return values:
OkFunction has been enabled normally
ErrorInvalidParameterIf one of following conditions are met:
  • pstcUart == NULL
  • Other invalid configuration

Definition at line 1592 of file mfs.c.

References ErrorInvalidParameter, Ok, UartRx, and UartTx.

Referenced by Uart_Printf_Init().

Here is the caller graph for this function:

en_result_t Mfs_Uart_EnableInt ( volatile FM0P_MFS_UART_TypeDef *  pstcUart,
stc_uart_int_sel_t pstcInt,
stc_uart_int_cb_t pstcIntCb 
)

Enable UART interrupts.

Parameters:
[in]pstcUartPointer to UART instance
[in]pstcIntPointer to the selection structure of UART interrupt
[in]pstcIntCbPointer to the structure of UART interrupt callback functions
Return values:
OkInterrupts has been enabled and callback functions are set
ErrorInvalidParameterIf one of following conditions are met:
  • pstcUart == NULL
  • pstcInt == NULL
  • pstcIntCb == NULL
  • Other invalid configuration

The NVIC IRQ is also enabled in this function.

Definition at line 1104 of file mfs.c.

References stc_uart_int_sel::bRxInt, stc_uart_int_sel::bTxFifoInt, stc_uart_int_sel::bTxIdle, stc_uart_int_sel::bTxInt, ErrorInvalidParameter, FALSE, Mfs_InitIrq(), MfsInstanceIndexUnknown, MfsUartGetInstanceIndex(), MfsUartGetInternDataPtr(), Ok, stc_uart_int_cb::pfnRxIntCb, stc_uart_int_cb::pfnTxFifoIntCb, stc_uart_int_cb::pfnTxIdleCb, stc_uart_int_cb::pfnTxIntCb, stc_mfs_intern_data::stcUartInternIntCb, and TRUE.

Here is the call graph for this function:

uint8_t Mfs_Uart_GetFifoCount ( volatile FM0P_MFS_UART_TypeDef *  pstcUart,
en_mfs_fifo_t  enFifo 
)

Get UART FIFO count.

Parameters:
[in]pstcUartPointer to UART instance
[in]enFifoFIFO1 or FIFO2
Return values:
FIFOcount

This function gets the current data count in selected FIFO.

Note:
0xFF will be return value if FIFO index is error.

Definition at line 1890 of file mfs.c.

References MfsFifo1, and MfsFifo2.

boolean_t Mfs_Uart_GetStatus ( volatile FM0P_MFS_UART_TypeDef *  pstcUart,
en_uart_status_t  enStatus 
)

Get status of UART according to status type.

Parameters:
[in]pstcUartPointer to UART instance
[in]enStatusUART status type
  • UartParityError UART parity error
  • UartFrameError UART frame error
  • UartRxFull UART receive buffer full
  • UartTxEmpty UART tranfer buffer empty
  • UartTxIdle UART tranfer idle status
  • UartTxFifoRequest UART transfer FIFO request
Return values:
FALSEIf one of following conditions are met:
  • No UART parity error [enStatus = UartParityError]
  • No UART frame error [enStatus = UartFrameError]
  • UART receive buffer is not full [enStatus = UartRxFull]
  • UART tranfer buffer is not empty [enStatus = UartTxEmpty]
  • UART tranfer is on-going [enStatus = UartTxIdle]
  • No UART transfer FIFO request [enStatus = UartTxFifoRequest]
TRUEIf one of following conditions are met:
  • UART parity error occurs [enStatus = UartParityError]
  • UART frame error occurs [enStatus = UartFrameError]
  • UART receive buffer is full [enStatus = UartRxFull]
  • UART tranfer buffer is empty [enStatus = UartTxEmpty]
  • UART tranfer is idle [enStatus = UartTxIdle]
  • UART transfer FIFO request issues [enStatus = UartTxFifoRequest]

Definition at line 1680 of file mfs.c.

References FALSE, TRUE, UartFrameError, UartOverrunError, UartParityError, UartRxFull, UartTxEmpty, UartTxFifoRequest, and UartTxIdle.

Referenced by putchar().

Here is the caller graph for this function:

en_result_t Mfs_Uart_Init ( volatile FM0P_MFS_UART_TypeDef *  pstcUart,
const stc_mfs_uart_config_t pstcConfig 
)

Initialization of a MFS module to activate as UART.

Set registers to active MFS as UART.

Parameters:
[in]pstcUartPointer to UART instance register area
[in]pstcConfigMFS UART configuration
Return values:
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcUart == NULL
  • pstcConfig == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 1311 of file mfs.c.

References stc_mfs_uart_config::bEnableFifo, stc_mfs_uart_config::bHwFlow, stc_mfs_uart_config::bInvertData, stc_mfs_uart_config::enBitDirection, stc_mfs_uart_config::enDataLength, stc_mfs_fifo_config::enFifoSel, stc_mfs_uart_config::enMode, stc_mfs_intern_data::enMode, stc_mfs_uart_config::enParity, stc_mfs_uart_config::enStopBit, ErrorInvalidParameter, FALSE, Mfs_Uart_SetBaudRate(), MfsTxFifo1RxFifo2, MfsTxFifo2RxFifo1, MfsUartGetInternDataPtr(), MfsUartMode, Ok, stc_mfs_uart_config::stcFifoConfig, TRUE, stc_mfs_uart_config::u32BautRate, stc_mfs_fifo_config::u8ByteCount1, stc_mfs_fifo_config::u8ByteCount2, UartDataLsbFirst, UartDataMsbFirst, UartEightBits, UartFiveBits, UartFourStopBits, UartMulti, UartNineBits, UartNormal, UartOneStopBit, UartParityEven, UartParityNone, UartParityOdd, UartSevenBits, UartSixBits, UartThreeStopBits, and UartTwoStopBits.

Referenced by Uart_Printf_Init().

Here is the call graph for this function:

Here is the caller graph for this function:

uint16_t Mfs_Uart_ReceiveData ( volatile FM0P_MFS_UART_TypeDef *  pstcUart)

Read UART data buffer.

Parameters:
[in]pstcUartPointer to UART instance
Return values:
Receivedata

Definition at line 1799 of file mfs.c.

en_result_t Mfs_Uart_ResetFifo ( volatile FM0P_MFS_UART_TypeDef *  pstcUart,
en_mfs_fifo_t  enFifo 
)

Reset UART FIFO.

Parameters:
[in]pstcUartPointer to UART instance
[in]enFifoFIFO1 or FIFO2
Return values:
OkFIFO has been successfully reset
ErrorInvalidParameterIf one of following conditions are met:
  • pstcUart == NULL

Definition at line 1816 of file mfs.c.

References ErrorInvalidParameter, MfsFifo1, MfsFifo2, and Ok.

en_result_t Mfs_Uart_SendData ( volatile FM0P_MFS_UART_TypeDef *  pstcUart,
uint16_t  u16Data 
)

Write UART data buffer.

Parameters:
[in]pstcUartPointer to UART instance
[in]u16DataSend data
Return values:
OkData has been successfully sent
ErrorInvalidParameterIf one of following conditions are met:
  • pstcUart == NULL

Definition at line 1778 of file mfs.c.

References ErrorInvalidParameter, and Ok.

Referenced by putchar().

Here is the caller graph for this function:

en_result_t Mfs_Uart_SetBaudRate ( volatile FM0P_MFS_UART_TypeDef *  pstcUart,
uint32_t  u32BaudRate 
)

Set the baudrate of UART.

Parameters:
[in]pstcUartPointer to UART instance
[in]u32BaudRateBaudrate value [bps]
Return values:
OkUART baud rate has been successfully modified
ErrorInvalidParameterIf one of following conditions are met:
  • pstcUart == NULL
  • u32BaudRate < 4
Note:
The UART baud rate can be initialized in the Mfs_Uart_Init() and be modified in the funciton.

Definition at line 1560 of file mfs.c.

References __HCLK, APBC1_PSR_Val, ErrorInvalidParameter, and Ok.

Referenced by Mfs_Uart_Init().

Here is the caller graph for this function:

en_result_t Mfs_Uart_SetFifoCount ( volatile FM0P_MFS_UART_TypeDef *  pstcUart,
en_mfs_fifo_t  enFifo,
uint8_t  u8Count 
)

Set UART FIFO count.

Parameters:
[in]pstcUartPointer to UART instance
[in]enFifoFIFO1 or FIFO2
[in]u8CountFIFO count
Return values:
OkFIFO count has been successfully set
ErrorInvalidParameterIf one of following conditions are met:
  • pstcUart == NULL

Definition at line 1852 of file mfs.c.

References ErrorInvalidParameter, MfsFifo1, MfsFifo2, and Ok.

static en_mfs_instance_index_t MfsCsioGetInstanceIndex ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio) [static]

Return instance index for a certain CSIO instance.

Parameters:
pstcCsioPointer to CSIO instance
Returns:
Instance index

Definition at line 1961 of file mfs.c.

References stc_mfs_intern_data::enIndex, MfsInstanceIndexMax, MfsInstanceIndexUnknown, and stc_mfs_instance_data::stcInternData.

Referenced by Mfs_Csio_DisableInt(), and Mfs_Csio_EnableInt().

Here is the caller graph for this function:

static stc_mfs_intern_data_t * MfsCsioGetInternDataPtr ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio) [static]

Return the internal data for a certain CSIO instance.

Parameters:
pstcCsioPointer to CSIO instance
Returns:
Pointer to internal data or NULL if instance is not enabled (or not known)

Definition at line 1923 of file mfs.c.

References MfsInstanceIndexMax, and stc_mfs_instance_data::stcInternData.

Referenced by Mfs_Csio_DeInit(), Mfs_Csio_DisableInt(), Mfs_Csio_EnableInt(), and Mfs_Csio_Init().

Here is the caller graph for this function:

void MfsCsioIrqHandlerRx ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio,
stc_mfs_intern_data_t pstcMfsInternData 
)

CSIO receive interrupt service routine.

Parameters:
pstcCsioPointer to CSIO instance
pstcMfsInternDataPointer to MFS internal data structure

This function is called on Receive Interrupt set by the MFS.

Definition at line 1992 of file mfs.c.

References stc_csio_int_cb::pfnRxIntCb, and stc_mfs_intern_data::stcCsioInternIntCb.

Referenced by MFS0_8_RX_IRQHandler(), MFS1_9_RX_IRQHandler(), MFS2_10_RX_IRQHandler(), MFS3_11_RX_IRQHandler(), MFS4_12_RX_IRQHandler(), MFS5_13_RX_IRQHandler(), MFS6_14_RX_DMA0_IRQHandler(), and MFS7_15_RX_DMA2_IRQHandler().

Here is the caller graph for this function:

void MfsCsioIrqHandlerStatus ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio,
stc_mfs_intern_data_t pstcMfsInternData 
)

CSIO status interrupt service routine.

Parameters:
pstcCsioPointer to CSIO instance
pstcMfsInternDataPointer to MFS internal data structure

This function is called on transfer Interrupt set by the MFS.

Definition at line 2068 of file mfs.c.

References stc_csio_int_cb::pfnSerialTimerIntCb, and stc_mfs_intern_data::stcCsioInternIntCb.

Referenced by MFS0_8_TX_IRQHandler(), MFS1_9_TX_IRQHandler(), MFS2_10_TX_IRQHandler(), MFS3_11_TX_IRQHandler(), MFS4_12_TX_IRQHandler(), MFS5_13_TX_IRQHandler(), MFS6_14_TX_DMA1_IRQHandler(), and MFS7_15_TX_DMA3_IRQHandler().

Here is the caller graph for this function:

void MfsCsioIrqHandlerTx ( volatile FM0P_MFS_CSIO_TypeDef *  pstcCsio,
stc_mfs_intern_data_t pstcMfsInternData 
)

CSIO transfer interrupt service routine.

Parameters:
pstcCsioPointer to CSIO instance
pstcMfsInternDataPointer to MFS internal data structure

This function is called on transfer Interrupt set by the MFS.

Definition at line 2014 of file mfs.c.

References stc_csio_int_cb::pfnCsErrIntCb, stc_csio_int_cb::pfnTxFifoIntCb, stc_csio_int_cb::pfnTxIdleCb, stc_csio_int_cb::pfnTxIntCb, and stc_mfs_intern_data::stcCsioInternIntCb.

Referenced by MFS0_8_TX_IRQHandler(), MFS1_9_TX_IRQHandler(), MFS2_10_TX_IRQHandler(), MFS3_11_TX_IRQHandler(), MFS4_12_TX_IRQHandler(), MFS5_13_TX_IRQHandler(), MFS6_14_TX_DMA1_IRQHandler(), and MFS7_15_TX_DMA3_IRQHandler().

Here is the caller graph for this function:

static en_mfs_instance_index_t MfsI2cGetInstanceIndex ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c) [static]

Return instance index for a certain I2C instance.

Parameters:
pstcI2cPointer to I2C instance
Returns:
Instance index

Definition at line 3350 of file mfs.c.

References stc_mfs_intern_data::enIndex, MfsInstanceIndexMax, MfsInstanceIndexUnknown, and stc_mfs_instance_data::stcInternData.

Referenced by Mfs_I2c_DisableInt(), and Mfs_I2c_EnableInt().

Here is the caller graph for this function:

static stc_mfs_intern_data_t * MfsI2cGetInternDataPtr ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c) [static]

Return the internal data for a certain I2C instance.

Parameters:
pstcI2cPointer to I2C instance
Returns:
Pointer to internal data or NULL if instance is not enabled (or not known)

Definition at line 3311 of file mfs.c.

References MfsInstanceIndexMax, and stc_mfs_instance_data::stcInternData.

Referenced by Mfs_I2c_DeInit(), Mfs_I2c_DisableInt(), Mfs_I2c_EnableInt(), and Mfs_I2c_Init().

Here is the caller graph for this function:

void MfsI2cIrqHandlerRx ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c,
stc_mfs_intern_data_t pstcMfsInternData 
)

I2C receive interrupt service routine.

Parameters:
pstcI2cPointer to I2C instance
pstcMfsInternDataPointer to MFS internal data structure

This function is called on Receive Interrupt set by the MFS.

Definition at line 3382 of file mfs.c.

References stc_i2c_int_cb::pfnRxIntCb, and stc_mfs_intern_data::stcI2cInternIntCb.

Referenced by MFS0_8_RX_IRQHandler(), MFS1_9_RX_IRQHandler(), MFS2_10_RX_IRQHandler(), MFS3_11_RX_IRQHandler(), MFS4_12_RX_IRQHandler(), MFS5_13_RX_IRQHandler(), MFS6_14_RX_DMA0_IRQHandler(), and MFS7_15_RX_DMA2_IRQHandler().

Here is the caller graph for this function:

void MfsI2cIrqHandlerStatus ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c,
stc_mfs_intern_data_t pstcMfsInternData 
)

I2C status interrupt service routine.

Parameters:
pstcI2cPointer to I2C instance
pstcMfsInternDataPointer to MFS internal data structure

This function is called on transfer Interrupt set by the MFS.

Definition at line 3444 of file mfs.c.

References stc_i2c_int_cb::pfnStopDetectCb, stc_i2c_int_cb::pfnTxRxCb, and stc_mfs_intern_data::stcI2cInternIntCb.

Referenced by MFS0_8_TX_IRQHandler(), MFS1_9_TX_IRQHandler(), MFS2_10_TX_IRQHandler(), MFS3_11_TX_IRQHandler(), MFS4_12_TX_IRQHandler(), MFS5_13_TX_IRQHandler(), MFS6_14_TX_DMA1_IRQHandler(), and MFS7_15_TX_DMA3_IRQHandler().

Here is the caller graph for this function:

void MfsI2cIrqHandlerTx ( volatile FM0P_MFS_I2C_TypeDef *  pstcI2c,
stc_mfs_intern_data_t pstcMfsInternData 
)

I2C transfer interrupt service routine.

Parameters:
pstcI2cPointer to I2C instance
pstcMfsInternDataPointer to MFS internal data structure

This function is called on transfer Interrupt set by the MFS.

Definition at line 3404 of file mfs.c.

References stc_i2c_int_cb::pfnTxFifoIntCb, stc_i2c_int_cb::pfnTxIdleCb, stc_i2c_int_cb::pfnTxIntCb, and stc_mfs_intern_data::stcI2cInternIntCb.

Referenced by MFS0_8_TX_IRQHandler(), MFS1_9_TX_IRQHandler(), MFS2_10_TX_IRQHandler(), MFS3_11_TX_IRQHandler(), MFS4_12_TX_IRQHandler(), MFS5_13_TX_IRQHandler(), MFS6_14_TX_DMA1_IRQHandler(), and MFS7_15_TX_DMA3_IRQHandler().

Here is the caller graph for this function:

static en_mfs_instance_index_t MfsLinGetInstanceIndex ( volatile FM0P_MFS_LIN_TypeDef *  pstcLin) [static]

Return instance index for a certain LIN instance.

Parameters:
pstcLinPointer to LIN instance
Returns:
Instance index

Definition at line 4457 of file mfs.c.

References stc_mfs_intern_data::enIndex, MfsInstanceIndexMax, MfsInstanceIndexUnknown, and stc_mfs_instance_data::stcInternData.

Referenced by Mfs_Lin_DisableInt(), and Mfs_Lin_EnableInt().

Here is the caller graph for this function:

static stc_mfs_intern_data_t * MfsLinGetInternDataPtr ( volatile FM0P_MFS_LIN_TypeDef *  pstcLin) [static]

Return the internal data for a certain MFS instance.

Parameters:
pstcLinPointer to LIN instance
Returns:
Pointer to internal data or NULL if instance is not enabled (or not known)

Definition at line 4419 of file mfs.c.

References MfsInstanceIndexMax, and stc_mfs_instance_data::stcInternData.

Referenced by Mfs_Lin_DeInit(), Mfs_Lin_DisableInt(), Mfs_Lin_EnableInt(), and Mfs_Lin_Init().

Here is the caller graph for this function:

void MfsLinIrqHandlerRx ( volatile FM0P_MFS_LIN_TypeDef *  pstcLin,
stc_mfs_intern_data_t pstcMfsInternData 
)

LIN receive interrupt service routine.

Parameters:
pstcLinPointer to LIN instance
pstcMfsInternDataPointer to MFS internal data structure

This function is called on Transmit Interrupt set by the MFS.

Definition at line 4488 of file mfs.c.

References stc_lin_int_cb::pfnRxIntCb, and stc_mfs_intern_data::stcLinInternIntCb.

Referenced by MFS0_8_RX_IRQHandler(), MFS1_9_RX_IRQHandler(), MFS2_10_RX_IRQHandler(), MFS3_11_RX_IRQHandler(), MFS4_12_RX_IRQHandler(), MFS5_13_RX_IRQHandler(), MFS6_14_RX_DMA0_IRQHandler(), and MFS7_15_RX_DMA2_IRQHandler().

Here is the caller graph for this function:

void MfsLinIrqHandlerStatus ( volatile FM0P_MFS_LIN_TypeDef *  pstcLin,
stc_mfs_intern_data_t pstcMfsInternData 
)

LIN status interrupt service routine.

Parameters:
pstcLinPointer to LIN instance
pstcMfsInternDataPointer to MFS internal data structure

This function is called on Transmit Interrupt set by the MFS.

Definition at line 4555 of file mfs.c.

References stc_lin_int_cb::pfnLinBreakIntCb, and stc_mfs_intern_data::stcLinInternIntCb.

Referenced by MFS0_8_TX_IRQHandler(), MFS1_9_TX_IRQHandler(), MFS2_10_TX_IRQHandler(), MFS3_11_TX_IRQHandler(), MFS4_12_TX_IRQHandler(), MFS5_13_TX_IRQHandler(), MFS6_14_TX_DMA1_IRQHandler(), and MFS7_15_TX_DMA3_IRQHandler().

Here is the caller graph for this function:

void MfsLinIrqHandlerTx ( volatile FM0P_MFS_LIN_TypeDef *  pstcLin,
stc_mfs_intern_data_t pstcMfsInternData 
)

LIN transmit interrupt service routine.

Parameters:
pstcLinPointer to LIN instance
pstcMfsInternDataPointer to MFS internal data structure

This function is called on Transmit Interrupt set by the MFS.

Definition at line 4510 of file mfs.c.

References stc_lin_int_cb::pfnTxFifoIntCb, stc_lin_int_cb::pfnTxIdleIntCb, stc_lin_int_cb::pfnTxIntCb, and stc_mfs_intern_data::stcLinInternIntCb.

Referenced by MFS0_8_TX_IRQHandler(), MFS1_9_TX_IRQHandler(), MFS2_10_TX_IRQHandler(), MFS3_11_TX_IRQHandler(), MFS4_12_TX_IRQHandler(), MFS5_13_TX_IRQHandler(), MFS6_14_TX_DMA1_IRQHandler(), and MFS7_15_TX_DMA3_IRQHandler().

Here is the caller graph for this function:

static en_mfs_instance_index_t MfsUartGetInstanceIndex ( volatile FM0P_MFS_UART_TypeDef *  pstcUart) [static]

Return instance index for a certain UART instance.

Parameters:
pstcUartPointer to UART instance
Returns:
Instance index

Definition at line 997 of file mfs.c.

References stc_mfs_intern_data::enIndex, MfsInstanceIndexMax, MfsInstanceIndexUnknown, and stc_mfs_instance_data::stcInternData.

Referenced by Mfs_Uart_DisableInt(), and Mfs_Uart_EnableInt().

Here is the caller graph for this function:

static stc_mfs_intern_data_t * MfsUartGetInternDataPtr ( volatile FM0P_MFS_UART_TypeDef *  pstcUart) [static]

Return the internal data for a certain UART instance.

Parameters:
pstcUartPointer to UART instance
Returns:
Pointer to internal data or NULL if instance is not enabled (or not known)

Definition at line 958 of file mfs.c.

References MfsInstanceIndexMax, and stc_mfs_instance_data::stcInternData.

Referenced by Mfs_Uart_DeInit(), Mfs_Uart_DisableInt(), Mfs_Uart_EnableInt(), and Mfs_Uart_Init().

Here is the caller graph for this function:

void MfsUartIrqHandlerRx ( volatile FM0P_MFS_UART_TypeDef *  pstcUart,
stc_mfs_intern_data_t pstcMfsInternData 
)

UART receive interrupt service routine.

Parameters:
pstcUartPointer to UART instance
pstcMfsInternDataPointer to MFS internal data structure

This function is called on Receive Interrupt set by the MFS.

Definition at line 1029 of file mfs.c.

References stc_uart_int_cb::pfnRxIntCb, and stc_mfs_intern_data::stcUartInternIntCb.

Referenced by MFS0_8_RX_IRQHandler(), MFS1_9_RX_IRQHandler(), MFS2_10_RX_IRQHandler(), MFS3_11_RX_IRQHandler(), MFS4_12_RX_IRQHandler(), MFS5_13_RX_IRQHandler(), MFS6_14_RX_DMA0_IRQHandler(), and MFS7_15_RX_DMA2_IRQHandler().

Here is the caller graph for this function:

void MfsUartIrqHandlerTx ( volatile FM0P_MFS_UART_TypeDef *  pstcUart,
stc_mfs_intern_data_t pstcMfsInternData 
)

MFS transmit interrupt service routine.

Parameters:
pstcUartPointer to UART instance
pstcMfsInternDataPointer to MFS internal data structure

This function is called on Transmit Interrupt set by the MFS.

Definition at line 1051 of file mfs.c.

References stc_uart_int_cb::pfnTxFifoIntCb, stc_uart_int_cb::pfnTxIdleCb, stc_uart_int_cb::pfnTxIntCb, and stc_mfs_intern_data::stcUartInternIntCb.

Referenced by MFS0_8_TX_IRQHandler(), MFS1_9_TX_IRQHandler(), MFS2_10_TX_IRQHandler(), MFS3_11_TX_IRQHandler(), MFS4_12_TX_IRQHandler(), MFS5_13_TX_IRQHandler(), MFS6_14_TX_DMA1_IRQHandler(), and MFS7_15_TX_DMA3_IRQHandler().

Here is the caller graph for this function:


Variable Documentation