![]() |
PDL for FM0+
Version1.0
Peripheral Driverl Library for FM0+
|
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_t * | MfsUartGetInternDataPtr (volatile FM0P_MFS_UART_TypeDef *pstcUart) |
Return the internal data for a certain UART instance. | |
static stc_mfs_intern_data_t * | MfsCsioGetInternDataPtr (volatile FM0P_MFS_CSIO_TypeDef *pstcCsio) |
Return the internal data for a certain CSIO instance. | |
static stc_mfs_intern_data_t * | MfsI2cGetInternDataPtr (volatile FM0P_MFS_I2C_TypeDef *pstcI2c) |
Return the internal data for a certain I2C instance. | |
static stc_mfs_intern_data_t * | MfsLinGetInternDataPtr (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. |
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 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) |
#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) |
#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 MFS_INSTANCE_COUNT |
(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)
#define stc_mfsn_csio_t FM0P_MFS_CSIO_TypeDef |
Definition at line 309 of file mfs.h.
Referenced by MFS0_8_RX_IRQHandler(), MFS0_8_TX_IRQHandler(), MFS1_9_RX_IRQHandler(), MFS1_9_TX_IRQHandler(), MFS2_10_RX_IRQHandler(), MFS2_10_TX_IRQHandler(), MFS3_11_RX_IRQHandler(), MFS3_11_TX_IRQHandler(), MFS4_12_RX_IRQHandler(), MFS4_12_TX_IRQHandler(), MFS5_13_RX_IRQHandler(), MFS5_13_TX_IRQHandler(), MFS6_14_RX_DMA0_IRQHandler(), MFS6_14_TX_DMA1_IRQHandler(), MFS7_15_RX_DMA2_IRQHandler(), and MFS7_15_TX_DMA3_IRQHandler().
#define stc_mfsn_i2c_t FM0P_MFS_I2C_TypeDef |
Definition at line 310 of file mfs.h.
Referenced by MFS0_8_RX_IRQHandler(), MFS0_8_TX_IRQHandler(), MFS1_9_RX_IRQHandler(), MFS1_9_TX_IRQHandler(), MFS2_10_RX_IRQHandler(), MFS2_10_TX_IRQHandler(), MFS3_11_RX_IRQHandler(), MFS3_11_TX_IRQHandler(), MFS4_12_RX_IRQHandler(), MFS4_12_TX_IRQHandler(), MFS5_13_RX_IRQHandler(), MFS5_13_TX_IRQHandler(), MFS6_14_RX_DMA0_IRQHandler(), MFS6_14_TX_DMA1_IRQHandler(), MFS7_15_RX_DMA2_IRQHandler(), and MFS7_15_TX_DMA3_IRQHandler().
#define stc_mfsn_lin_t FM0P_MFS_LIN_TypeDef |
Definition at line 311 of file mfs.h.
Referenced by MFS0_8_RX_IRQHandler(), MFS0_8_TX_IRQHandler(), MFS1_9_RX_IRQHandler(), MFS1_9_TX_IRQHandler(), MFS2_10_RX_IRQHandler(), MFS2_10_TX_IRQHandler(), MFS3_11_RX_IRQHandler(), MFS3_11_TX_IRQHandler(), MFS4_12_RX_IRQHandler(), MFS4_12_TX_IRQHandler(), MFS5_13_RX_IRQHandler(), MFS5_13_TX_IRQHandler(), MFS6_14_RX_DMA0_IRQHandler(), MFS6_14_TX_DMA1_IRQHandler(), MFS7_15_RX_DMA2_IRQHandler(), and MFS7_15_TX_DMA3_IRQHandler().
#define stc_mfsn_uart_t FM0P_MFS_UART_TypeDef |
Definition at line 308 of file mfs.h.
Referenced by MFS0_8_RX_IRQHandler(), MFS0_8_TX_IRQHandler(), MFS1_9_RX_IRQHandler(), MFS1_9_TX_IRQHandler(), MFS2_10_RX_IRQHandler(), MFS2_10_TX_IRQHandler(), MFS3_11_RX_IRQHandler(), MFS3_11_TX_IRQHandler(), MFS4_12_RX_IRQHandler(), MFS4_12_TX_IRQHandler(), MFS5_13_RX_IRQHandler(), MFS5_13_TX_IRQHandler(), MFS6_14_RX_DMA0_IRQHandler(), MFS6_14_TX_DMA1_IRQHandler(), MFS7_15_RX_DMA2_IRQHandler(), and MFS7_15_TX_DMA3_IRQHandler().
#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 enum en_cs_pin_level en_cs_pin_level_t |
CSIO chip selection pin level.
typedef enum en_cs_pin_sel en_cs_pin_sel_t |
CSIO chip selection pin.
typedef enum en_cs_timing_clk en_cs_timing_clk_t |
CSIO chip selection clock division.
typedef enum en_csio_act_mode en_csio_act_mode_t |
CSIO active mode (Normal/SPI)
typedef enum en_csio_data_dir en_csio_data_dir_t |
CSIO bit direction.
typedef enum en_csio_data_len en_csio_data_len_t |
CSIO data length.
typedef enum en_csio_func en_csio_func_t |
CSIO function.
typedef enum en_csio_ms_mode en_csio_ms_mode_t |
CSIO mode (Master/Slave)
typedef enum en_csio_status en_csio_status_t |
CSIO status types.
typedef enum en_csio_sync_wait_time en_csio_sync_wait_time_t |
CSIO synchronous wait time.
typedef enum en_csio_timer_clk en_csio_timer_clk_t |
CSIO serial timer clock division.
typedef enum en_i2c_ack en_i2c_ack_t |
I2C ACK types.
typedef enum en_i2c_data_dir en_i2c_data_dir_t |
I2C data direction(used in slave mode)
typedef enum en_i2c_mode en_i2c_mode_t |
I2C mode.
typedef enum en_i2c_status en_i2c_status_t |
I2C status types.
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 enum en_lin_ms_mode en_lin_ms_mode_t |
MFS LIN mode (Master/Slave)
typedef enum en_lin_status en_lin_status_t |
LIN status types.
typedef enum en_lin_stop_bit en_lin_stop_bit_t |
LIN stop bit length.
typedef enum en_mfs_fifo_sel en_mfs_fifo_sel_t |
Mfs FIFO Selection.
typedef enum en_mfs_fifo en_mfs_fifo_t |
Mfs FIFO Number.
typedef enum en_mfs_instance_index en_mfs_instance_index_t |
Enumeration to define an index for each enabled MFS instance.
typedef enum en_mfs_mode en_mfs_mode_t |
MFS mode.
typedef enum en_uart_data_dir en_uart_data_dir_t |
UART data direction.
typedef enum en_uart_data_len en_uart_data_len_t |
UART data length.
typedef enum en_uart_func en_uart_func_t |
UART functions.
typedef enum en_mfs_uart_mode en_uart_mode_t |
MFS UART mode.
typedef enum en_uart_parity en_uart_parity_t |
UART parity format.
typedef enum en_uart_status en_uart_status_t |
UART status types.
typedef enum en_uart_stop_bit en_uart_stop_bit_t |
UART stop bits length.
typedef struct stc_csio_cs stc_csio_cs_t |
CSIO chip selection configuration.
typedef struct stc_csio_int_cb stc_csio_int_cb_t |
CSIO interrupt callback function.
typedef struct stc_csio_int_sel stc_csio_int_sel_t |
CSIO interrupt selection.
typedef struct stc_csio_serial_timer stc_csio_serial_timer_t |
CSIO serial timer configuration.
typedef struct stc_i2c_int_cb stc_i2c_int_cb_t |
I2C interrupt callback function.
typedef struct stc_i2c_int_sel stc_i2c_int_sel_t |
I2C interrupt selection.
typedef struct stc_lin_int_cb stc_lin_int_cb_t |
LIN interrupt callback function.
typedef struct stc_lin_int_sel stc_lin_int_sel_t |
LIN interrupt selection.
typedef struct stc_mfs_csio_config stc_mfs_csio_config_t |
CSIO configuration structure.
typedef struct stc_mfs_fifo_config stc_mfs_fifo_config_t |
Mfs FIFO configuration.
typedef struct stc_mfs_i2c_config stc_mfs_i2c_config_t |
I2C configuration structure.
typedef struct stc_mfs_instance_data stc_mfs_instance_data_t |
MFS instance data type.
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_lin_config stc_mfs_lin_config_t |
LIN configuration structure.
typedef struct stc_mfs_uart_config stc_mfs_uart_config_t |
UART configuration structure.
typedef struct stc_mfsn stc_mfsn_t |
MFS common instance structure.
typedef struct stc_uart_int_cb stc_uart_int_cb_t |
UART interrupt callback function.
typedef struct stc_uart_int_sel stc_uart_int_sel_t |
UART interrupt selection.
enum en_cs_pin_level |
enum en_cs_pin_sel |
enum en_cs_timing_clk |
CSIO chip selection clock division.
enum en_csio_act_mode |
enum en_csio_data_dir |
enum en_csio_data_len |
CSIO data length.
enum en_csio_func |
enum en_csio_ms_mode |
enum en_csio_status |
enum en_csio_timer_clk |
CSIO serial timer clock division.
enum en_i2c_ack |
enum en_i2c_data_dir |
enum en_i2c_mode |
enum en_i2c_status |
I2C status types.
enum en_lin_break_length |
Mfs Lin Break Delimiter Length (only applicable in LIN master mode)
enum en_lin_func |
enum en_lin_ms_mode |
enum en_lin_status |
enum en_lin_stop_bit |
enum en_mfs_fifo |
enum en_mfs_fifo_sel |
Enumeration to define an index for each enabled MFS instance.
enum en_mfs_mode |
enum en_mfs_uart_mode |
enum en_uart_data_dir |
enum en_uart_data_len |
enum en_uart_func |
enum en_uart_parity |
enum en_uart_status |
enum en_uart_stop_bit |
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.
[in] | pstcCsio | Pointer to CSIO instance |
[in] | enStatus | UART status type
|
Ok | Status has been cleared normally |
ErrorInvalidParameter | If one of following conditions are met:
|
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.
[in] | pstcCsio | Pointer to CSIO instance register area |
Ok | Process successfully done. |
ErrorInvalidParameter | If one of following conditions are met:
|
Definition at line 2717 of file mfs.c.
References ErrorInvalidParameter, FALSE, MfsCsioGetInternDataPtr(), Ok, and TRUE.
en_result_t Mfs_Csio_DisableFunc | ( | volatile FM0P_MFS_CSIO_TypeDef * | pstcCsio, |
en_csio_func_t | enFunc | ||
) |
Disable CSIO functions.
[in] | pstcCsio | Pointer to CSIO instance |
[in] | enFunc | CSIO function types
|
Ok | Function has been disabled normally |
ErrorInvalidParameter | If one of following conditions are met:
|
Definition at line 2997 of file mfs.c.
References CsioCsErrOccur, CsioRx, CsioSerialTimer, CsioTx, ErrorInvalidParameter, and Ok.
Referenced by CsioRxData(), CsioRxReg(), CsioTxCmd(), CsioTxCmdAddr(), and CsioTxData().
en_result_t Mfs_Csio_DisableInt | ( | volatile FM0P_MFS_CSIO_TypeDef * | pstcCsio, |
stc_csio_int_sel_t * | pstcInt | ||
) |
Disable CSIO interrupts.
[in] | pstcCsio | Pointer to CSIO instance |
[in] | pstcInt | Pointer to the selection structure of CSIO interrupt |
Ok | Interrupts has been disabled and callback function pointers are set to NULL |
ErrorInvalidParameter | If one of following conditions are met:
|
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().
en_result_t Mfs_Csio_EnableFunc | ( | volatile FM0P_MFS_CSIO_TypeDef * | pstcCsio, |
en_csio_func_t | enFunc | ||
) |
Enable CSIO functions.
[in] | pstcCsio | Pointer to CSIO instance |
[in] | enFunc | CSIO function types
|
Ok | Function has been enabled normally |
ErrorInvalidParameter | If one of following conditions are met:
|
Definition at line 2953 of file mfs.c.
References CsioCsErrOccur, CsioRx, CsioSerialTimer, CsioTx, ErrorInvalidParameter, and Ok.
Referenced by CsioRxData(), CsioRxReg(), CsioTxCmd(), CsioTxCmdAddr(), and CsioTxData().
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.
[in] | pstcCsio | Pointer to CSIO instance |
[in] | pstcInt | Pointer to the selection structure of CSIO interrupt |
[in] | pstcIntCb | Pointer to the structure of CSIO interrupt callback functions |
Ok | Interrupts has been enabled and callback functions are set |
ErrorInvalidParameter | If one of following conditions are met:
|
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().
uint8_t Mfs_Csio_GetFifoCount | ( | volatile FM0P_MFS_CSIO_TypeDef * | pstcCsio, |
en_mfs_fifo_t | enFifo | ||
) |
boolean_t Mfs_Csio_GetStatus | ( | volatile FM0P_MFS_CSIO_TypeDef * | pstcCsio, |
en_csio_status_t | enStatus | ||
) |
Get status of CSIO according to status type.
[in] | pstcCsio | Pointer to CSIO instance |
[in] | enStatus | CSIO status type
|
FALSE | If one of following conditions are met:
|
TRUE | If one of following conditions are met:
|
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().
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.
[in] | pstcCsio | Pointer to CSIO instance register area |
[in] | pstcConfig | MFS CSIO configuration |
Ok | Process successfully done. |
ErrorInvalidParameter | If one of following conditions are met:
|
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().
uint16_t Mfs_Csio_ReceiveData | ( | volatile FM0P_MFS_CSIO_TypeDef * | pstcCsio | ) |
Read CSIO data buffer.
[in] | pstcCsio | Pointer to CSIO instance |
Receive | data |
Definition at line 3187 of file mfs.c.
Referenced by CsioMasterRxIntCallback().
en_result_t Mfs_Csio_ResetFifo | ( | volatile FM0P_MFS_CSIO_TypeDef * | pstcCsio, |
en_mfs_fifo_t | enFifo | ||
) |
Reset CSIO FIFO.
[in] | pstcCsio | Pointer to CSIO instance |
[in] | enFifo | FIFO1 or FIFO2 |
Ok | FIFO has been successfully reset |
ErrorInvalidParameter | If one of following conditions are met:
|
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.
[in] | pstcCsio | Pointer to CSIO instance |
[in] | u16Data | Send data |
[in] | bSotEn | SOT output enable
|
Ok | Data has been successfully sent |
ErrorInvalidParameter | If one of following conditions are met:
|
Definition at line 3162 of file mfs.c.
References ErrorInvalidParameter, Ok, and TRUE.
Referenced by CsioMasterTxIntCallback(), CsioRxData(), and CsioRxReg().
en_result_t Mfs_Csio_SetBaudRate | ( | volatile FM0P_MFS_CSIO_TypeDef * | pstcCsio, |
uint32_t | u32BaudRate | ||
) |
Set the baudrate of CSIO.
[in] | pstcCsio | Pointer to CSIO instance |
[in] | u32BaudRate | Baudrate value [bps] |
Ok | CSIO baud rate has been successfully modified |
ErrorInvalidParameter | If one of following conditions are met:
|
Definition at line 2786 of file mfs.c.
References __HCLK, APBC1_PSR_Val, ErrorInvalidParameter, and Ok.
Referenced by Mfs_Csio_Init().
en_result_t Mfs_Csio_SetCsHoldStatus | ( | volatile FM0P_MFS_CSIO_TypeDef * | pstcCsio, |
boolean_t | bHold | ||
) |
Set the hold status of chip selection pin.
[in] | pstcCsio | Pointer to CSIO instance |
[in] | bHold |
|
Ok | Hold status of chip selection pin is set |
ErrorInvalidParameter | If one of following conditions are met:
|
Definition at line 2895 of file mfs.c.
References ErrorInvalidParameter, Ok, and TRUE.
Referenced by CsioRxData(), and CsioTxData().
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.
[in] | pstcCsio | Pointer to CSIO instance |
[in] | enCsPin | CS pin index |
[in] | u8ByteCnt | Transfer byte count of a CS pin |
Ok | Transfer byte count has been successfully modified |
ErrorInvalidParameter | If one of following conditions are met:
|
Definition at line 2849 of file mfs.c.
References CsPinScs0, CsPinScs1, CsPinScs2, CsPinScs3, ErrorInvalidParameter, and Ok.
Referenced by CsioRxData(), CsioRxReg(), CsioTxCmd(), CsioTxCmdAddr(), and CsioTxData().
en_result_t Mfs_Csio_SetFifoCount | ( | volatile FM0P_MFS_CSIO_TypeDef * | pstcCsio, |
en_mfs_fifo_t | enFifo, | ||
uint8_t | u8Count | ||
) |
Set CSIO FIFO count.
[in] | pstcCsio | Pointer to CSIO instance |
[in] | enFifo | FIFO1 or FIFO2 |
[in] | u8Count | FIFO count |
Ok | FIFO count has been successfully set |
ErrorInvalidParameter | If one of following conditions are met:
|
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.
[in] | pstcCsio | Pointer to CSIO instance |
[in] | u16CompareValue | Compare value |
Ok | Compare value has been successfully modified |
ErrorInvalidParameter | If one of following conditions are met:
|
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.
[in] | pstcCsio | Pointer to CSIO instance |
[in] | u8ByteCnt | Transfer byte count |
Ok | Transfer byte count has been successfully modified |
ErrorInvalidParameter | If one of following conditions are met:
|
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] |
Device dependent de-initialization of interrupts according CMSIS.
enIndex | MFS instance index |
bRxTx | FALSE: RX IRQ, TRUE: TX IRQ |
Definition at line 615 of file mfs.c.
References FALSE, MfsInstanceIndexMfs0, MfsInstanceIndexMfs1, MfsInstanceIndexMfs10, MfsInstanceIndexMfs11, MfsInstanceIndexMfs12, MfsInstanceIndexMfs13, MfsInstanceIndexMfs14, MfsInstanceIndexMfs15, MfsInstanceIndexMfs2, MfsInstanceIndexMfs3, MfsInstanceIndexMfs4, MfsInstanceIndexMfs5, MfsInstanceIndexMfs6, MfsInstanceIndexMfs7, MfsInstanceIndexMfs8, MfsInstanceIndexMfs9, and PDL_DEFAULT_INTERRUPT_LEVEL.
Referenced by Mfs_Csio_DisableInt(), Mfs_I2c_DisableInt(), Mfs_Lin_DisableInt(), and Mfs_Uart_DisableInt().
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.
[in] | pstcI2c | Pointer to I2C instance |
[in] | enStatus | I2C status type
|
Ok | Status has been cleared normally |
ErrorInvalidParameter | If one of following conditions are met:
|
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().
en_result_t Mfs_I2c_ConfigAck | ( | volatile FM0P_MFS_I2C_TypeDef * | pstcI2c, |
en_i2c_ack_t | enAck | ||
) |
Configure ACK signal sent to master.
[in] | pstcI2c | Pointer to I2C instance |
[in] | enAck | ACK to be sent
|
Ok | ACK signal has been successfully configured |
ErrorInvalidParameter | If one of following conditions are met:
|
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().
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.
[in] | pstcI2c | Pointer to I2C instance register area |
Ok | Process successfully done. |
ErrorInvalidParameter | If one of following conditions are met:
|
Definition at line 3835 of file mfs.c.
References ErrorInvalidParameter, FALSE, MfsI2cGetInternDataPtr(), Ok, and TRUE.
en_result_t Mfs_I2c_DisableInt | ( | volatile FM0P_MFS_I2C_TypeDef * | pstcI2c, |
stc_i2c_int_sel_t * | pstcInt | ||
) |
Disable I2C interrupts.
[in] | pstcI2c | Pointer to I2C instance |
[in] | pstcInt | Pointer to the selection structure of I2C interrupt |
Ok | Interrupts has been disabled and callback functions are set to NULL |
ErrorInvalidParameter | If one of following conditions are met:
|
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().
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.
[in] | pstcI2c | Pointer to I2C instance |
[in] | pstcInt | Pointer to the selection structure of I2C interrupt |
[in] | pstcIntCb | Pointer to the structure of I2C interrupt callback functions |
Ok | Interrupts has been enabled and callback functions are set |
ErrorInvalidParameter | If one of following conditions are met:
|
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().
en_result_t Mfs_I2c_GenerateRestart | ( | volatile FM0P_MFS_I2C_TypeDef * | pstcI2c | ) |
Generate restart signal of I2C.
[in] | pstcI2c | Pointer to I2C instance |
Ok | Generate restart signal successfully |
ErrorInvalidParameter | pstcI2c == NULL |
ErrorTimeout | Timeout when generating a restart signal |
Definition at line 3953 of file mfs.c.
References ErrorInvalidParameter, ErrorTimeout, Ok, and SystemCoreClock.
Referenced by I2cRestart(), and I2cTxCallback().
en_result_t Mfs_I2c_GenerateStart | ( | volatile FM0P_MFS_I2C_TypeDef * | pstcI2c | ) |
Generate start signal of I2C.
[in] | pstcI2c | Pointer to I2C instance |
Ok | Generate start signal successfully |
ErrorInvalidParameter | pstcI2c == NULL |
ErrorTimeout | Timeout when generating a start signal |
Definition at line 3921 of file mfs.c.
References ErrorInvalidParameter, ErrorTimeout, Ok, and SystemCoreClock.
Referenced by I2cStart(), and I2cTxCallback().
en_result_t Mfs_I2c_GenerateStop | ( | volatile FM0P_MFS_I2C_TypeDef * | pstcI2c | ) |
Generate stop signal of I2C.
[in] | pstcI2c | Pointer to I2C instance |
Ok | Generate stop signal successfully |
ErrorInvalidParameter | pstcI2c == NULL |
ErrorTimeout | Timeout 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().
en_i2c_ack_t Mfs_I2c_GetAck | ( | volatile FM0P_MFS_I2C_TypeDef * | pstcI2c | ) |
Get the ACK signal from slave.
[in] | pstcI2c | Pointer to I2C instance |
I2cAck | Receive the ACK from I2C Slave |
I2cNAck | Receive 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().
en_i2c_data_dir_t Mfs_I2c_GetDataDir | ( | volatile FM0P_MFS_I2C_TypeDef * | pstcI2c | ) |
Get direction of I2C data in slave mode.
[in] | pstcI2c | Pointer to I2C instance |
i2c_master_tx_slave_rx | Master will send data to slave |
i2c_slave_tx_master_rx | Master 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 | ||
) |
boolean_t Mfs_I2c_GetStatus | ( | volatile FM0P_MFS_I2C_TypeDef * | pstcI2c, |
en_i2c_status_t | enStatus | ||
) |
Get status of I2C according to status type.
[in] | pstcI2c | Pointer to I2C instance |
[in] | enStatus | I2C status type
|
FALSE | If one of following conditions are met:
|
TRUE | If one of following conditions are met:
|
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().
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.
[in] | pstcI2c | Pointer to I2C instance register area |
[in] | pstcConfig | MFS I2C configuration |
Ok | Process successfully done. |
ErrorInvalidParameter | If one of following conditions are met:
|
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().
uint8_t Mfs_I2c_ReceiveData | ( | volatile FM0P_MFS_I2C_TypeDef * | pstcI2c | ) |
Read I2C data buffer.
[in] | pstcI2c | Pointer to I2C instance |
Receive | data |
Definition at line 4040 of file mfs.c.
Referenced by I2cRead(), and I2cRxCallback().
en_result_t Mfs_I2c_ResetFifo | ( | volatile FM0P_MFS_I2C_TypeDef * | pstcI2c, |
en_mfs_fifo_t | enFifo | ||
) |
Reset I2C FIFO.
[in] | pstcI2c | Pointer to I2C instance |
[in] | enFifo | FIFO1 or FIFO2 |
Ok | FIFO has been successfully reset |
ErrorInvalidParameter | If one of following conditions are met:
|
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.
[in] | pstcI2c | Pointer to I2C instance |
[in] | u8Data | Data to be sent |
Ok | Data has been successfully sent |
ErrorInvalidParameter | If one of following conditions are met:
|
Definition at line 4019 of file mfs.c.
References ErrorInvalidParameter, and Ok.
Referenced by I2cRestart(), I2cSendData(), I2cStart(), and I2cTxCallback().
en_result_t Mfs_I2c_SetBaudRate | ( | volatile FM0P_MFS_I2C_TypeDef * | pstcI2c, |
uint32_t | u32BaudRate | ||
) |
Set the baudrate of I2C.
[in] | pstcI2c | Pointer to I2C instance |
[in] | u32BaudRate | Baudrate value [bps] |
Ok | I2C baud rate has been successfully modified |
ErrorInvalidParameter | If one of following conditions are met:
|
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().
en_result_t Mfs_I2c_SetFifoCount | ( | volatile FM0P_MFS_I2C_TypeDef * | pstcI2c, |
en_mfs_fifo_t | enFifo, | ||
uint8_t | u8Count | ||
) |
Set I2C FIFO count.
[in] | pstcI2c | Pointer to I2C instance |
[in] | enFifo | FIFO1 or FIFO2 |
[in] | u8Count | FIFO count |
Ok | FIFO count has been successfully set |
ErrorInvalidParameter | If one of following conditions are met:
|
Definition at line 4348 of file mfs.c.
References ErrorInvalidParameter, MfsFifo1, MfsFifo2, and Ok.
static void Mfs_InitIrq | ( | en_mfs_instance_index_t | enIndex, |
boolean_t | bRxTx | ||
) | [static] |
Device dependent initialization of transmit interrupts according CMSIS with level defined in pdl.h.
enIndex | MFS instance index |
bRxTx | FALSE: RX IRQ, TRUE: TX IRQ |
Definition at line 283 of file mfs.c.
References FALSE, MfsInstanceIndexMfs0, MfsInstanceIndexMfs1, MfsInstanceIndexMfs10, MfsInstanceIndexMfs11, MfsInstanceIndexMfs12, MfsInstanceIndexMfs13, MfsInstanceIndexMfs14, MfsInstanceIndexMfs15, MfsInstanceIndexMfs2, MfsInstanceIndexMfs3, MfsInstanceIndexMfs4, MfsInstanceIndexMfs5, MfsInstanceIndexMfs6, MfsInstanceIndexMfs7, MfsInstanceIndexMfs8, MfsInstanceIndexMfs9, PDL_IRQ_LEVEL_MFS0_8_RX, PDL_IRQ_LEVEL_MFS0_8_TX, PDL_IRQ_LEVEL_MFS1_9_RX, PDL_IRQ_LEVEL_MFS1_9_TX, PDL_IRQ_LEVEL_MFS2_10_RX, PDL_IRQ_LEVEL_MFS2_10_TX, PDL_IRQ_LEVEL_MFS3_11_RX, PDL_IRQ_LEVEL_MFS3_11_TX, PDL_IRQ_LEVEL_MFS4_12_RX, PDL_IRQ_LEVEL_MFS4_12_TX, PDL_IRQ_LEVEL_MFS5_13_RX, PDL_IRQ_LEVEL_MFS5_13_TX, PDL_IRQ_LEVEL_MFS6_14_RX_DMA0, PDL_IRQ_LEVEL_MFS6_14_TX_DMA1, PDL_IRQ_LEVEL_MFS7_15_RX_DMA2, and PDL_IRQ_LEVEL_MFS7_15_TX_DMA3.
Referenced by Mfs_Csio_EnableInt(), Mfs_I2c_EnableInt(), Mfs_Lin_EnableInt(), and Mfs_Uart_EnableInt().
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.
[in] | pstcLin | Pointer to LIN instance |
[in] | enStatus | LIN status type
|
Ok | Status has been cleared normally |
ErrorInvalidParameter | If one of following conditions are met:
|
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.
[in] | pstcLin | Pointer to LIN instance register area |
Ok | Process successfully done. |
ErrorInvalidParameter | If one of following conditions are met:
|
Definition at line 4990 of file mfs.c.
References ErrorInvalidParameter, FALSE, MfsLinGetInternDataPtr(), Ok, and TRUE.
en_result_t Mfs_Lin_DisableFunc | ( | volatile FM0P_MFS_LIN_TypeDef * | pstcLin, |
en_lin_func_t | enFunc | ||
) |
Disable LIN functions.
[in] | pstcLin | Pointer to LIN instance |
[in] | enFunc | LIN function types
|
Ok | Function has been disabled normally |
ErrorInvalidParameter | If one of following conditions are met:
|
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.
[in] | pstcLin | Pointer to LIN instance |
[in] | pstcInt | Pointer to the selection structure of LIN interrupt |
Ok | Interrupts has been disabled and callback fucntion pointers are set to NULL |
ErrorInvalidParameter | If one of following conditions are met:
|
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.
en_result_t Mfs_Lin_EnableFunc | ( | volatile FM0P_MFS_LIN_TypeDef * | pstcLin, |
en_lin_func_t | enFunc | ||
) |
Enable LIN functions.
[in] | pstcLin | Pointer to LIN instance |
[in] | enFunc | LIN function types
|
Ok | Function has been enabled normally |
ErrorInvalidParameter | If one of following conditions are met:
|
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.
[in] | pstcLin | Pointer to LIN instance |
[in] | pstcInt | Pointer to the selection structure of LIN interrupt |
[in] | pstcIntCb | Pointer to the structure of LIN interrupt callback functions |
Ok | Interrupts has been enabled and callback functions are set |
ErrorInvalidParameter | If one of following conditions are met:
|
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.
en_result_t Mfs_Lin_GenerateBreakField | ( | volatile FM0P_MFS_LIN_TypeDef * | pstcLin | ) |
Generate LIN break filed.
[in] | pstcLin | Pointer to LIN instance |
Ok | Break filed has been successfully generated |
ErrorInvalidParameter | If one of following conditions are met:
|
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 | ||
) |
boolean_t Mfs_Lin_GetStatus | ( | volatile FM0P_MFS_LIN_TypeDef * | pstcLin, |
en_lin_status_t | enStatus | ||
) |
Get status of LIN according to status type.
[in] | pstcLin | Pointer to LIN instance |
[in] | enStatus | LIN status type
|
FALSE | If one of following conditions are met:
|
TRUE | If one of following conditions are met:
|
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.
[in] | pstcLin | Pointer to LIN instance register area |
[in] | pstcConfig | MFS LIN configuration |
Ok | Process successfully done. |
ErrorInvalidParameter | If one of following conditions are met:
|
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.
uint8_t Mfs_Lin_ReceiveData | ( | volatile FM0P_MFS_LIN_TypeDef * | pstcLin | ) |
en_result_t Mfs_Lin_ResetFifo | ( | volatile FM0P_MFS_LIN_TypeDef * | pstcLin, |
en_mfs_fifo_t | enFifo | ||
) |
Reset LIN FIFO.
[in] | pstcLin | Pointer to LIN instance |
[in] | enFifo | FIFO1 or FIFO2 |
Ok | FIFO has been successfully reset |
ErrorInvalidParameter | If one of following conditions are met:
|
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.
[in] | pstcLin | Pointer to LIN instance |
[in] | Data | Data to be sent |
Ok | Data has been successfully sent |
ErrorInvalidParameter | If one of following conditions are met:
|
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.
[in] | pstcLin | Pointer to LIN instance |
[in] | u32BaudRate | Baudrate value [bps] |
Ok | LIN baud rate has been successfully modified |
ErrorInvalidParameter | If one of following conditions are met:
|
Definition at line 5052 of file mfs.c.
References __HCLK, APBC1_PSR_Val, ErrorInvalidParameter, and Ok.
Referenced by Mfs_Lin_Init().
en_result_t Mfs_Lin_SetFifoCount | ( | volatile FM0P_MFS_LIN_TypeDef * | pstcLin, |
en_mfs_fifo_t | enFifo, | ||
uint8_t | u8Count | ||
) |
Set LIN FIFO count.
[in] | pstcLin | Pointer to LIN instance |
[in] | enFifo | FIFO1 or FIFO2 |
[in] | u8Count | FIFO count |
Ok | FIFO count has been successfully set |
ErrorInvalidParameter | If one of following conditions are met:
|
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.
[in] | pstcUart | Pointer to UART instance |
[in] | enStatus | UART status type
|
Ok | Status has been cleared normally |
ErrorInvalidParameter | If one of following conditions are met:
|
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.
[in] | pstcUart | Pointer to UART instance register area |
Ok | Process successfully done. |
ErrorInvalidParameter | If one of following conditions are met:
|
Definition at line 1499 of file mfs.c.
References ErrorInvalidParameter, FALSE, MfsUartGetInternDataPtr(), Ok, and TRUE.
en_result_t Mfs_Uart_DisableFunc | ( | volatile FM0P_MFS_UART_TypeDef * | pstcUart, |
en_uart_func_t | enFunc | ||
) |
Disable UART functions.
[in] | pstcUart | Pointer to UART instance |
[in] | enFunc | UART function types
|
Ok | Function has been disabled normally |
ErrorInvalidParameter | If one of following conditions are met:
|
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.
[in] | pstcUart | Pointer to UART instance |
[in] | pstcInt | Pointer to the selection structure of UART interrupt |
Ok | Interrupts has been disabled and callback function pointers are set to NULL |
ErrorInvalidParameter | If one of following conditions are met:
|
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.
en_result_t Mfs_Uart_EnableFunc | ( | volatile FM0P_MFS_UART_TypeDef * | pstcUart, |
en_uart_func_t | enFunc | ||
) |
Enable UART functions.
[in] | pstcUart | Pointer to UART instance |
[in] | enFunc | UART function types
|
Ok | Function has been enabled normally |
ErrorInvalidParameter | If one of following conditions are met:
|
Definition at line 1592 of file mfs.c.
References ErrorInvalidParameter, Ok, UartRx, and UartTx.
Referenced by Uart_Printf_Init().
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.
[in] | pstcUart | Pointer to UART instance |
[in] | pstcInt | Pointer to the selection structure of UART interrupt |
[in] | pstcIntCb | Pointer to the structure of UART interrupt callback functions |
Ok | Interrupts has been enabled and callback functions are set |
ErrorInvalidParameter | If one of following conditions are met:
|
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.
uint8_t Mfs_Uart_GetFifoCount | ( | volatile FM0P_MFS_UART_TypeDef * | pstcUart, |
en_mfs_fifo_t | enFifo | ||
) |
boolean_t Mfs_Uart_GetStatus | ( | volatile FM0P_MFS_UART_TypeDef * | pstcUart, |
en_uart_status_t | enStatus | ||
) |
Get status of UART according to status type.
[in] | pstcUart | Pointer to UART instance |
[in] | enStatus | UART status type
|
FALSE | If one of following conditions are met:
|
TRUE | If one of following conditions are met:
|
Definition at line 1680 of file mfs.c.
References FALSE, TRUE, UartFrameError, UartOverrunError, UartParityError, UartRxFull, UartTxEmpty, UartTxFifoRequest, and UartTxIdle.
Referenced by putchar().
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.
[in] | pstcUart | Pointer to UART instance register area |
[in] | pstcConfig | MFS UART configuration |
Ok | Process successfully done. |
ErrorInvalidParameter | If one of following conditions are met:
|
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().
uint16_t Mfs_Uart_ReceiveData | ( | volatile FM0P_MFS_UART_TypeDef * | pstcUart | ) |
en_result_t Mfs_Uart_ResetFifo | ( | volatile FM0P_MFS_UART_TypeDef * | pstcUart, |
en_mfs_fifo_t | enFifo | ||
) |
Reset UART FIFO.
[in] | pstcUart | Pointer to UART instance |
[in] | enFifo | FIFO1 or FIFO2 |
Ok | FIFO has been successfully reset |
ErrorInvalidParameter | If one of following conditions are met:
|
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.
[in] | pstcUart | Pointer to UART instance |
[in] | u16Data | Send data |
Ok | Data has been successfully sent |
ErrorInvalidParameter | If one of following conditions are met:
|
Definition at line 1778 of file mfs.c.
References ErrorInvalidParameter, and Ok.
Referenced by putchar().
en_result_t Mfs_Uart_SetBaudRate | ( | volatile FM0P_MFS_UART_TypeDef * | pstcUart, |
uint32_t | u32BaudRate | ||
) |
Set the baudrate of UART.
[in] | pstcUart | Pointer to UART instance |
[in] | u32BaudRate | Baudrate value [bps] |
Ok | UART baud rate has been successfully modified |
ErrorInvalidParameter | If one of following conditions are met:
|
Definition at line 1560 of file mfs.c.
References __HCLK, APBC1_PSR_Val, ErrorInvalidParameter, and Ok.
Referenced by Mfs_Uart_Init().
en_result_t Mfs_Uart_SetFifoCount | ( | volatile FM0P_MFS_UART_TypeDef * | pstcUart, |
en_mfs_fifo_t | enFifo, | ||
uint8_t | u8Count | ||
) |
Set UART FIFO count.
[in] | pstcUart | Pointer to UART instance |
[in] | enFifo | FIFO1 or FIFO2 |
[in] | u8Count | FIFO count |
Ok | FIFO count has been successfully set |
ErrorInvalidParameter | If one of following conditions are met:
|
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.
pstcCsio | Pointer to CSIO instance |
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().
static stc_mfs_intern_data_t * MfsCsioGetInternDataPtr | ( | volatile FM0P_MFS_CSIO_TypeDef * | pstcCsio | ) | [static] |
Return the internal data for a certain CSIO instance.
pstcCsio | Pointer to CSIO instance |
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().
void MfsCsioIrqHandlerRx | ( | volatile FM0P_MFS_CSIO_TypeDef * | pstcCsio, |
stc_mfs_intern_data_t * | pstcMfsInternData | ||
) |
CSIO receive interrupt service routine.
pstcCsio | Pointer to CSIO instance |
pstcMfsInternData | Pointer 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().
void MfsCsioIrqHandlerStatus | ( | volatile FM0P_MFS_CSIO_TypeDef * | pstcCsio, |
stc_mfs_intern_data_t * | pstcMfsInternData | ||
) |
CSIO status interrupt service routine.
pstcCsio | Pointer to CSIO instance |
pstcMfsInternData | Pointer 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().
void MfsCsioIrqHandlerTx | ( | volatile FM0P_MFS_CSIO_TypeDef * | pstcCsio, |
stc_mfs_intern_data_t * | pstcMfsInternData | ||
) |
CSIO transfer interrupt service routine.
pstcCsio | Pointer to CSIO instance |
pstcMfsInternData | Pointer 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().
static en_mfs_instance_index_t MfsI2cGetInstanceIndex | ( | volatile FM0P_MFS_I2C_TypeDef * | pstcI2c | ) | [static] |
Return instance index for a certain I2C instance.
pstcI2c | Pointer to I2C instance |
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().
static stc_mfs_intern_data_t * MfsI2cGetInternDataPtr | ( | volatile FM0P_MFS_I2C_TypeDef * | pstcI2c | ) | [static] |
Return the internal data for a certain I2C instance.
pstcI2c | Pointer to I2C instance |
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().
void MfsI2cIrqHandlerRx | ( | volatile FM0P_MFS_I2C_TypeDef * | pstcI2c, |
stc_mfs_intern_data_t * | pstcMfsInternData | ||
) |
I2C receive interrupt service routine.
pstcI2c | Pointer to I2C instance |
pstcMfsInternData | Pointer 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().
void MfsI2cIrqHandlerStatus | ( | volatile FM0P_MFS_I2C_TypeDef * | pstcI2c, |
stc_mfs_intern_data_t * | pstcMfsInternData | ||
) |
I2C status interrupt service routine.
pstcI2c | Pointer to I2C instance |
pstcMfsInternData | Pointer 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().
void MfsI2cIrqHandlerTx | ( | volatile FM0P_MFS_I2C_TypeDef * | pstcI2c, |
stc_mfs_intern_data_t * | pstcMfsInternData | ||
) |
I2C transfer interrupt service routine.
pstcI2c | Pointer to I2C instance |
pstcMfsInternData | Pointer 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().
static en_mfs_instance_index_t MfsLinGetInstanceIndex | ( | volatile FM0P_MFS_LIN_TypeDef * | pstcLin | ) | [static] |
Return instance index for a certain LIN instance.
pstcLin | Pointer to LIN instance |
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().
static stc_mfs_intern_data_t * MfsLinGetInternDataPtr | ( | volatile FM0P_MFS_LIN_TypeDef * | pstcLin | ) | [static] |
Return the internal data for a certain MFS instance.
pstcLin | Pointer to LIN instance |
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().
void MfsLinIrqHandlerRx | ( | volatile FM0P_MFS_LIN_TypeDef * | pstcLin, |
stc_mfs_intern_data_t * | pstcMfsInternData | ||
) |
LIN receive interrupt service routine.
pstcLin | Pointer to LIN instance |
pstcMfsInternData | Pointer 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().
void MfsLinIrqHandlerStatus | ( | volatile FM0P_MFS_LIN_TypeDef * | pstcLin, |
stc_mfs_intern_data_t * | pstcMfsInternData | ||
) |
LIN status interrupt service routine.
pstcLin | Pointer to LIN instance |
pstcMfsInternData | Pointer 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().
void MfsLinIrqHandlerTx | ( | volatile FM0P_MFS_LIN_TypeDef * | pstcLin, |
stc_mfs_intern_data_t * | pstcMfsInternData | ||
) |
LIN transmit interrupt service routine.
pstcLin | Pointer to LIN instance |
pstcMfsInternData | Pointer 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().
static en_mfs_instance_index_t MfsUartGetInstanceIndex | ( | volatile FM0P_MFS_UART_TypeDef * | pstcUart | ) | [static] |
Return instance index for a certain UART instance.
pstcUart | Pointer to UART instance |
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().
static stc_mfs_intern_data_t * MfsUartGetInternDataPtr | ( | volatile FM0P_MFS_UART_TypeDef * | pstcUart | ) | [static] |
Return the internal data for a certain UART instance.
pstcUart | Pointer to UART instance |
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().
void MfsUartIrqHandlerRx | ( | volatile FM0P_MFS_UART_TypeDef * | pstcUart, |
stc_mfs_intern_data_t * | pstcMfsInternData | ||
) |
UART receive interrupt service routine.
pstcUart | Pointer to UART instance |
pstcMfsInternData | Pointer 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().
void MfsUartIrqHandlerTx | ( | volatile FM0P_MFS_UART_TypeDef * | pstcUart, |
stc_mfs_intern_data_t * | pstcMfsInternData | ||
) |
MFS transmit interrupt service routine.
pstcUart | Pointer to UART instance |
pstcMfsInternData | Pointer 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().
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.
Definition at line 82 of file mfs.c.
Referenced by MFS0_8_RX_IRQHandler(), MFS0_8_TX_IRQHandler(), MFS1_9_RX_IRQHandler(), MFS1_9_TX_IRQHandler(), MFS2_10_RX_IRQHandler(), MFS2_10_TX_IRQHandler(), MFS3_11_RX_IRQHandler(), MFS3_11_TX_IRQHandler(), MFS4_12_RX_IRQHandler(), MFS4_12_TX_IRQHandler(), MFS5_13_RX_IRQHandler(), MFS5_13_TX_IRQHandler(), MFS6_14_RX_DMA0_IRQHandler(), MFS6_14_TX_DMA1_IRQHandler(), MFS7_15_RX_DMA2_IRQHandler(), and MFS7_15_TX_DMA3_IRQHandler().
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.
Definition at line 82 of file mfs.c.
Referenced by MFS0_8_RX_IRQHandler(), MFS0_8_TX_IRQHandler(), MFS1_9_RX_IRQHandler(), MFS1_9_TX_IRQHandler(), MFS2_10_RX_IRQHandler(), MFS2_10_TX_IRQHandler(), MFS3_11_RX_IRQHandler(), MFS3_11_TX_IRQHandler(), MFS4_12_RX_IRQHandler(), MFS4_12_TX_IRQHandler(), MFS5_13_RX_IRQHandler(), MFS5_13_TX_IRQHandler(), MFS6_14_RX_DMA0_IRQHandler(), MFS6_14_TX_DMA1_IRQHandler(), MFS7_15_RX_DMA2_IRQHandler(), and MFS7_15_TX_DMA3_IRQHandler().