PDL for FM4  Version1.2
Peripheral Driverl Library for FM4
MFS Low Level Functions (MFS)

Data Structures

struct  stc_mfs_uart_config
 Mfs configuration. More...
 
struct  stc_mfs_csio_config
 
struct  stc_mfs_i2c_config
 
struct  stc_mfs_lin_config
 
struct  stc_mfs_csio_cs_timing
 Mfs chip select timing configuration for CSIO. More...
 
struct  stc_mfs_fifo_config
 Mfs FIFO configuration. 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...
 

Macros

#define MFS_MASTER_CLK_HCR   (0x00u)
 
#define MFS_MASTER_CLK_MAIN   (0x01u)
 
#define MFS_MASTER_CLK_PLL   (0x02u)
 
#define MFS_MASTER_CLK_LCR   (0x04u)
 
#define MFS_MASTER_CLK_SUB   (0x05u)
 
#define MFS_BASE_CLK_DIV1   (0x00u)
 
#define MFS_BASE_CLK_DIV2   (0x01u)
 
#define MFS_BASE_CLK_DIV3   (0x02u)
 
#define MFS_BASE_CLK_DIV4   (0x03u)
 
#define MFS_BASE_CLK_DIV6   (0x04u)
 
#define MFS_BASE_CLK_DIV8   (0x05u)
 
#define MFS_BASE_CLK_DIV16   (0x06u)
 
#define MFS_NUM_1   (0x01u)
 
#define MFS_NUM_2   (0x02u)
 
#define MFS_NUM_3   (0x03u)
 
#define MFS_NUM_4   (0x04u)
 
#define MFS_NUM_5   (0x05u)
 
#define MFS_NUM_6   (0x06u)
 
#define MFS_NUM_7   (0x07u)
 
#define MFS_NUM_8   (0x08u)
 
#define MFS_NUM_16   (0x10u)
 
#define MFS_BGR_MASK   (0x7FFFu)
 
#define MFS_PLL_CTL1_MASK   (0x0Fu)
 
#define MFS_PLL_CTL2_MASK   (0x3Fu)
 
#define MFS0   (*((volatile stc_mfsn_t *) FM4_MFS0_BASE))
 
#define MFS1   (*((volatile stc_mfsn_t *) FM4_MFS1_BASE))
 
#define MFS2   (*((volatile stc_mfsn_t *) FM4_MFS2_BASE))
 
#define MFS3   (*((volatile stc_mfsn_t *) FM4_MFS3_BASE))
 
#define MFS4   (*((volatile stc_mfsn_t *) FM4_MFS4_BASE))
 
#define MFS5   (*((volatile stc_mfsn_t *) FM4_MFS5_BASE))
 
#define MFS6   (*((volatile stc_mfsn_t *) FM4_MFS6_BASE))
 
#define MFS7   (*((volatile stc_mfsn_t *) FM4_MFS7_BASE))
 
#define MFS8   (*((volatile stc_mfsn_t *) FM4_MFS8_BASE))
 
#define MFS9   (*((volatile stc_mfsn_t *) FM4_MFS9_BASE))
 
#define MFS10   (*((volatile stc_mfsn_t *) FM4_MFS10_BASE))
 
#define MFS11   (*((volatile stc_mfsn_t *) FM4_MFS11_BASE))
 
#define MFS12   (*((volatile stc_mfsn_t *) FM4_MFS12_BASE))
 
#define MFS13   (*((volatile stc_mfsn_t *) FM4_MFS13_BASE))
 
#define MFS14   (*((volatile stc_mfsn_t *) FM4_MFS14_BASE))
 
#define MFS15   (*((volatile stc_mfsn_t *) FM4_MFS15_BASE))
 
#define MFS_I2C_FAST_MODE_PLUS_CH_A   (&MFS3)
 
#define MFS_I2C_FAST_MODE_PLUS_CH_B   (&MFS7)
 
#define PDL_MFS_NO_PARAM_CHK   PDL_OFF
 
#define MFS_FIFO_MIN_VAL   (0u)
 Fifo related settings These values represent the minimum and maximum values of the hardware Fifo level settings. (Interrupt) Trigger levels should be set to a level that will allow at least 1 remaining byte to be transmitted or received also if the interrupt is pending. Using half of the FiFo size is always a good choice to get balanced load and continuous data flow. More...
 
#define MFS_FIFO_MAX_VAL   (16u)
 
#define MFS_RX_FIFO_MIN_VAL   (1u)
 
#define MFS_MD_UART_NORNAL   (0x00)
 
#define MFS_MD_UART_MULTI   (0x01)
 
#define MFS_MD_CSIO   (0x02)
 
#define MFS_MD_LIN   (0x03)
 
#define MFS_MD_I2C   (0x04)
 
#define MFS_DATA_LEN_5   (0x01)
 
#define MFS_DATA_LEN_6   (0x02)
 
#define MFS_DATA_LEN_7   (0x03)
 
#define MFS_DATA_LEN_8   (0x00)
 
#define MFS_DATA_LEN_9   (0x04)
 
#define MFS_DATA_LEN_10   (0x05)
 
#define MFS_DATA_LEN_11   (0x06)
 
#define MFS_DATA_LEN_12   (0x07)
 
#define MFS_DATA_LEN_13   (0x00)
 
#define MFS_DATA_LEN_14   (0x01)
 
#define MFS_DATA_LEN_15   (0x02)
 
#define MFS_DATA_LEN_16   (0x03)
 
#define MFS_DATA_LEN_20   (0x04)
 
#define MFS_DATA_LEN_24   (0x05)
 
#define MFS_DATA_LEN_32   (0x06)
 
#define MFS_WAIT_TIME_0BIT   (0x00)
 
#define MFS_WAIT_TIME_1BIT   (0x01)
 
#define MFS_WAIT_TIME_2BITS   (0x02)
 
#define MFS_WAIT_TIME_3BITS   (0x03)
 
#define MFS_LIN_BREAK_13BITS   (0x00)
 
#define MFS_LIN_BREAK_14BITS   (0x01)
 
#define MFS_LIN_BREAK_15BITS   (0x02)
 
#define MFS_LIN_BREAK_16BITS   (0x03)
 
#define MFS_LIN_DELIMITER_1BIT   (0x00)
 
#define MFS_LIN_DELIMITER_2BITS   (0x01)
 
#define MFS_LIN_DELIMITER_3BITS   (0x02)
 
#define MFS_LIN_DELIMITER_4BITS   (0x03)
 
#define MFS_SSR_TDRE   (0x02u)
 
#define MFS_SSR_RDRF   (0x04u)
 
#define MFS_SSR_ORE   (0x08u)
 
#define MFS_UART_SSR_TBI   (0x01u)
 
#define MFS_UART_SSR_TDRE   (0x02u)
 
#define MFS_UART_SSR_RDRF   (0x04u)
 
#define MFS_UART_SSR_ORE   (0x08u)
 
#define MFS_UART_SSR_FRE   (0x10u)
 
#define MFS_UART_SSR_PE   (0x20u)
 
#define MFS_UART_SSR_ERR   (0x38u)
 
#define MFS_CSIO_SSR_TBI   (0x01u)
 
#define MFS_CSIO_SSR_TDRE   (0x02u)
 
#define MFS_CSIO_SSR_RDRF   (0x04u)
 
#define MFS_CSIO_SSR_ORE   (0x08u)
 
#define MFS_CSIO_SSR_ERR   (0x08u)
 
#define MFS_I2C_SSR_TBI   (0x01u)
 
#define MFS_I2C_SSR_TDRE   (0x02u)
 
#define MFS_I2C_SSR_RDRF   (0x04u)
 
#define MFS_I2C_SSR_ORE   (0x08u)
 
#define MFS_I2C_SSR_ERR   (0x08u)
 
#define MFS_LIN_SSR_TBI   (0x01u)
 
#define MFS_LIN_SSR_TDRE   (0x02u)
 
#define MFS_LIN_SSR_RDRF   (0x04u)
 
#define MFS_LIN_SSR_ORE   (0x08u)
 
#define MFS_LIN_SSR_FRE   (0x10u)
 
#define MFS_LIN_SSR_ERR   (0x18u)
 
#define MFS_LIN_SSR_LBD   (0x20u)
 
#define MFS_SACSR_STATUS_MASK   (0x0900u)
 
#define MFS_SACSR_CSE   (0x0800u)
 
#define MFS_SACSR_TINT   (0x0100u)
 
#define MFS_SACSR_TDIV_NONE   (0x00)
 
#define MFS_SACSR_TDIV_2   (0x01)
 
#define MFS_SACSR_TDIV_4   (0x02)
 
#define MFS_SACSR_TDIV_8   (0x03)
 
#define MFS_SACSR_TDIV_16   (0x04)
 
#define MFS_SACSR_TDIV_32   (0x05)
 
#define MFS_SACSR_TDIV_64   (0x06)
 
#define MFS_SACSR_TDIV_128   (0x07)
 
#define MFS_SACSR_TDIV_256   (0x08)
 
#define MFS_SCRCR_CDIV_NONE   (0x00)
 
#define MFS_SCRCR_CDIV_2   (0x01)
 
#define MFS_SCRCR_CDIV_4   (0x02)
 
#define MFS_SCRCR_CDIV_8   (0x03)
 
#define MFS_SCRCR_CDIV_16   (0x04)
 
#define MFS_SCRCR_CDIV_32   (0x05)
 
#define MFS_SCRCR_CDIV_64   (0x06)
 
#define MFS_CSIO_TBYTE_MAX   (0xffu)
 
#define MFS_CLOCK_40M   (40000000u)
 
#define MFS_CLOCK_60M   (60000000u)
 
#define MFS_CLOCK_80M   (80000000u)
 
#define MFS_CLOCK_100M   (100000000u)
 
#define MFS_CLOCK_120M   (120000000u)
 
#define MFS_CLOCK_140M   (140000000u)
 
#define MFS_CLOCK_160M   (160000000u)
 
#define MFS_CLOCK_180M   (180000000u)
 
#define MFS_CLOCK_200M   (200000000u)
 
#define MFS_CLOCK_220M   (220000000u)
 
#define MFS_CLOCK_240M   (240000000u)
 
#define MFS_CLOCK_260M   (260000000u)
 
#define MFS_CLOCK_280M   (280000000u)
 
#define MFS_CLOCK_300M   (300000000u)
 
#define MFS_CLOCK_320M   (320000000u)
 
#define MFS_CLOCK_340M   (340000000u)
 
#define MFS_CLOCK_360M   (360000000u)
 
#define MFS_CLOCK_380M   (380000000u)
 
#define MFS_CLOCK_400M   (400000000u)
 
#define MFS0_FIFO   MfsHasFifo
 
#define MFS1_FIFO   MfsHasFifo
 
#define MFS2_FIFO   MfsHasFifo
 
#define MFS3_FIFO   MfsHasFifo
 
#define MFS4_FIFO   MfsHasFifo
 
#define MFS5_FIFO   MfsHasFifo
 
#define MFS6_FIFO   MfsHasFifo
 
#define MFS7_FIFO   MfsHasFifo
 
#define MFS8_FIFO   MfsHasFifo
 
#define MFS9_FIFO   MfsHasFifo
 
#define MFS10_FIFO   MfsHasFifo
 
#define MFS11_FIFO   MfsHasFifo
 
#define MFS12_FIFO   MfsHasFifo
 
#define MFS13_FIFO   MfsHasFifo
 
#define MFS14_FIFO   MfsHasFifo
 
#define MFS15_FIFO   MfsHasFifo
 
#define MFS0_CS   MfsHasNoCs
 
#define MFS1_CS   MfsHasNoCs
 
#define MFS2_CS   MfsHasNoCs
 
#define MFS3_CS   MfsHasNoCs
 
#define MFS4_CS   MfsHasNoCs
 
#define MFS5_CS   MfsHasNoCs
 
#define MFS6_CS   MfsHasCs
 
#define MFS7_CS   MfsHasCs
 
#define MFS8_CS   MfsHasNoCs
 
#define MFS9_CS   MfsHasNoCs
 
#define MFS10_CS   MfsHasNoCs
 
#define MFS11_CS   MfsHasNoCs
 
#define MFS12_CS   MfsHasNoCs
 
#define MFS13_CS   MfsHasNoCs
 
#define MFS14_CS   MfsHasNoCs
 
#define MFS15_CS   MfsHasNoCs
 
#define MFS_SMR_MODEBITS_MASK   (0xE0u) /* MD2, MD1, MD0, 0, 0, 0, 0, 0 */
 SMR Mode bits mask. More...
 
#define MFS_SMR_LIN_MODE   (0x60u) /* MD2 = 0, MD1 = 1, MD0 = 1 */
 SMR LIN Mode bits. More...
 
#define MFS_ISMK_I2C_ENABLE   (0x80u) /* EN */
 ISMK bits mask. More...
 
#define MFS_ISMK_SLV_ADDR_MASK   (0x7Fu) /* SM0 - SM6 */
 
#define MFS_ISBA_ADDR_ENABLE   (0x80u) /* SAEN */
 ISBA bits mask. More...
 
#define MFS_ISBA_SLV_ADDR   (0x7Fu) /* SA0 - SA6 */
 
#define MFS_EIBCR_WRT_MASK   (0x0Fu) /* BEC, SOCE, SCLC, SDAC */
 EIBCR bits mask. More...
 
#define Mfs_SetIBCR   Mfs_SetSCR
 
#define Mfs_GetIBCR   Mfs_GetSCR
 
#define Mfs_SetIBSR   Mfs_SetESCR
 
#define Mfs_GetIBSR   Mfs_GetESCR
 
#define Mfs_GetSSR(pstcMfs)   Mfs_GetStatus(pstcMfs, 0xFF)
 
#define Mfs_GetRDR   Mfs_ReadData
 
#define Mfs_SetTDR   Mfs_WriteData
 
#define Mfs_GetFBYTE1(pstcMfs)   Mfs_GetFifoBytes(pstcMfs, MfsFifo1)
 
#define Mfs_GetFBYTE2(pstcMfs)   Mfs_GetFifoBytes(pstcMfs, MfsFifo2)
 
#define Mfs_GetSTMR   Mfs_Csio_GetSerialTimer
 
#define Mfs_SetSTMCR   Mfs_Csio_SetCmpVal4SerialTimer
 
#define Mfs_SetNFCR   Mfs_I2c_SetNoizeFilter
 

Typedefs

typedef FM4_MFS_TypeDef stc_mfsn_t
 
typedef enum en_mfs_uart_mode en_mfs_uart_mode_t
 Mfs UART mode. More...
 
typedef enum en_mfs_csio_mode en_mfs_csio_mode_t
 Mfs CSIO mode (Master/Slave) More...
 
typedef enum en_mfs_csio_act_mode en_mfs_csio_act_mode_t
 Mfs CSIO active mode (Normal/SPI) More...
 
typedef enum en_mfs_i2c_mode en_mfs_i2c_mode_t
 Mfs I2C mode. More...
 
typedef enum en_mfs_i2c_fast_mode en_mfs_i2c_fast_mode_t
 Mfs I2C Fast-mode Plus settings. More...
 
typedef enum en_mfs_lin_mode en_mfs_lin_mode_t
 Mfs Lin Mode (Master/Slave) More...
 
typedef enum en_mfs_parity en_mfs_parity_t
 Mfs parity. More...
 
typedef enum en_mfs_characterlength en_mfs_characterlength_t
 Mfs character length. More...
 
typedef enum en_mfs_stopbit en_mfs_stopbit_t
 Mfs start/stop bit. More...
 
typedef enum
en_mfs_csio_sync_wait_time 
en_mfs_csio_sync_wait_time_t
 Mfs CSIO wait time insertion. More...
 
typedef enum
en_mfs_i2c_noize_filter 
en_mfs_i2c_noize_filter_t
 Mfs I2C Auxiliary Nois Filter Settings. More...
 
typedef enum
en_mfs_i2c_datadirection 
en_mfs_i2c_datadirection_t
 MFS I2C data direction (read/write) More...
 
typedef enum en_mfs_i2c_wait_sel en_mfs_i2c_wait_sel_t
 Mfs I2C Wait Selection Settings. More...
 
typedef enum en_mfs_fifo_available en_mfs_fifo_available_t
 Mfs FIFO availability. More...
 
typedef enum en_mfs_fifo en_mfs_fifo_t
 Mfs FIFO Number. More...
 
typedef enum en_mfs_fifo_select en_mfs_fifo_select_t
 Mfs FIFO Selection. More...
 
typedef enum
en_mfs_lin_stop_bit_length 
en_mfs_lin_stop_bit_length_t
 Mfs Lin Stop Bit Length. More...
 
typedef enum
en_mfs_lin_break_length 
en_mfs_lin_break_length_t
 Mfs Lin Break Generation Length (only applicable in LIN master mode) More...
 
typedef enum
en_mfs_lin_delimiter_length 
en_mfs_lin_delimiter_length_t
 Mfs Lin Break Delimiter Length (only applicable in LIN master mode) More...
 
typedef enum en_mfs_bus_clk_divider en_mfs_bus_clk_divider_t
 APB2 bus clk divider value definition. More...
 
typedef struct stc_mfs_uart_config stc_mfs_uart_config_t
 Mfs configuration. More...
 
typedef struct stc_mfs_csio_config stc_mfs_csio_config_t
 
typedef struct stc_mfs_i2c_config stc_mfs_i2c_config_t
 
typedef struct stc_mfs_lin_config stc_mfs_lin_config_t
 
typedef struct
stc_mfs_csio_cs_timing 
stc_mfs_csio_cs_timing_t
 Mfs chip select timing configuration for CSIO. More...
 
typedef struct stc_mfs_fifo_config stc_mfs_fifo_config_t
 Mfs FIFO configuration. More...
 
typedef void(* mfs_tx_cb_func_ptr_t )(volatile stc_mfsn_t *pstcMfs, void *pvHandle)
 Mfscallback function prototypes. More...
 
typedef void(* mfs_rx_cb_func_ptr_t )(volatile stc_mfsn_t *pstcMfs, void *pvHandle)
 
typedef void(* mfs_sts_cb_func_ptr_t )(volatile stc_mfsn_t *pstcMfs, void *pvHandle)
 
typedef enum en_mfs_instance_index en_mfs_instance_index_t
 Enumeration to define an index for each enabled MFS instance. More...
 
typedef struct stc_mfs_intern_data stc_mfs_intern_data_t
 MFS module internal data, storing internal information for each enabled MFS instance. More...
 
typedef struct
stc_mfs_instance_data 
stc_mfs_instance_data_t
 MFS instance data type. More...
 

Enumerations

enum  en_mfs_uart_mode {
  MfsUartNormal = 0,
  MfsUartMulti = 1
}
 Mfs UART mode. More...
 
enum  en_mfs_csio_mode {
  MfsCsioMaster = 0,
  MfsCsioSlave = 1
}
 Mfs CSIO mode (Master/Slave) More...
 
enum  en_mfs_csio_act_mode {
  MfsCsioActNormalMode = 0,
  MfsCsioActSpiMode = 1
}
 Mfs CSIO active mode (Normal/SPI) More...
 
enum  en_mfs_i2c_mode {
  MfsI2cMaster = 0,
  MfsI2cSlave = 1
}
 Mfs I2C mode. More...
 
enum  en_mfs_i2c_fast_mode {
  MfsI2cDisableFastModePlus = 0,
  MfsI2cEnableFastModePlus = 1
}
 Mfs I2C Fast-mode Plus settings. More...
 
enum  en_mfs_lin_mode {
  MfsLinMaster = 0,
  MfsLinSlave = 1
}
 Mfs Lin Mode (Master/Slave) More...
 
enum  en_mfs_parity {
  MfsParityNone = 0,
  MfsParityEven = 2,
  MfsParityOdd = 3
}
 Mfs parity. More...
 
enum  en_mfs_characterlength {
  MfsFiveBits = 0,
  MfsSixBits = 1,
  MfsSevenBits = 2,
  MfsEightBits = 3,
  MfsNineBits = 4,
  MfsTenBits = 5,
  MfsElevenBits = 6,
  MfsTwelveBits = 7,
  MfsThirteenBits = 8,
  MfsFourteenBits = 9,
  MfsFifteenBits = 10,
  MfsSixteenBits = 11,
  MfsTwentyBits = 12,
  MfsTwentyFourBits = 13,
  MfsThirtyTwoBits = 14
}
 Mfs character length. More...
 
enum  en_mfs_stopbit {
  MfsOneStopBit = 0,
  MfsTwoStopBits = 1,
  MfsThreeStopBits = 2,
  MfsFourStopBits = 3
}
 Mfs start/stop bit. More...
 
enum  en_mfs_csio_sync_wait_time {
  MfsSyncWaitZero = 0,
  MfsSyncWaitOne = 1,
  MfsSyncWaitTwo = 2,
  MfsSyncWaitThree = 3
}
 Mfs CSIO wait time insertion. More...
 
enum  en_mfs_i2c_noize_filter {
  MfsI2cNoizeFilterLess40M = 0x00,
  MfsI2cNoizeFilterLess60M = 0x01,
  MfsI2cNoizeFilterLess80M = 0x02,
  MfsI2cNoizeFilterLess100M = 0x03,
  MfsI2cNoizeFilterLess120M = 0x04,
  MfsI2cNoizeFilterLess140M = 0x05,
  MfsI2cNoizeFilterLess160M = 0x06,
  MfsI2cNoizeFilterLess180M = 0x07,
  MfsI2cNoizeFilterLess200M = 0x08,
  MfsI2cNoizeFilterLess220M = 0x09,
  MfsI2cNoizeFilterLess240M = 0x0A,
  MfsI2cNoizeFilterLess260M = 0x0B,
  MfsI2cNoizeFilterLess280M = 0x0C,
  MfsI2cNoizeFilterLess300M = 0x0D,
  MfsI2cNoizeFilterLess320M = 0x0E,
  MfsI2cNoizeFilterLess340M = 0x0F,
  MfsI2cNoizeFilterLess360M = 0x10,
  MfsI2cNoizeFilterLess380M = 0x11,
  MfsI2cNoizeFilterLess400M = 0x12
}
 Mfs I2C Auxiliary Nois Filter Settings. More...
 
enum  en_mfs_i2c_datadirection {
  MfsI2cWrite = 0x00,
  MfsI2cRead = 0x01
}
 MFS I2C data direction (read/write) More...
 
enum  en_mfs_i2c_wait_sel {
  MfsI2cWaitSelAfterAck = 0,
  MfsI2cWaitSelDataTxRx = 1
}
 Mfs I2C Wait Selection Settings. More...
 
enum  en_mfs_fifo_available {
  MfsHasNoFifo = 0,
  MfsHasFifo = 1
}
 Mfs FIFO availability. More...
 
enum  en_mfs_fifo {
  MfsFifo1 = 0,
  MfsFifo2 = 1
}
 Mfs FIFO Number. More...
 
enum  en_mfs_fifo_select {
  MfsTxFifo1RxFifo2 = 0,
  MfsTxFifo2RxFifo1 = 1
}
 Mfs FIFO Selection. More...
 
enum  en_mfs_lin_stop_bit_length {
  MfsLinOneStopBit = 0,
  MfsLinTwoStopBits = 1,
  MfsLinThreeStopBits = 2,
  MfsLinFourStopBits = 3
}
 Mfs Lin Stop Bit Length. More...
 
enum  en_mfs_lin_break_length {
  MfsLinBreakLength13 = 0,
  MfsLinBreakLength14 = 1,
  MfsLinBreakLength15 = 2,
  MfsLinBreakLength16 = 3
}
 Mfs Lin Break Generation Length (only applicable in LIN master mode) More...
 
enum  en_mfs_lin_delimiter_length {
  MfsLinDelimiterLength1 = 0,
  MfsLinDelimiterLength2 = 1,
  MfsLinDelimiterLength3 = 2,
  MfsLinDelimiterLength4 = 3
}
 Mfs Lin Break Delimiter Length (only applicable in LIN master mode) More...
 
enum  en_mfs_bus_clk_divider {
  MfsClkDiv0 = 0,
  MfsClkDiv1 = 1,
  MfsClkDiv2 = 2,
  MfsClkDiv3 = 3
}
 APB2 bus clk divider value definition. More...
 
enum  en_mfs_instance_index {
  MfsInstanceIndexMfs0,
  MfsInstanceIndexMfs1,
  MfsInstanceIndexMfs2,
  MfsInstanceIndexMfs3,
  MfsInstanceIndexMfs4,
  MfsInstanceIndexMfs5,
  MfsInstanceIndexMfs6,
  MfsInstanceIndexMfs7,
  MfsInstanceIndexMfs8,
  MfsInstanceIndexMfs9,
  MfsInstanceIndexMfs10,
  MfsInstanceIndexMfs11,
  MfsInstanceIndexMfs12,
  MfsInstanceIndexMfs13,
  MfsInstanceIndexMfs14,
  MfsInstanceIndexMfs15,
  MfsInstanceIndexMax
}
 Enumeration to define an index for each enabled MFS instance. More...
 

Functions

static stc_mfs_intern_data_t * MfsGetInternDataPtr (volatile stc_mfsn_t *pstcMfs)
 Return the internal data for a certain MFS instance. More...
 
en_result_t Mfs_InitTxIrq (volatile stc_mfsn_t *pstcMfs)
 Device dependent initialization of transmit interrupts according CMSIS with level defined in pdl.h. More...
 
en_result_t Mfs_InitRxIrq (volatile stc_mfsn_t *pstcMfs)
 Device dependent initialization of receive interrupts according CMSIS with level defined in pdl.h. More...
 
en_result_t Mfs_DeInitIrq (volatile stc_mfsn_t *pstcMfs)
 Device dependent de-initialization of interrupts according CMSIS. More...
 
void MfsIrqHandlerRx (volatile stc_mfsn_t *pstcMfs, stc_mfs_intern_data_t *pstcMfsInternData)
 MFS receive interrupt service routine. More...
 
void MfsIrqHandlerTx (volatile stc_mfsn_t *pstcMfs, stc_mfs_intern_data_t *pstcMfsInternData)
 MFS transmit interrupt service routine. More...
 
void MfsIrqHandlerStatus (volatile stc_mfsn_t *pstcMfs, stc_mfs_intern_data_t *pstcMfsInternData)
 MFS status interrupt service routine. More...
 
en_result_t Mfs_Uart_Init (volatile stc_mfsn_t *pstcUart, const stc_mfs_uart_config_t *pstcConfig)
 Initialisation of a MFS module to activate as UART. More...
 
en_result_t Mfs_Uart_DeInit (volatile stc_mfsn_t *pstcUart)
 Deinitialisation of a MFS module activating as UART. More...
 
en_result_t Mfs_Uart_SetBaudRate (volatile stc_mfsn_t *pstcUart, uint32_t u32BaudRate)
 Set baud rate for UART This Function sets baud rate for UART (MFS). More...
 
en_result_t Mfs_Csio_Init (volatile stc_mfsn_t *pstcCsio, const stc_mfs_csio_config_t *pstcConfig)
 Initialisation of a MFS module to activate as CSIO. More...
 
en_result_t Mfs_Csio_DeInit (volatile stc_mfsn_t *pstcCsio)
 Deinitialisation of a MFS module activating as CSIO. More...
 
en_result_t Mfs_Csio_SetSckOutEnable (volatile stc_mfsn_t *pstcCsio, boolean_t bEnable)
 Enable or disable serial clock output This Function sets or clears SCKE bit of SMR for CSIO (MFS). More...
 
uint32_t Mfs_Csio_ReadData32 (volatile stc_mfsn_t *pstcCsio)
 Read data from Received Data Register (RDR). The received data is read from Received Data Register (RDR) and return for CSIO. More...
 
en_result_t Mfs_Csio_WriteData32 (volatile stc_mfsn_t *pstcCsio, const uint32_t u32Data)
 Write data to Transmit Data Register (TDR). The data provided by Mfs_Csio_WriteData::u32Data is written into the Transmit Data Register (TDR) for CSIO. More...
 
en_result_t Mfs_Csio_SetChipSelectErrEnable (volatile stc_mfsn_t *pstcCsio, boolean_t bEnable)
 Enable or disable generating of chip select error. This Function sets or clears TBEEN bit of SACSR for CSIO (MFS). More...
 
en_result_t Mfs_Csio_SetChipSelectErrIntEnable (volatile stc_mfsn_t *pstcCsio, boolean_t bEnable)
 Enable or disable interrupt of chip select error. This Function sets or clears CSEIE bit of SACSR for CSIO (MFS). More...
 
uint16_t Mfs_Csio_GetStatus (volatile stc_mfsn_t *pstcCsio, uint16_t u16StatusMask)
 Get serial status register This Function gets specified bit status of SACSR for CSIO (MFS). More...
 
en_result_t Mfs_Csio_ClrChipSelectErr (volatile stc_mfsn_t *pstcCsio)
 Clear chip select error status This Function clears CSE bit status of SACSR for CSIO (MFS). More...
 
en_result_t Mfs_Csio_ClrTimerIntReq (volatile stc_mfsn_t *pstcCsio)
 Clear timer interrupt request This Function clears TINT bit status of SACSR for CSIO (MFS). More...
 
en_result_t Mfs_Csio_SetSerialTimerIntEnable (volatile stc_mfsn_t *pstcCsio, boolean_t bEnable)
 Enable or disable serial timer interrupt. This Function sets or clears TINTE bit of SACSR for CSIO (MFS). More...
 
en_result_t Mfs_Csio_SetSyncTransEnable (volatile stc_mfsn_t *pstcCsio, boolean_t bEnable)
 Enable or disable synchronous transfer with serial timer. This Function sets or clears TSYNE bit of SACSR for CSIO (MFS). More...
 
en_result_t Mfs_Csio_SetTimerPrescale (volatile stc_mfsn_t *pstcCsio, uint8_t u8Prescale)
 Set timer prescale. This Function sets TDIV bits of SACSR for CSIO (MFS). More...
 
en_result_t Mfs_Csio_SetSerialTimerEnable (volatile stc_mfsn_t *pstcCsio, boolean_t bEnable)
 Enable or disable serial timer. This Function sets or clears TMRE bit of SACSR for CSIO (MFS). More...
 
uint16_t Mfs_Csio_GetSerialTimer (volatile stc_mfsn_t *pstcCsio)
 Get value of serial timer. This Function returns the value of STMR for CSIO (MFS). More...
 
en_result_t Mfs_Csio_SetCmpVal4SerialTimer (volatile stc_mfsn_t *pstcCsio, uint16_t u16CompareValue)
 Set compare value for serial timer. This Function writes the compare value to STMCR for CSIO (MFS). More...
 
en_result_t Mfs_Csio_SetCsHold (volatile stc_mfsn_t *pstcCsio, boolean_t bHold)
 Set serial chip select into non-hold or hold. This Function clears or sets SCAM bit of SCSCR for CSIO (MFS). More...
 
en_result_t Mfs_Csio_SetCsTimingPrescale (volatile stc_mfsn_t *pstcCsio, uint8_t u8Prescale)
 Set prescale for chip select timing. This Function sets CDIV bits of SCSCR for CSIO (MFS). More...
 
en_result_t Mfs_Csio_SetCsInActiveLevel (volatile stc_mfsn_t *pstcCsio, boolean_t bLevel)
 Set level when chip select is in-active. This Function sets/clears CSLVL bit of SCSCR for CSIO (MFS). More...
 
en_result_t Mfs_Csio_SetChipSelectEnable (volatile stc_mfsn_t *pstcCsio, boolean_t bEnable)
 Enable or disable chip select. This Function sets or clears CSEN0 bit of SCSCR for CSIO (MFS). More...
 
en_result_t Mfs_Csio_SetChipSelectOutEnable (volatile stc_mfsn_t *pstcCsio, boolean_t bEnable)
 Enable or disable chip select output. This Function sets or clears CSOE bit of SCSCR for CSIO (MFS). More...
 
en_result_t Mfs_Csio_SetCsTimingConfig (volatile stc_mfsn_t *pstcCsio, stc_mfs_csio_cs_timing_t *pstcCsTimingCfg)
 Set configuration of chip select timings. This Function sets SCSTR10 and SCSTR32 for CSIO (MFS). More...
 
en_result_t Mfs_Csio_SetTxLength (volatile stc_mfsn_t *pstcCsio, uint8_t u8TxBytes)
 Set transfer length. This Function sets TBYTE0 for CSIO (MFS). More...
 
en_result_t Mfs_Csio_SetBaudRate (volatile stc_mfsn_t *pstcCsio, uint32_t u32BaudRate)
 Set baud rate This Function sets baud rate for CSIO (MFS). More...
 
en_result_t Mfs_I2c_Init (volatile stc_mfsn_t *pstcI2c, const stc_mfs_i2c_config_t *pstcConfig)
 Initialisation of a MFS module to activate as I2C. More...
 
en_result_t Mfs_I2c_DeInit (volatile stc_mfsn_t *pstcI2c)
 Deinitialisation of a MFS module activating as I2C. More...
 
en_result_t Mfs_I2c_SetTxIntEnable (volatile stc_mfsn_t *pstcI2c, boolean_t bEnable)
 Enable or disable I2C TX interrupt The Function sets or clears TIE bit of SMR for I2C. More...
 
en_result_t Mfs_I2c_SetRxIntEnable (volatile stc_mfsn_t *pstcI2c, boolean_t bEnable)
 Enable or disable I2C RX interrupt The Function sets or clears RIE bit of SMR for I2C. More...
 
en_result_t Mfs_I2c_SetAckEnable (volatile stc_mfsn_t *pstcI2c, boolean_t bEnable)
 Enable or disable ACK for I2C The Function sets or clears ACKE bit of IBCR for I2C. More...
 
en_result_t Mfs_I2c_SetWaitSelect (volatile stc_mfsn_t *pstcI2c, uint8_t u8WaitSelect)
 Set wait selection for I2C The Function sets or clears WSEL bit of IBCR for I2C. More...
 
en_result_t Mfs_I2c_SetCondDetIntEnable (volatile stc_mfsn_t *pstcI2c, boolean_t bEnable)
 Enable or disable condition detection interrupt for I2C The Function sets or clears CNDE bit of IBCR for I2C. More...
 
en_result_t Mfs_I2c_SetIntEnable (volatile stc_mfsn_t *pstcI2c, boolean_t bEnable)
 Enable or disable interrupt for I2C The Function sets or clears INTE bit of IBCR for I2C. More...
 
boolean_t Mfs_I2c_GetBusErrStatus (volatile stc_mfsn_t *pstcI2c)
 Get bus error status for I2C The Function can return the bus error status (IBCR.BER) of I2C. More...
 
boolean_t Mfs_I2c_GetIntStatus (volatile stc_mfsn_t *pstcI2c)
 Get interrupt status for I2C The Function can return the interrupt status (IBCR.INT) of I2C. More...
 
en_result_t Mfs_I2c_ClearIntStatus (volatile stc_mfsn_t *pstcI2c)
 Clear interrupt status for I2C The Function clears the interrupt status (IBCR.INT) of I2C. More...
 
en_result_t Mfs_I2c_SetTransmitEmpty (volatile stc_mfsn_t *pstcI2c)
 Set transmit empty flag for I2C The Function sets the TSET bit of SSR of I2C. This sets the TDRE bit of SSR. If DMA mode is enabled, TBI bit of SSR is set. More...
 
en_result_t Mfs_I2c_SetDmaModeEnable (volatile stc_mfsn_t *pstcI2c, boolean_t bEnable)
 Enable or disable DMA mode for I2C The Function sets or clears DMA bit of SSR for I2C. More...
 
en_result_t Mfs_I2c_SetNoizeFilter (volatile stc_mfsn_t *pstcI2c, uint8_t u8NzFilter)
 Set noize filter for I2C The Function sets NFCR for I2C. More...
 
en_result_t Mfs_I2c_SetSdaOutLevel (volatile stc_mfsn_t *pstcI2c, boolean_t bLevel)
 Set SDA output level after passing noize filter for I2C The Function sets or clears SDAC bit of EIBCR for I2C. More...
 
en_result_t Mfs_I2c_SetSclOutLevel (volatile stc_mfsn_t *pstcI2c, boolean_t bLevel)
 Set SCL output level after passing noize filter for I2C The Function sets or clears SCLC bit of EIBCR for I2C. More...
 
en_result_t Mfs_I2c_SetSerlalOutEnable (volatile stc_mfsn_t *pstcI2c, boolean_t bEnable)
 Enable or disable serial output for I2C The Function sets or clears SOCE bit of EIBCR for I2C. More...
 
en_result_t Mfs_I2c_SetBusErrorControlEnable (volatile stc_mfsn_t *pstcI2c, boolean_t bEnable)
 Enable or disable I2C continue after occurring bus error for I2C The Function sets or clears BEC bit of EIBCR for I2C. More...
 
en_result_t Mfs_I2c_SetI2cEnable (volatile stc_mfsn_t *pstcI2c, boolean_t bEnable, uint8_t u8AddrMask)
 Enable or disable I2C interface and set slave address mask for I2C The Function sets or clears EN bit and SM bits of ISMK for I2C. More...
 
en_result_t Mfs_I2c_SetSlvAddrEnable (volatile stc_mfsn_t *pstcI2c, boolean_t bEnable, uint8_t u8SlvAdr)
 Enable or disable slave address for I2C The Function sets or clears SAEN bit and SA bits of ISBA for I2C. More...
 
en_result_t Mfs_I2c_SetBaudRate (volatile stc_mfsn_t *pstcI2c, uint32_t u32BaudRate)
 Set baud rate This Function sets baud rate for I2C (MFS). More...
 
en_result_t Mfs_Lin_Init (volatile stc_mfsn_t *pstcLin, const stc_mfs_lin_config_t *pstcConfig)
 Initialisation of a MFS module to activate as LIN. More...
 
en_result_t Mfs_Lin_DeInit (volatile stc_mfsn_t *pstcLin)
 Deinitialisation of a MFS module activating as LIN. More...
 
en_result_t Mfs_Lin_SetBreak (volatile stc_mfsn_t *pstcLin)
 Set LIN break field This Function sets LBR bit of SCR for LIN. More...
 
en_result_t Mfs_Lin_ClearBreakDetFlag (volatile stc_mfsn_t *pstcLin)
 Clear LIN break detection flag. More...
 
en_result_t Mfs_Lin_SetBreakDetIntEnable (volatile stc_mfsn_t *pstcLin, boolean_t bEnable)
 Enable or disable LIN Break field detection interrupt for LIN The Function sets or clears LBIE bit of ESCR for LIN. More...
 
en_result_t Mfs_Lin_SetBreakConfig (volatile stc_mfsn_t *pstcLin, uint8_t u8BreakLen, uint8_t u8DelimiterLen)
 Set LIN break field length and break delimiter length The Function sets LBL bits and DEL bits of ESCR for LIN. More...
 
en_result_t Mfs_Lin_SetBaudRate (volatile stc_mfsn_t *pstcLin, uint32_t u32BaudRate)
 Set baud rate This Function sets baud rate for LIN (MFS). More...
 
en_result_t Mfs_SetSerialOutputEnable (volatile stc_mfsn_t *pstcMfs, boolean_t bEnable)
 Enable or disable serial output This Function sets or clears SOE bit of SMR for MFS (UART/CSIO/LIN). More...
 
en_result_t Mfs_SetWakeUpControlEnable (volatile stc_mfsn_t *pstcMfs, boolean_t bEnable)
 Enable or disable wake up function This Function sets or clears WUCR bit of SMR for MFS (UART/LIN). More...
 
en_result_t Mfs_SoftwareReset (volatile stc_mfsn_t *pstcMfs)
 Software Reset This Function initializes the MFS (UART/CSIO/LIN) internal state. More...
 
en_result_t Mfs_SetRxIntEnable (volatile stc_mfsn_t *pstcMfs, boolean_t bEnable)
 Enable or disable RX interrupt This Function sets or clears RIE bit of SCR for MFS (UART/CSIO/LIN). More...
 
en_result_t Mfs_SetTxIntEnable (volatile stc_mfsn_t *pstcMfs, boolean_t bEnable)
 Enable or disable TX interrupt The Function sets or clears TIE bit of SCR for MFS (UART/CSIO/LIN). More...
 
en_result_t Mfs_SetTxBusIdleIntEnable (volatile stc_mfsn_t *pstcMfs, boolean_t bEnable)
 Enable or disable TX bus idle interrupt The Function sets or clears TBIE bit of SCR for MFS (UART/CSIO/LIN). More...
 
en_result_t Mfs_SetTxFifoIntEnable (volatile stc_mfsn_t *pstcMfs, boolean_t bEnable)
 Enable or disable TX FIFO interrupt The Function sets or clears FTIE bit of FCR1 for MFS (UART/CSIO/LIN). More...
 
en_result_t Mfs_SetRxEnable (volatile stc_mfsn_t *pstcMfs, boolean_t bEnable)
 Enable or disable RX This Function sets or clears RXE bit of SCR for MFS (UART/CSIO/LIN). More...
 
en_result_t Mfs_SetTxEnable (volatile stc_mfsn_t *pstcMfs, boolean_t bEnable)
 Enable or disable TX This Function sets or clears TXE bit of SCR for MFS (UART/CSIO/LIN). More...
 
uint8_t Mfs_GetStatus (volatile stc_mfsn_t *pstcMfs, uint8_t u8StatusMask)
 Get status The Function can return the status (SSR) for MFS (UART/CSIO/LIN/I2C) More...
 
en_result_t Mfs_ErrorClear (volatile stc_mfsn_t *pstcMfs)
 Clear error flag. The Function can clear the error flags for MFS (UART/CSIO/LIN/I2C) More...
 
uint16_t Mfs_ReadData (volatile stc_mfsn_t *pstcMfs)
 Read data from Received Data Register (RDR). The received data is read from Received Data Register (RDR) and return for MFS (UART/CSIO/LIN/I2C). More...
 
en_result_t Mfs_WriteData (volatile stc_mfsn_t *pstcMfs, const uint16_t u16Data)
 Write data to Transmit Data Register (TDR). The data provided by Mfs_WriteData::u16Data is written into the Transmit Data Register (TDR) for MFS (UART/CSIO/LIN/I2C). More...
 
en_result_t Mfs_ConfigFifo (volatile stc_mfsn_t *pstcMfs, stc_mfs_fifo_config_t *pstcFifoConfig)
 Configure FIFO This Function configures the dedicated FIFO for MFS. More...
 
boolean_t Mfs_GetTxFifoReqStatus (volatile stc_mfsn_t *pstcMfs)
 Get TX FIFO request status for MFS The Function can return the TX FIFO request status (FCR1.FDRQ) of MFS. More...
 
en_result_t Mfs_ClrTxFifoReqStatus (volatile stc_mfsn_t *pstcMfs)
 Clear TX FIFO request status for MFS The Function clears the TX FIFO request status (FCR1.FDRQ) of MFS. More...
 
en_result_t Mfs_ResetFifo (volatile stc_mfsn_t *pstcMfs, uint8_t u8FifoNumber)
 Reset FIFO funtion This Function resets dedicated FIFO of MFS. More...
 
en_result_t Mfs_SetFifoEnable (volatile stc_mfsn_t *pstcMfs, uint8_t u8FifoNumber, boolean_t bEnable)
 Enable or disable FIFO funtion This Function sets or clears FE1/FE2 bit of MFS. More...
 
uint8_t Mfs_GetFifoBytes (volatile stc_mfsn_t *pstcMfs, uint8_t u8FifoNumber)
 Get effective data count in the FIFO buffer This Function gets the FBYTE of the dedicated FIFO. More...
 
uint32_t Mfs_GetBusClock (void)
 Get APB2 Bus clock frequency This function return the clock value of APB2. More...
 
uint32_t Mfs_GetReloadValue (uint32_t u32BaudRate)
 Get reload value This function return the reload value to calucurate baud rate. More...
 
uint32_t Mfs_I2c_GetReloadValue (uint32_t u32BaudRate)
 Get reload value for I2C interface This function return the reload value to calucurate baud rate. More...
 
en_result_t Mfs_SetSMR (volatile stc_mfsn_t *pstcMfs, uint8_t u8SMR)
 Set value to Serial Mode Register This Function sets value to SMR. More...
 
uint8_t Mfs_GetSMR (volatile stc_mfsn_t *pstcMfs)
 Get value from Serial Mode Register This Function returns value of SMR. More...
 
en_result_t Mfs_SetSCR (volatile stc_mfsn_t *pstcMfs, uint8_t u8SCR)
 Set value to Serial Control Register This Function sets value to SCR. More...
 
uint8_t Mfs_GetSCR (volatile stc_mfsn_t *pstcMfs)
 Get value from Serial Control Register This Function returns value of SCR. More...
 
en_result_t Mfs_SetESCR (volatile stc_mfsn_t *pstcMfs, uint8_t u8ESCR)
 Set value to Extended Serial Control Register This Function sets value to ESCR. More...
 
uint8_t Mfs_GetESCR (volatile stc_mfsn_t *pstcMfs)
 Get value from Extended Serial Control Register This Function returns value of ESCR. More...
 
en_result_t Mfs_SetBGR (volatile stc_mfsn_t *pstcMfs, uint16_t u16BGR)
 Set value to Baud rate Generator Register This Function sets value to BGR. More...
 
uint16_t Mfs_GetBGR (volatile stc_mfsn_t *pstcMfs)
 Get value from Baud rate Generator Register This Function returns value of BGR. More...
 
en_result_t Mfs_SetFCR1 (volatile stc_mfsn_t *pstcMfs, uint8_t u8FCR1)
 Set value to Fifo Control Register 1 This Function sets value to FCR1. More...
 
uint8_t Mfs_GetFCR1 (volatile stc_mfsn_t *pstcMfs)
 Get value from FIFO Control Register 1 This Function returns value of FCR1. More...
 
en_result_t Mfs_SetFCR0 (volatile stc_mfsn_t *pstcMfs, uint8_t u8FCR0)
 Set value to Fifo Control Register 0 This Function can set value to FCR0. More...
 
uint8_t Mfs_GetFCR0 (volatile stc_mfsn_t *pstcMfs)
 Get value from FIFO Control Register 0 This Function returns value of FCR0. More...
 
en_result_t Mfs_SetSCSTR10 (volatile stc_mfsn_t *pstcMfs, uint16_t u16SCSTR10)
 Set value to Serial Chip Select Timing Register 1-0 This Function can set value to SCSTR10. More...
 
uint16_t Mfs_GetSCSTR10 (volatile stc_mfsn_t *pstcMfs)
 Get value from Serial Chip Select Timing Register 1-0 This Function returns value of SCSTR10. More...
 
en_result_t Mfs_SetSCSTR32 (volatile stc_mfsn_t *pstcMfs, uint16_t u16SCSTR32)
 Set value to Serial Chip Select Timing Register 3-2 This Function can set value to SCSTR32. More...
 
uint16_t Mfs_GetSCSTR32 (volatile stc_mfsn_t *pstcMfs)
 Get value from Serial Chip Select Timing Register 1-0 This Function returns value of SCSTR32. More...
 
en_result_t Mfs_SetSACSR (volatile stc_mfsn_t *pstcMfs, uint16_t u16SACSR)
 Set value to Serial Assistant Status Control Register This Function can set value to SACSR. More...
 
uint16_t Mfs_GetSACSR (volatile stc_mfsn_t *pstcMfs)
 Get value from Serial Assistant Status Control Register This Function can get value from SACSR. More...
 
uint16_t Mfs_GetSTMCR (volatile stc_mfsn_t *pstcMfs)
 Get value from Serial Timer Compare Register This Function can get value from STMCR. More...
 
en_result_t Mfs_SetSCSCR (volatile stc_mfsn_t *pstcMfs, uint16_t u16SCSCR)
 Set value to Serial Chip Select Control Register This Function can set value to SCSCR. More...
 
uint16_t Mfs_GetSCSCR (volatile stc_mfsn_t *pstcMfs)
 Get value from Serial Chip Select Control Register This Function can get value from SCSCR. More...
 
en_result_t Mfs_SetTBYTE0 (volatile stc_mfsn_t *pstcMfs, uint8_t u8TBYTE0)
 Set value to Transmission Byte 0 This Function can set value to TBYTE0. More...
 
uint8_t Mfs_GetTBYTE0 (volatile stc_mfsn_t *pstcMfs)
 Get value from Transmission Byte 0 This Function can get value from TBYTE0. More...
 
en_result_t Mfs_SetISBA (volatile stc_mfsn_t *pstcMfs, uint8_t u8ISBA)
 Set value to 7-bit Slave Address Register This Function can set value to ISBA. More...
 
uint8_t Mfs_GetISBA (volatile stc_mfsn_t *pstcMfs)
 Get value from 7-bit Slave Address Register This Function can get value from ISBA. More...
 
en_result_t Mfs_SetISMK (volatile stc_mfsn_t *pstcMfs, uint8_t u8ISMK)
 Set value to 7-bit Slave Address Mask Register This Function can set value to ISMK. More...
 
uint8_t Mfs_GetISMK (volatile stc_mfsn_t *pstcMfs)
 Get value from 7-bit Slave Address Mask Register This Function can get value from ISMK. More...
 
uint8_t Mfs_GetNFCR (volatile stc_mfsn_t *pstcMfs)
 Get value from Noize Filter Control Register This Function can get value from NFCR. More...
 
en_result_t Mfs_SetEIBCR (volatile stc_mfsn_t *pstcMfs, uint8_t u8EIBCR)
 Set value to Extended I2C Bus Control Register This Function can set value to EIBCR. More...
 
uint8_t Mfs_GetEIBCR (volatile stc_mfsn_t *pstcMfs)
 Get value from Extended I2C Bus Control Register This Function can get value from EIBCR. More...
 
en_result_t Mfs_SetTxIntCallBack (volatile stc_mfsn_t *pstcMfs, mfs_tx_cb_func_ptr_t pfnTxCbFunc)
 Set TX ISR callback funtion. More...
 
en_result_t Mfs_SetRxIntCallBack (volatile stc_mfsn_t *pstcMfs, mfs_rx_cb_func_ptr_t pfnRxCbFunc)
 Set RX ISR callback funtion. More...
 
en_result_t Mfs_SetStsIntCallBack (volatile stc_mfsn_t *pstcMfs, mfs_sts_cb_func_ptr_t pfnStsCbFunc)
 Set Status ISR callback funtion. More...
 
en_result_t Mfs_SetUpperLayerHandle (volatile stc_mfsn_t *pstcMfs, void *pvHandle)
 Set handle for upper layer. More...
 

Variables

stc_mfs_instance_data_t m_astcMfsInstanceDataLut [MfsInstanceIndexMax]
 Look-up table for all enabled MFS instances and their internal data. More...
 
stc_mfs_instance_data_t m_astcMfsInstanceDataLut [MfsInstanceIndexMax]
 Look-up table for all enabled MFS instances and their internal data. More...
 

Detailed Description

Provided functions of MFS module:

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

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

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. So this function is used after initialization by Mfs_Lin_Init().

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_SetRxIntCallBack(), Mfs_SetTxIntCallBack() and Mfs_SetStsIntCallBack() are register callback function when interrupt is occurrd.

Mfs_SetUpperLayerHandle() is register pointer of internal data for upper layer. (High level driver etc.)

Other functions is used for reading or writing register, etc. If application use this module, it has to use these APIs by combining.

Macro Definition Documentation

#define MFS0   (*((volatile stc_mfsn_t *) FM4_MFS0_BASE))

Definition at line 567 of file mfs.h.

Referenced by Mfs_DeInitIrq(), Mfs_InitRxIrq(), and Mfs_InitTxIrq().

#define MFS0_CS   MfsHasNoCs

Definition at line 757 of file mfs.h.

#define MFS0_FIFO   MfsHasFifo

Definition at line 739 of file mfs.h.

#define MFS1   (*((volatile stc_mfsn_t *) FM4_MFS1_BASE))

Definition at line 568 of file mfs.h.

Referenced by Mfs_DeInitIrq(), Mfs_InitRxIrq(), and Mfs_InitTxIrq().

#define MFS10   (*((volatile stc_mfsn_t *) FM4_MFS10_BASE))

Definition at line 577 of file mfs.h.

Referenced by Mfs_DeInitIrq(), Mfs_InitRxIrq(), and Mfs_InitTxIrq().

#define MFS10_CS   MfsHasNoCs

Definition at line 767 of file mfs.h.

#define MFS10_FIFO   MfsHasFifo

Definition at line 749 of file mfs.h.

#define MFS11   (*((volatile stc_mfsn_t *) FM4_MFS11_BASE))

Definition at line 578 of file mfs.h.

Referenced by Mfs_DeInitIrq(), Mfs_InitRxIrq(), and Mfs_InitTxIrq().

#define MFS11_CS   MfsHasNoCs

Definition at line 768 of file mfs.h.

#define MFS11_FIFO   MfsHasFifo

Definition at line 750 of file mfs.h.

#define MFS12   (*((volatile stc_mfsn_t *) FM4_MFS12_BASE))

Definition at line 579 of file mfs.h.

Referenced by Mfs_DeInitIrq(), Mfs_InitRxIrq(), and Mfs_InitTxIrq().

#define MFS12_CS   MfsHasNoCs

Definition at line 769 of file mfs.h.

#define MFS12_FIFO   MfsHasFifo

Definition at line 751 of file mfs.h.

#define MFS13   (*((volatile stc_mfsn_t *) FM4_MFS13_BASE))

Definition at line 580 of file mfs.h.

Referenced by Mfs_DeInitIrq(), Mfs_InitRxIrq(), and Mfs_InitTxIrq().

#define MFS13_CS   MfsHasNoCs

Definition at line 770 of file mfs.h.

#define MFS13_FIFO   MfsHasFifo

Definition at line 752 of file mfs.h.

#define MFS14   (*((volatile stc_mfsn_t *) FM4_MFS14_BASE))

Definition at line 581 of file mfs.h.

Referenced by Mfs_DeInitIrq(), Mfs_InitRxIrq(), and Mfs_InitTxIrq().

#define MFS14_CS   MfsHasNoCs

Definition at line 771 of file mfs.h.

#define MFS14_FIFO   MfsHasFifo

Definition at line 753 of file mfs.h.

#define MFS15   (*((volatile stc_mfsn_t *) FM4_MFS15_BASE))

Definition at line 582 of file mfs.h.

Referenced by Mfs_DeInitIrq(), Mfs_InitRxIrq(), and Mfs_InitTxIrq().

#define MFS15_CS   MfsHasNoCs

Definition at line 772 of file mfs.h.

#define MFS15_FIFO   MfsHasFifo

Definition at line 754 of file mfs.h.

#define MFS1_CS   MfsHasNoCs

Definition at line 758 of file mfs.h.

#define MFS1_FIFO   MfsHasFifo

Definition at line 740 of file mfs.h.

#define MFS2   (*((volatile stc_mfsn_t *) FM4_MFS2_BASE))

Definition at line 569 of file mfs.h.

Referenced by Mfs_DeInitIrq(), Mfs_InitRxIrq(), and Mfs_InitTxIrq().

#define MFS2_CS   MfsHasNoCs

Definition at line 759 of file mfs.h.

#define MFS2_FIFO   MfsHasFifo

Definition at line 741 of file mfs.h.

#define MFS3   (*((volatile stc_mfsn_t *) FM4_MFS3_BASE))

Definition at line 570 of file mfs.h.

Referenced by Mfs_DeInitIrq(), Mfs_InitRxIrq(), and Mfs_InitTxIrq().

#define MFS3_CS   MfsHasNoCs

Definition at line 760 of file mfs.h.

#define MFS3_FIFO   MfsHasFifo

Definition at line 742 of file mfs.h.

#define MFS4   (*((volatile stc_mfsn_t *) FM4_MFS4_BASE))

Definition at line 571 of file mfs.h.

Referenced by Mfs_DeInitIrq(), Mfs_InitRxIrq(), and Mfs_InitTxIrq().

#define MFS4_CS   MfsHasNoCs

Definition at line 761 of file mfs.h.

#define MFS4_FIFO   MfsHasFifo

Definition at line 743 of file mfs.h.

#define MFS5   (*((volatile stc_mfsn_t *) FM4_MFS5_BASE))

Definition at line 572 of file mfs.h.

Referenced by Mfs_DeInitIrq(), Mfs_InitRxIrq(), and Mfs_InitTxIrq().

#define MFS5_CS   MfsHasNoCs

Definition at line 762 of file mfs.h.

#define MFS5_FIFO   MfsHasFifo

Definition at line 744 of file mfs.h.

#define MFS6   (*((volatile stc_mfsn_t *) FM4_MFS6_BASE))

Definition at line 573 of file mfs.h.

Referenced by Mfs_DeInitIrq(), Mfs_Hl_Csio_Init(), Mfs_InitRxIrq(), and Mfs_InitTxIrq().

#define MFS6_CS   MfsHasCs

Definition at line 763 of file mfs.h.

#define MFS6_FIFO   MfsHasFifo

Definition at line 745 of file mfs.h.

#define MFS7   (*((volatile stc_mfsn_t *) FM4_MFS7_BASE))

Definition at line 574 of file mfs.h.

Referenced by Mfs_DeInitIrq(), Mfs_Hl_Csio_Init(), Mfs_InitRxIrq(), and Mfs_InitTxIrq().

#define MFS7_CS   MfsHasCs

Definition at line 764 of file mfs.h.

#define MFS7_FIFO   MfsHasFifo

Definition at line 746 of file mfs.h.

#define MFS8   (*((volatile stc_mfsn_t *) FM4_MFS8_BASE))

Definition at line 575 of file mfs.h.

Referenced by Mfs_DeInitIrq(), Mfs_InitRxIrq(), and Mfs_InitTxIrq().

#define MFS8_CS   MfsHasNoCs

Definition at line 765 of file mfs.h.

#define MFS8_FIFO   MfsHasFifo

Definition at line 747 of file mfs.h.

#define MFS9   (*((volatile stc_mfsn_t *) FM4_MFS9_BASE))

Definition at line 576 of file mfs.h.

Referenced by Mfs_DeInitIrq(), Mfs_InitRxIrq(), and Mfs_InitTxIrq().

#define MFS9_CS   MfsHasNoCs

Definition at line 766 of file mfs.h.

#define MFS9_FIFO   MfsHasFifo

Definition at line 748 of file mfs.h.

#define MFS_BASE_CLK_DIV1   (0x00u)

Definition at line 76 of file mfs.c.

Referenced by Mfs_GetBusClock().

#define MFS_BASE_CLK_DIV16   (0x06u)

Definition at line 82 of file mfs.c.

Referenced by Mfs_GetBusClock().

#define MFS_BASE_CLK_DIV2   (0x01u)

Definition at line 77 of file mfs.c.

Referenced by Mfs_GetBusClock().

#define MFS_BASE_CLK_DIV3   (0x02u)

Definition at line 78 of file mfs.c.

Referenced by Mfs_GetBusClock().

#define MFS_BASE_CLK_DIV4   (0x03u)

Definition at line 79 of file mfs.c.

Referenced by Mfs_GetBusClock().

#define MFS_BASE_CLK_DIV6   (0x04u)

Definition at line 80 of file mfs.c.

Referenced by Mfs_GetBusClock().

#define MFS_BASE_CLK_DIV8   (0x05u)

Definition at line 81 of file mfs.c.

Referenced by Mfs_GetBusClock().

#define MFS_BGR_MASK   (0x7FFFu)

Definition at line 96 of file mfs.c.

Referenced by Mfs_Csio_SetBaudRate(), Mfs_I2c_SetBaudRate(), and Mfs_Uart_SetBaudRate().

#define MFS_CLOCK_100M   (100000000u)

Definition at line 721 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init().

#define MFS_CLOCK_120M   (120000000u)

Definition at line 722 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init().

#define MFS_CLOCK_140M   (140000000u)

Definition at line 723 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init().

#define MFS_CLOCK_160M   (160000000u)

Definition at line 724 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init().

#define MFS_CLOCK_180M   (180000000u)

Definition at line 725 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init().

#define MFS_CLOCK_200M   (200000000u)

Definition at line 726 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init().

#define MFS_CLOCK_220M   (220000000u)

Definition at line 727 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init().

#define MFS_CLOCK_240M   (240000000u)

Definition at line 728 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init().

#define MFS_CLOCK_260M   (260000000u)

Definition at line 729 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init().

#define MFS_CLOCK_280M   (280000000u)

Definition at line 730 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init().

#define MFS_CLOCK_300M   (300000000u)

Definition at line 731 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init().

#define MFS_CLOCK_320M   (320000000u)

Definition at line 732 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init().

#define MFS_CLOCK_340M   (340000000u)

Definition at line 733 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init().

#define MFS_CLOCK_360M   (360000000u)

Definition at line 734 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init().

#define MFS_CLOCK_380M   (380000000u)

Definition at line 735 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init().

#define MFS_CLOCK_400M   (400000000u)

Definition at line 736 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init().

#define MFS_CLOCK_40M   (40000000u)

Definition at line 718 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init().

#define MFS_CLOCK_60M   (60000000u)

Definition at line 719 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init().

#define MFS_CLOCK_80M   (80000000u)

Definition at line 720 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init().

#define MFS_CSIO_SSR_ERR   (0x08u)

Definition at line 671 of file mfs.h.

Referenced by Mfs_Hl_Csio_SynchronousTrans(), Mfs_Hl_Read(), and MfsHlIrqHandlerRx().

#define MFS_CSIO_SSR_ORE   (0x08u)

Definition at line 670 of file mfs.h.

#define MFS_CSIO_SSR_RDRF   (0x04u)

Definition at line 669 of file mfs.h.

#define MFS_CSIO_SSR_TBI   (0x01u)

Definition at line 667 of file mfs.h.

#define MFS_CSIO_SSR_TDRE   (0x02u)

Definition at line 668 of file mfs.h.

#define MFS_CSIO_TBYTE_MAX   (0xffu)

Definition at line 715 of file mfs.h.

Referenced by Mfs_Hl_Csio_SynchronousTrans(), and Mfs_Hl_Write().

#define MFS_DATA_LEN_10   (0x05)

Definition at line 623 of file mfs.h.

Referenced by Mfs_Csio_Init(), and Mfs_Hl_Csio_Init().

#define MFS_DATA_LEN_11   (0x06)

Definition at line 624 of file mfs.h.

Referenced by Mfs_Csio_Init(), and Mfs_Hl_Csio_Init().

#define MFS_DATA_LEN_12   (0x07)

Definition at line 625 of file mfs.h.

Referenced by Mfs_Csio_Init(), and Mfs_Hl_Csio_Init().

#define MFS_DATA_LEN_13   (0x00)

Definition at line 626 of file mfs.h.

Referenced by Mfs_Csio_Init(), and Mfs_Hl_Csio_Init().

#define MFS_DATA_LEN_14   (0x01)

Definition at line 627 of file mfs.h.

Referenced by Mfs_Csio_Init(), and Mfs_Hl_Csio_Init().

#define MFS_DATA_LEN_15   (0x02)

Definition at line 628 of file mfs.h.

Referenced by Mfs_Csio_Init(), and Mfs_Hl_Csio_Init().

#define MFS_DATA_LEN_16   (0x03)

Definition at line 629 of file mfs.h.

Referenced by Mfs_Csio_Init(), and Mfs_Hl_Csio_Init().

#define MFS_DATA_LEN_20   (0x04)

Definition at line 630 of file mfs.h.

Referenced by Mfs_Csio_Init(), and Mfs_Hl_Csio_Init().

#define MFS_DATA_LEN_24   (0x05)

Definition at line 631 of file mfs.h.

Referenced by Mfs_Csio_Init(), and Mfs_Hl_Csio_Init().

#define MFS_DATA_LEN_32   (0x06)

Definition at line 632 of file mfs.h.

Referenced by Mfs_Csio_Init(), and Mfs_Hl_Csio_Init().

#define MFS_DATA_LEN_5   (0x01)

Definition at line 616 of file mfs.h.

Referenced by Mfs_Csio_Init(), Mfs_Hl_Csio_Init(), Mfs_Hl_Uart_Init(), and Mfs_Uart_Init().

#define MFS_DATA_LEN_6   (0x02)

Definition at line 617 of file mfs.h.

Referenced by Mfs_Csio_Init(), Mfs_Hl_Csio_Init(), Mfs_Hl_Uart_Init(), and Mfs_Uart_Init().

#define MFS_DATA_LEN_7   (0x03)

Definition at line 618 of file mfs.h.

Referenced by Mfs_Csio_Init(), Mfs_Hl_Csio_Init(), Mfs_Hl_Uart_Init(), and Mfs_Uart_Init().

#define MFS_DATA_LEN_8   (0x00)

Definition at line 619 of file mfs.h.

Referenced by Mfs_Csio_Init(), Mfs_Hl_Csio_Init(), Mfs_Hl_Uart_Init(), and Mfs_Uart_Init().

#define MFS_DATA_LEN_9   (0x04)

Definition at line 620 of file mfs.h.

Referenced by Mfs_Csio_Init(), Mfs_Hl_Csio_Init(), Mfs_Hl_Uart_Init(), and Mfs_Uart_Init().

#define MFS_EIBCR_WRT_MASK   (0x0Fu) /* BEC, SOCE, SCLC, SDAC */

EIBCR bits mask.

Definition at line 788 of file mfs.h.

Referenced by Mfs_SetEIBCR().

#define MFS_FIFO_MAX_VAL   (16u)
#define MFS_FIFO_MIN_VAL   (0u)

Fifo related settings These values represent the minimum and maximum values of the hardware Fifo level settings. (Interrupt) Trigger levels should be set to a level that will allow at least 1 remaining byte to be transmitted or received also if the interrupt is pending. Using half of the FiFo size is always a good choice to get balanced load and continuous data flow.

Definition at line 604 of file mfs.h.

#define Mfs_GetFBYTE1 (   pstcMfs)    Mfs_GetFifoBytes(pstcMfs, MfsFifo1)

Definition at line 1184 of file mfs.h.

#define Mfs_GetFBYTE2 (   pstcMfs)    Mfs_GetFifoBytes(pstcMfs, MfsFifo2)

Definition at line 1185 of file mfs.h.

#define Mfs_GetIBCR   Mfs_GetSCR

Definition at line 1155 of file mfs.h.

#define Mfs_GetIBSR   Mfs_GetESCR

Definition at line 1162 of file mfs.h.

#define Mfs_GetRDR   Mfs_ReadData

Definition at line 1166 of file mfs.h.

#define Mfs_GetSSR (   pstcMfs)    Mfs_GetStatus(pstcMfs, 0xFF)

Definition at line 1164 of file mfs.h.

#define Mfs_GetSTMR   Mfs_Csio_GetSerialTimer

Definition at line 1204 of file mfs.h.

#define MFS_I2C_FAST_MODE_PLUS_CH_A   (&MFS3)

Definition at line 585 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init(), and Mfs_I2c_Init().

#define MFS_I2C_FAST_MODE_PLUS_CH_B   (&MFS7)

Definition at line 586 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init(), and Mfs_I2c_Init().

#define MFS_I2C_SSR_ERR   (0x08u)

Definition at line 678 of file mfs.h.

#define MFS_I2C_SSR_ORE   (0x08u)

Definition at line 677 of file mfs.h.

#define MFS_I2C_SSR_RDRF   (0x04u)

Definition at line 676 of file mfs.h.

#define MFS_I2C_SSR_TBI   (0x01u)

Definition at line 674 of file mfs.h.

#define MFS_I2C_SSR_TDRE   (0x02u)

Definition at line 675 of file mfs.h.

#define MFS_ISBA_ADDR_ENABLE   (0x80u) /* SAEN */

ISBA bits mask.

Definition at line 784 of file mfs.h.

#define MFS_ISBA_SLV_ADDR   (0x7Fu) /* SA0 - SA6 */

Definition at line 785 of file mfs.h.

Referenced by Mfs_I2c_SetSlvAddrEnable().

#define MFS_ISMK_I2C_ENABLE   (0x80u) /* EN */

ISMK bits mask.

Definition at line 780 of file mfs.h.

#define MFS_ISMK_SLV_ADDR_MASK   (0x7Fu) /* SM0 - SM6 */

Definition at line 781 of file mfs.h.

Referenced by Mfs_I2c_Init(), and Mfs_I2c_SetI2cEnable().

#define MFS_LIN_BREAK_13BITS   (0x00)

Definition at line 641 of file mfs.h.

Referenced by Mfs_Hl_Lin_Init(), Mfs_Lin_Init(), and Mfs_Lin_SetBreakConfig().

#define MFS_LIN_BREAK_14BITS   (0x01)

Definition at line 642 of file mfs.h.

Referenced by Mfs_Hl_Lin_Init(), Mfs_Lin_Init(), and Mfs_Lin_SetBreakConfig().

#define MFS_LIN_BREAK_15BITS   (0x02)

Definition at line 643 of file mfs.h.

Referenced by Mfs_Hl_Lin_Init(), Mfs_Lin_Init(), and Mfs_Lin_SetBreakConfig().

#define MFS_LIN_BREAK_16BITS   (0x03)

Definition at line 644 of file mfs.h.

Referenced by Mfs_Hl_Lin_Init(), Mfs_Lin_Init(), and Mfs_Lin_SetBreakConfig().

#define MFS_LIN_DELIMITER_1BIT   (0x00)

Definition at line 647 of file mfs.h.

Referenced by Mfs_Hl_Lin_Init(), Mfs_Lin_Init(), and Mfs_Lin_SetBreakConfig().

#define MFS_LIN_DELIMITER_2BITS   (0x01)

Definition at line 648 of file mfs.h.

Referenced by Mfs_Hl_Lin_Init(), Mfs_Lin_Init(), and Mfs_Lin_SetBreakConfig().

#define MFS_LIN_DELIMITER_3BITS   (0x02)

Definition at line 649 of file mfs.h.

Referenced by Mfs_Hl_Lin_Init(), Mfs_Lin_Init(), and Mfs_Lin_SetBreakConfig().

#define MFS_LIN_DELIMITER_4BITS   (0x03)

Definition at line 650 of file mfs.h.

Referenced by Mfs_Hl_Lin_Init(), Mfs_Lin_Init(), and Mfs_Lin_SetBreakConfig().

#define MFS_LIN_SSR_ERR   (0x18u)

Definition at line 686 of file mfs.h.

Referenced by Mfs_Hl_Read(), and MfsHlIrqHandlerRx().

#define MFS_LIN_SSR_FRE   (0x10u)

Definition at line 685 of file mfs.h.

#define MFS_LIN_SSR_LBD   (0x20u)

Definition at line 687 of file mfs.h.

#define MFS_LIN_SSR_ORE   (0x08u)

Definition at line 684 of file mfs.h.

#define MFS_LIN_SSR_RDRF   (0x04u)

Definition at line 683 of file mfs.h.

#define MFS_LIN_SSR_TBI   (0x01u)

Definition at line 681 of file mfs.h.

#define MFS_LIN_SSR_TDRE   (0x02u)

Definition at line 682 of file mfs.h.

#define MFS_MASTER_CLK_HCR   (0x00u)

Definition at line 69 of file mfs.c.

Referenced by Mfs_GetBusClock().

#define MFS_MASTER_CLK_LCR   (0x04u)

Definition at line 72 of file mfs.c.

Referenced by Mfs_GetBusClock().

#define MFS_MASTER_CLK_MAIN   (0x01u)

Definition at line 70 of file mfs.c.

Referenced by Mfs_GetBusClock().

#define MFS_MASTER_CLK_PLL   (0x02u)

Definition at line 71 of file mfs.c.

Referenced by Mfs_GetBusClock().

#define MFS_MASTER_CLK_SUB   (0x05u)

Definition at line 73 of file mfs.c.

Referenced by Mfs_GetBusClock().

#define MFS_MD_CSIO   (0x02)

Definition at line 611 of file mfs.h.

Referenced by Mfs_Csio_Init(), Mfs_Hl_Csio_Init(), and Mfs_Hl_Csio_SynchronousTrans().

#define MFS_MD_I2C   (0x04)

Definition at line 613 of file mfs.h.

Referenced by Mfs_Hl_I2c_Init(), and Mfs_I2c_Init().

#define MFS_MD_LIN   (0x03)

Definition at line 612 of file mfs.h.

Referenced by Mfs_Hl_Lin_Init(), and Mfs_Lin_Init().

#define MFS_MD_UART_MULTI   (0x01)

Definition at line 610 of file mfs.h.

Referenced by Mfs_Hl_Uart_Init(), and Mfs_Uart_Init().

#define MFS_MD_UART_NORNAL   (0x00)

Definition at line 609 of file mfs.h.

Referenced by Mfs_Hl_Uart_Init(), and Mfs_Uart_Init().

#define MFS_NUM_1   (0x01u)

Definition at line 85 of file mfs.c.

Referenced by Mfs_GetBusClock(), and Mfs_GetReloadValue().

#define MFS_NUM_16   (0x10u)

Definition at line 93 of file mfs.c.

Referenced by Mfs_GetBusClock().

#define MFS_NUM_2   (0x02u)

Definition at line 86 of file mfs.c.

Referenced by Mfs_GetBusClock().

#define MFS_NUM_3   (0x03u)

Definition at line 87 of file mfs.c.

Referenced by Mfs_Csio_SetBaudRate(), Mfs_GetBusClock(), and Mfs_I2c_GetReloadValue().

#define MFS_NUM_4   (0x04u)

Definition at line 88 of file mfs.c.

Referenced by Mfs_GetBusClock(), and Mfs_Uart_SetBaudRate().

#define MFS_NUM_5   (0x05u)

Definition at line 89 of file mfs.c.

Referenced by Mfs_GetBusClock().

#define MFS_NUM_6   (0x06u)

Definition at line 90 of file mfs.c.

Referenced by Mfs_GetBusClock().

#define MFS_NUM_7   (0x07u)

Definition at line 91 of file mfs.c.

Referenced by Mfs_GetBusClock().

#define MFS_NUM_8   (0x08u)

Definition at line 92 of file mfs.c.

Referenced by Mfs_GetBusClock().

#define MFS_PLL_CTL1_MASK   (0x0Fu)

Definition at line 99 of file mfs.c.

Referenced by Mfs_GetBusClock().

#define MFS_PLL_CTL2_MASK   (0x3Fu)

Definition at line 100 of file mfs.c.

Referenced by Mfs_GetBusClock().

#define MFS_RX_FIFO_MIN_VAL   (1u)

Definition at line 606 of file mfs.h.

Referenced by Mfs_Hl_Lin_Init(), and Mfs_Hl_Read().

#define MFS_SACSR_CSE   (0x0800u)

Definition at line 691 of file mfs.h.

#define MFS_SACSR_STATUS_MASK   (0x0900u)

Definition at line 690 of file mfs.h.

#define MFS_SACSR_TDIV_128   (0x07)

Definition at line 702 of file mfs.h.

#define MFS_SACSR_TDIV_16   (0x04)

Definition at line 699 of file mfs.h.

#define MFS_SACSR_TDIV_2   (0x01)

Definition at line 696 of file mfs.h.

#define MFS_SACSR_TDIV_256   (0x08)

Definition at line 703 of file mfs.h.

#define MFS_SACSR_TDIV_32   (0x05)

Definition at line 700 of file mfs.h.

#define MFS_SACSR_TDIV_4   (0x02)

Definition at line 697 of file mfs.h.

#define MFS_SACSR_TDIV_64   (0x06)

Definition at line 701 of file mfs.h.

#define MFS_SACSR_TDIV_8   (0x03)

Definition at line 698 of file mfs.h.

#define MFS_SACSR_TDIV_NONE   (0x00)

Definition at line 695 of file mfs.h.

#define MFS_SACSR_TINT   (0x0100u)

Definition at line 692 of file mfs.h.

#define MFS_SCRCR_CDIV_16   (0x04)

Definition at line 710 of file mfs.h.

#define MFS_SCRCR_CDIV_2   (0x01)

Definition at line 707 of file mfs.h.

#define MFS_SCRCR_CDIV_32   (0x05)

Definition at line 711 of file mfs.h.

#define MFS_SCRCR_CDIV_4   (0x02)

Definition at line 708 of file mfs.h.

#define MFS_SCRCR_CDIV_64   (0x06)

Definition at line 712 of file mfs.h.

#define MFS_SCRCR_CDIV_8   (0x03)

Definition at line 709 of file mfs.h.

#define MFS_SCRCR_CDIV_NONE   (0x00)

Definition at line 706 of file mfs.h.

#define Mfs_SetIBCR   Mfs_SetSCR

Definition at line 1154 of file mfs.h.

#define Mfs_SetIBSR   Mfs_SetESCR

Definition at line 1161 of file mfs.h.

#define Mfs_SetNFCR   Mfs_I2c_SetNoizeFilter

Definition at line 1228 of file mfs.h.

#define Mfs_SetSTMCR   Mfs_Csio_SetCmpVal4SerialTimer

Definition at line 1206 of file mfs.h.

#define Mfs_SetTDR   Mfs_WriteData

Definition at line 1167 of file mfs.h.

#define MFS_SMR_LIN_MODE   (0x60u) /* MD2 = 0, MD1 = 1, MD0 = 1 */

SMR LIN Mode bits.

Definition at line 777 of file mfs.h.

Referenced by Mfs_Hl_Lin_DeInit(), Mfs_Hl_Lin_SetBreak(), Mfs_Hl_Lin_SetNewBaudDivisor(), and MfsHlIrqHandlerSts().

#define MFS_SMR_MODEBITS_MASK   (0xE0u) /* MD2, MD1, MD0, 0, 0, 0, 0, 0 */

SMR Mode bits mask.

Definition at line 775 of file mfs.h.

Referenced by Mfs_Hl_Lin_DeInit(), Mfs_Hl_Lin_SetBreak(), Mfs_Hl_Lin_SetNewBaudDivisor(), and MfsHlIrqHandlerSts().

#define MFS_SSR_ORE   (0x08u)

Definition at line 655 of file mfs.h.

#define MFS_SSR_RDRF   (0x04u)

Definition at line 654 of file mfs.h.

Referenced by Mfs_Hl_Csio_SynchronousTrans(), and Mfs_Hl_Read().

#define MFS_SSR_TDRE   (0x02u)

Definition at line 653 of file mfs.h.

#define MFS_UART_SSR_ERR   (0x38u)

Definition at line 664 of file mfs.h.

Referenced by Mfs_Hl_Read(), and MfsHlIrqHandlerRx().

#define MFS_UART_SSR_FRE   (0x10u)

Definition at line 662 of file mfs.h.

#define MFS_UART_SSR_ORE   (0x08u)

Definition at line 661 of file mfs.h.

#define MFS_UART_SSR_PE   (0x20u)

Definition at line 663 of file mfs.h.

#define MFS_UART_SSR_RDRF   (0x04u)

Definition at line 660 of file mfs.h.

#define MFS_UART_SSR_TBI   (0x01u)

Definition at line 658 of file mfs.h.

#define MFS_UART_SSR_TDRE   (0x02u)

Definition at line 659 of file mfs.h.

#define MFS_WAIT_TIME_0BIT   (0x00)

Definition at line 635 of file mfs.h.

Referenced by Mfs_Csio_Init(), and Mfs_Hl_Csio_Init().

#define MFS_WAIT_TIME_1BIT   (0x01)

Definition at line 636 of file mfs.h.

Referenced by Mfs_Csio_Init(), and Mfs_Hl_Csio_Init().

#define MFS_WAIT_TIME_2BITS   (0x02)

Definition at line 637 of file mfs.h.

Referenced by Mfs_Csio_Init(), and Mfs_Hl_Csio_Init().

#define MFS_WAIT_TIME_3BITS   (0x03)

Definition at line 638 of file mfs.h.

Referenced by Mfs_Csio_Init(), and Mfs_Hl_Csio_Init().

#define PDL_MFS_NO_PARAM_CHK   PDL_OFF

Definition at line 593 of file mfs.h.

Typedef Documentation

APB2 bus clk divider value definition.

Mfs character length.

Mfs CSIO active mode (Normal/SPI)

Mfs CSIO mode (Master/Slave)

Mfs CSIO wait time insertion.

Mfs FIFO availability.

Mfs FIFO Selection.

typedef enum en_mfs_fifo en_mfs_fifo_t

Mfs FIFO Number.

MFS I2C data direction (read/write)

Mfs I2C Fast-mode Plus settings.

Mfs I2C mode.

Mfs I2C Auxiliary Nois Filter Settings.

Mfs I2C Wait Selection Settings.

Enumeration to define an index for each enabled MFS instance.

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

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

Mfs Lin Mode (Master/Slave)

Mfs Lin Stop Bit Length.

Mfs parity.

Mfs start/stop bit.

Mfs UART mode.

typedef void(* mfs_rx_cb_func_ptr_t)(volatile stc_mfsn_t *pstcMfs, void *pvHandle)

Definition at line 561 of file mfs.h.

typedef void(* mfs_sts_cb_func_ptr_t)(volatile stc_mfsn_t *pstcMfs, void *pvHandle)

Definition at line 562 of file mfs.h.

typedef void(* mfs_tx_cb_func_ptr_t)(volatile stc_mfsn_t *pstcMfs, void *pvHandle)

Mfscallback function prototypes.

Definition at line 560 of file mfs.h.

Mfs chip select timing configuration for CSIO.

Mfs FIFO configuration.

MFS instance data type.

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

Mfs configuration.

Contains all parameter for configuratin an MFS channel.

typedef FM4_MFS_TypeDef stc_mfsn_t

Definition at line 236 of file mfs.h.

Enumeration Type Documentation

APB2 bus clk divider value definition.

Enumerator
MfsClkDiv0 

APB2 bus clk = CLK/1.

MfsClkDiv1 

APB2 bus clk = CLK/2.

MfsClkDiv2 

APB2 bus clk = CLK/4.

MfsClkDiv3 

APB2 bus clk = CLK/8.

Definition at line 473 of file mfs.h.

Mfs character length.

Enumerator
MfsFiveBits 

5 Bit character length

MfsSixBits 

6 Bit character length

MfsSevenBits 

7 Bit character length

MfsEightBits 

8 Bit character length

MfsNineBits 

9 Bit character length

MfsTenBits 

10 Bit character length

MfsElevenBits 

11 Bit character length

MfsTwelveBits 

12 Bit character length

MfsThirteenBits 

13 Bit character length

MfsFourteenBits 

14 Bit character length

MfsFifteenBits 

15 Bit character length

MfsSixteenBits 

16 Bit character length

MfsTwentyBits 

20 Bit character length

MfsTwentyFourBits 

24 Bit character length

MfsThirtyTwoBits 

32 Bit character length

Definition at line 313 of file mfs.h.

Mfs CSIO active mode (Normal/SPI)

Enumerator
MfsCsioActNormalMode 

Normal mode.

MfsCsioActSpiMode 

SPI mode.

Definition at line 262 of file mfs.h.

Mfs CSIO mode (Master/Slave)

Enumerator
MfsCsioMaster 

Master mode (generating serial clock)

MfsCsioSlave 

Slave mode (external serial clock)

Definition at line 252 of file mfs.h.

Mfs CSIO wait time insertion.

Enumerator
MfsSyncWaitZero 

0 wait time insertion

MfsSyncWaitOne 

1 wait time insertion

MfsSyncWaitTwo 

2 wait time insertion

MfsSyncWaitThree 

3 wait time insertion

Definition at line 348 of file mfs.h.

Mfs FIFO Number.

Enumerator
MfsFifo1 

FIFO No.1.

MfsFifo2 

FIFO No.2.

Definition at line 417 of file mfs.h.

Mfs FIFO availability.

Enumerator
MfsHasNoFifo 

MFS has no FIFO available.

MfsHasFifo 

MFS has a FIFO available.

Definition at line 407 of file mfs.h.

Mfs FIFO Selection.

Enumerator
MfsTxFifo1RxFifo2 

Transmit FIFO:FIFO1, Received FIFO:FIFO2.

MfsTxFifo2RxFifo1 

Transmit FIFO:FIFO2, Received FIFO:FIFO1.

Definition at line 427 of file mfs.h.

MFS I2C data direction (read/write)

Enumerator
MfsI2cWrite 

Write.

MfsI2cRead 

Read.

Definition at line 387 of file mfs.h.

Mfs I2C Fast-mode Plus settings.

Enumerator
MfsI2cDisableFastModePlus 

Standard-mode.

MfsI2cEnableFastModePlus 

Fast-mode Plus.

Definition at line 282 of file mfs.h.

Mfs I2C mode.

Enumerator
MfsI2cMaster 

I2C Master Mode.

MfsI2cSlave 

I2C Slave Mode.

Definition at line 272 of file mfs.h.

Mfs I2C Auxiliary Nois Filter Settings.

Enumerator
MfsI2cNoizeFilterLess40M 

8 MHz <= APB1 bus clock < 40 MHz

MfsI2cNoizeFilterLess60M 

40 MHz <= APB1 bus clock < 60 MHz

MfsI2cNoizeFilterLess80M 

60 MHz <= APB1 bus clock < 60 MHz

MfsI2cNoizeFilterLess100M 

80 MHz <= APB1 bus clock < 100 MHz

MfsI2cNoizeFilterLess120M 

100 MHz <= APB1 bus clock < 120 MHz

MfsI2cNoizeFilterLess140M 

120 MHz <= APB1 bus clock < 140 MHz

MfsI2cNoizeFilterLess160M 

140 MHz <= APB1 bus clock < 160 MHz

MfsI2cNoizeFilterLess180M 

160 MHz <= APB1 bus clock < 180 MHz

MfsI2cNoizeFilterLess200M 

180 MHz <= APB1 bus clock < 200 MHz

MfsI2cNoizeFilterLess220M 

200 MHz <= APB1 bus clock < 220 MHz

MfsI2cNoizeFilterLess240M 

220 MHz <= APB1 bus clock < 240 MHz

MfsI2cNoizeFilterLess260M 

240 MHz <= APB1 bus clock < 260 MHz

MfsI2cNoizeFilterLess280M 

260 MHz <= APB1 bus clock < 280 MHz

MfsI2cNoizeFilterLess300M 

280 MHz <= APB1 bus clock < 300 MHz

MfsI2cNoizeFilterLess320M 

300 MHz <= APB1 bus clock < 320 MHz

MfsI2cNoizeFilterLess340M 

320 MHz <= APB1 bus clock < 340 MHz

MfsI2cNoizeFilterLess360M 

340 MHz <= APB1 bus clock < 360 MHz

MfsI2cNoizeFilterLess380M 

360 MHz <= APB1 bus clock < 380 MHz

MfsI2cNoizeFilterLess400M 

380 MHz <= APB1 bus clock < 400 MHz

Definition at line 360 of file mfs.h.

Mfs I2C Wait Selection Settings.

Enumerator
MfsI2cWaitSelAfterAck 

Waits (9 bits) after acknowledgement.

MfsI2cWaitSelDataTxRx 

Waits (8 bits) after data transmission or reception.

Definition at line 397 of file mfs.h.

Enumeration to define an index for each enabled MFS instance.

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

Definition at line 795 of file mfs.h.

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

Enumerator
MfsLinBreakLength13 

Lin Break Length 13 Bit Times.

MfsLinBreakLength14 

Lin Break Length 14 Bit Times.

MfsLinBreakLength15 

Lin Break Length 15 Bit Times.

MfsLinBreakLength16 

Lin Break Length 16 Bit Times.

Definition at line 449 of file mfs.h.

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

Enumerator
MfsLinDelimiterLength1 

Lin Break Delimiter Length 1 Bit Time.

MfsLinDelimiterLength2 

Lin Break Delimiter Length 2 Bit Times.

MfsLinDelimiterLength3 

Lin Break Delimiter Length 3 Bit Times.

MfsLinDelimiterLength4 

Lin Break Delimiter Length 4 Bit Times.

Definition at line 461 of file mfs.h.

Mfs Lin Mode (Master/Slave)

Enumerator
MfsLinMaster 

LIN Master Mode.

MfsLinSlave 

LIN Slave Mode.

Definition at line 292 of file mfs.h.

Mfs Lin Stop Bit Length.

Enumerator
MfsLinOneStopBit 

1 Stop Bit

MfsLinTwoStopBits 

2 Stop Bits

MfsLinThreeStopBits 

3 Stop Bits

MfsLinFourStopBits 

4 Stop Bits

Definition at line 437 of file mfs.h.

Mfs parity.

Enumerator
MfsParityNone 

No parity bit is used.

MfsParityEven 

Even parity bit is used.

MfsParityOdd 

Odd parity bit is used.

Definition at line 302 of file mfs.h.

Mfs start/stop bit.

Enumerator
MfsOneStopBit 

1 Stop Bit

MfsTwoStopBits 

2 Stop Bits

MfsThreeStopBits 

3 Stop Bits

MfsFourStopBits 

4 Stop Bits

Definition at line 336 of file mfs.h.

Mfs UART mode.

Enumerator
MfsUartNormal 

Normal mode.

MfsUartMulti 

Multi-Processor Mode.

Definition at line 242 of file mfs.h.

Function Documentation

en_result_t Mfs_ClrTxFifoReqStatus ( volatile stc_mfsn_t *  pstcMfs)

Clear TX FIFO request status for MFS The Function clears the TX FIFO request status (FCR1.FDRQ) of MFS.

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

Definition at line 4800 of file mfs.c.

References ErrorInvalidParameter, FALSE, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_ConfigFifo ( volatile stc_mfsn_t *  pstcMfs,
stc_mfs_fifo_config_t *  pstcFifoConfig 
)

Configure FIFO This Function configures the dedicated FIFO for MFS.

Parameters
[in]pstcMfsPointer to MFS instance register area
[in]pstcFifoConfigPointer to configuration for FIFO
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcMfs == NULL
  • pstcFifoConfig == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))
ErrorOperationInProgressBuffers not empty (Operating RX or TX)

Definition at line 4700 of file mfs.c.

References ErrorInvalidParameter, FALSE, MfsGetInternDataPtr(), MfsTxFifo1RxFifo2, MfsTxFifo2RxFifo1, Ok, TRUE, stc_mfs_fifo_config::u8ByteCount1, stc_mfs_fifo_config::u8ByteCount2, and stc_mfs_fifo_config::u8FifoSel.

Here is the call graph for this function:

en_result_t Mfs_Csio_ClrChipSelectErr ( volatile stc_mfsn_t *  pstcCsio)

Clear chip select error status This Function clears CSE bit status of SACSR for CSIO (MFS).

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

Definition at line 1739 of file mfs.c.

References ErrorInvalidParameter, FALSE, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_Csio_ClrTimerIntReq ( volatile stc_mfsn_t *  pstcCsio)

Clear timer interrupt request This Function clears TINT bit status of SACSR for CSIO (MFS).

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

Definition at line 1779 of file mfs.c.

References ErrorInvalidParameter, FALSE, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_Csio_DeInit ( volatile stc_mfsn_t *  pstcCsio)

Deinitialisation of a MFS module activating as CSIO.

All used uart register are reset to their default values.

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

Definition at line 1387 of file mfs.c.

References ErrorInvalidParameter, FALSE, Mfs_DeInitIrq(), MfsGetInternDataPtr(), Ok, stc_mfs_intern_data::pfnReceiveCbFunction, stc_mfs_intern_data::pfnStatusCbFunction, stc_mfs_intern_data::pfnTransmitCbFunction, stc_mfs_intern_data::pvUpperLayerHandle, and TRUE.

Here is the call graph for this function:

uint16_t Mfs_Csio_GetSerialTimer ( volatile stc_mfsn_t *  pstcCsio)

Get value of serial timer. This Function returns the value of STMR for CSIO (MFS).

Parameters
[in]pstcCsioPointer to CSIO (MFS) instance register area
Return values
Thevalue of STMR

Definition at line 2013 of file mfs.c.

References MfsGetInternDataPtr().

Here is the call graph for this function:

uint16_t Mfs_Csio_GetStatus ( volatile stc_mfsn_t *  pstcCsio,
uint16_t  u16StatusMask 
)

Get serial status register This Function gets specified bit status of SACSR for CSIO (MFS).

Parameters
[in]pstcCsioPointer to CSIO (MFS) instance register area
[in]u16StatusMaskMask data to get status
Return values
MaskedSACSR value (If parameter check is NG, this function returns 0.)

Definition at line 1699 of file mfs.c.

References MfsGetInternDataPtr().

Here is the call graph for this function:

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

Initialisation of a MFS module to activate as CSIO.

Set registers to active MFS as CSIO.

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

Definition at line 1199 of file mfs.c.

References stc_mfs_csio_config::bBitDirection, stc_mfs_csio_config::bSignalSystem, ErrorInvalidParameter, FALSE, Mfs_Csio_SetBaudRate(), MFS_DATA_LEN_10, MFS_DATA_LEN_11, MFS_DATA_LEN_12, MFS_DATA_LEN_13, MFS_DATA_LEN_14, MFS_DATA_LEN_15, MFS_DATA_LEN_16, MFS_DATA_LEN_20, MFS_DATA_LEN_24, MFS_DATA_LEN_32, MFS_DATA_LEN_5, MFS_DATA_LEN_6, MFS_DATA_LEN_7, MFS_DATA_LEN_8, MFS_DATA_LEN_9, MFS_MD_CSIO, MFS_WAIT_TIME_0BIT, MFS_WAIT_TIME_1BIT, MFS_WAIT_TIME_2BITS, MFS_WAIT_TIME_3BITS, MfsCsioActNormalMode, MfsCsioActSpiMode, MfsCsioMaster, MfsCsioSlave, MfsEightBits, MfsElevenBits, MfsFifteenBits, MfsFiveBits, MfsFourteenBits, MfsGetInternDataPtr(), MfsNineBits, MfsSevenBits, MfsSixBits, MfsSixteenBits, MfsSyncWaitOne, MfsSyncWaitThree, MfsSyncWaitTwo, MfsSyncWaitZero, MfsTenBits, MfsThirteenBits, MfsThirtyTwoBits, MfsTwelveBits, MfsTwentyBits, MfsTwentyFourBits, Ok, TRUE, stc_mfs_csio_config::u32DataRate, stc_mfs_csio_config::u8CharLength, stc_mfs_csio_config::u8CsioActMode, stc_mfs_csio_config::u8CsioMode, and stc_mfs_csio_config::u8SyncWaitTime.

Here is the call graph for this function:

uint32_t Mfs_Csio_ReadData32 ( volatile stc_mfsn_t *  pstcCsio)

Read data from Received Data Register (RDR). The received data is read from Received Data Register (RDR) and return for CSIO.

Note
This function access to RDR by 32bits. If RDR is accessed by less than 17bits for MFS, the function of Mfs_ReadData() should be used.
Parameters
[in]pstcCsioPointer to CSIO (MFS) instance register area
Return values
theValue of Received Data Register (RDR, 32bit)

Definition at line 1511 of file mfs.c.

References MfsGetInternDataPtr().

Here is the call graph for this function:

en_result_t Mfs_Csio_SetBaudRate ( volatile stc_mfsn_t *  pstcCsio,
uint32_t  u32BaudRate 
)

Set baud rate This Function sets baud rate for CSIO (MFS).

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

Definition at line 2438 of file mfs.c.

References ErrorInvalidParameter, ErrorUninitialized, MFS_BGR_MASK, Mfs_GetReloadValue(), MFS_NUM_3, MfsGetInternDataPtr(), and Ok.

Referenced by Mfs_Csio_Init(), and Mfs_Lin_SetBaudRate().

Here is the call graph for this function:

Here is the caller graph for this function:

en_result_t Mfs_Csio_SetChipSelectEnable ( volatile stc_mfsn_t *  pstcCsio,
boolean_t  bEnable 
)

Enable or disable chip select. This Function sets or clears CSEN0 bit of SCSCR for CSIO (MFS).

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

Definition at line 2242 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_Csio_SetChipSelectErrEnable ( volatile stc_mfsn_t *  pstcCsio,
boolean_t  bEnable 
)

Enable or disable generating of chip select error. This Function sets or clears TBEEN bit of SACSR for CSIO (MFS).

Parameters
[in]pstcCsioPointer to CSIO (MFS) instance register area
[in]bEnableSetting for generating of chip select error FALSE:Disable, TRUE:Enable
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 1599 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_Csio_SetChipSelectErrIntEnable ( volatile stc_mfsn_t *  pstcCsio,
boolean_t  bEnable 
)

Enable or disable interrupt of chip select error. This Function sets or clears CSEIE bit of SACSR for CSIO (MFS).

Parameters
[in]pstcCsioPointer to CSIO (MFS) instance register area
[in]bEnableSetting for interrupt of chip select error FALSE:Disable, TRUE:Enable
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 1651 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_Csio_SetChipSelectOutEnable ( volatile stc_mfsn_t *  pstcCsio,
boolean_t  bEnable 
)

Enable or disable chip select output. This Function sets or clears CSOE bit of SCSCR for CSIO (MFS).

Parameters
[in]pstcCsioPointer to CSIO (MFS) instance register area
[in]bEnableSetting for chip select output FALSE:Disable, TRUE:Enable
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 2294 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_Csio_SetCmpVal4SerialTimer ( volatile stc_mfsn_t *  pstcCsio,
uint16_t  u16CompareValue 
)

Set compare value for serial timer. This Function writes the compare value to STMCR for CSIO (MFS).

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

Definition at line 2052 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_Csio_SetCsHold ( volatile stc_mfsn_t *  pstcCsio,
boolean_t  bHold 
)

Set serial chip select into non-hold or hold. This Function clears or sets SCAM bit of SCSCR for CSIO (MFS).

Parameters
[in]pstcCsioPointer to CSIO (MFS) instance register area
[in]bHoldSetting for serial chip select holding FALSE:non-hold, TRUE:hold
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 2096 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_Csio_SetCsInActiveLevel ( volatile stc_mfsn_t *  pstcCsio,
boolean_t  bLevel 
)

Set level when chip select is in-active. This Function sets/clears CSLVL bit of SCSCR for CSIO (MFS).

Parameters
[in]pstcCsioPointer to CSIO (MFS) instance register area
[in]bLevelIn-active level for chip select FALSE:Low, TRUE:High
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 2190 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_Csio_SetCsTimingConfig ( volatile stc_mfsn_t *  pstcCsio,
stc_mfs_csio_cs_timing_t *  pstcCsTimingCfg 
)

Set configuration of chip select timings. This Function sets SCSTR10 and SCSTR32 for CSIO (MFS).

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

Definition at line 2345 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), Ok, stc_mfs_csio_cs_timing::u16CsDeSelect, stc_mfs_csio_cs_timing::u8CsHoldDelay, and stc_mfs_csio_cs_timing::u8CsSetupDelay.

Here is the call graph for this function:

en_result_t Mfs_Csio_SetCsTimingPrescale ( volatile stc_mfsn_t *  pstcCsio,
uint8_t  u8Prescale 
)

Set prescale for chip select timing. This Function sets CDIV bits of SCSCR for CSIO (MFS).

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

Definition at line 2147 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_Csio_SetSckOutEnable ( volatile stc_mfsn_t *  pstcCsio,
boolean_t  bEnable 
)

Enable or disable serial clock output This Function sets or clears SCKE bit of SMR for CSIO (MFS).

Parameters
[in]pstcCsioPointer to CSIO (MFS) instance register area
[in]bEnableSetting for serial clock output FALSE:Disable, TRUE:Enable
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 1460 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_Csio_SetSerialTimerEnable ( volatile stc_mfsn_t *  pstcCsio,
boolean_t  bEnable 
)

Enable or disable serial timer. This Function sets or clears TMRE bit of SACSR for CSIO (MFS).

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

Definition at line 1967 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_Csio_SetSerialTimerIntEnable ( volatile stc_mfsn_t *  pstcCsio,
boolean_t  bEnable 
)

Enable or disable serial timer interrupt. This Function sets or clears TINTE bit of SACSR for CSIO (MFS).

Parameters
[in]pstcCsioPointer to CSIO (MFS) instance register area
[in]bEnableSetting for serial timer interrupt FALSE:Disable, TRUE:Enable
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 1821 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_Csio_SetSyncTransEnable ( volatile stc_mfsn_t *  pstcCsio,
boolean_t  bEnable 
)

Enable or disable synchronous transfer with serial timer. This Function sets or clears TSYNE bit of SACSR for CSIO (MFS).

Parameters
[in]pstcCsioPointer to CSIO (MFS) instance register area
[in]bEnableSetting for synchronous transfer with serial timer FALSE:Disable, TRUE:Enable
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 1873 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_Csio_SetTimerPrescale ( volatile stc_mfsn_t *  pstcCsio,
uint8_t  u8Prescale 
)

Set timer prescale. This Function sets TDIV bits of SACSR for CSIO (MFS).

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

Definition at line 1924 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_Csio_SetTxLength ( volatile stc_mfsn_t *  pstcCsio,
uint8_t  u8TxBytes 
)

Set transfer length. This Function sets TBYTE0 for CSIO (MFS).

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

Definition at line 2394 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_Csio_WriteData32 ( volatile stc_mfsn_t *  pstcCsio,
const uint32_t  u32Data 
)

Write data to Transmit Data Register (TDR). The data provided by Mfs_Csio_WriteData::u32Data is written into the Transmit Data Register (TDR) for CSIO.

Note
This function access to 32 bits TDR. If TDR is accessed by less than 17bits for MFS, the function of Mfs_WriteData() should be used.
Parameters
[in]pstcCsioPointer to CSIO (MFS) instance register area
[in]u32DataData to write to Transmit Data Register
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcCsio == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 1555 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_DeInitIrq ( volatile stc_mfsn_t *  pstcMfs)

Device dependent de-initialization of interrupts according CMSIS.

Parameters
pstcMfsPointer to MFS instance
Returns
Ok Successful de-initialization

Definition at line 612 of file mfs.c.

References MFS0, MFS1, MFS10, MFS11, MFS12, MFS13, MFS14, MFS15, MFS2, MFS3, MFS4, MFS5, MFS6, MFS7, MFS8, MFS9, Ok, and PDL_DEFAULT_INTERRUPT_LEVEL.

Referenced by Mfs_Csio_DeInit(), Mfs_Hl_Csio_DeInit(), Mfs_Hl_I2c_DeInit(), Mfs_Hl_Uart_DeInit(), Mfs_I2c_DeInit(), and Mfs_Uart_DeInit().

Here is the caller graph for this function:

en_result_t Mfs_ErrorClear ( volatile stc_mfsn_t *  pstcMfs)

Clear error flag. The Function can clear the error flags for MFS (UART/CSIO/LIN/I2C)

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

Definition at line 4569 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), Ok, and TRUE.

Here is the call graph for this function:

uint16_t Mfs_GetBGR ( volatile stc_mfsn_t *  pstcMfs)

Get value from Baud rate Generator Register This Function returns value of BGR.

Parameters
[in]pstcMfsPointer to MFS instance register area
Return values
Valueof BGR (If parameter check is NG, this function returns 0.)

Definition at line 5442 of file mfs.c.

References MfsGetInternDataPtr().

Here is the call graph for this function:

uint32_t Mfs_GetBusClock ( void  )
uint8_t Mfs_GetEIBCR ( volatile stc_mfsn_t *  pstcMfs)

Get value from Extended I2C Bus Control Register This Function can get value from EIBCR.

Parameters
[in]pstcMfsPointer to MFS instance register area
Return values
Valueof EIBCR (If parameter check is NG, this function returns 0.)

Definition at line 6286 of file mfs.c.

References MfsGetInternDataPtr().

Here is the call graph for this function:

uint8_t Mfs_GetESCR ( volatile stc_mfsn_t *  pstcMfs)

Get value from Extended Serial Control Register This Function returns value of ESCR.

Parameters
[in]pstcMfsPointer to MFS instance register area
Return values
Valueof ESCR (If parameter check is NG, this function returns 0.)

Definition at line 5365 of file mfs.c.

References MfsGetInternDataPtr().

Here is the call graph for this function:

uint8_t Mfs_GetFCR0 ( volatile stc_mfsn_t *  pstcMfs)

Get value from FIFO Control Register 0 This Function returns value of FCR0.

Parameters
[in]pstcMfsPointer to MFS instance register area
Return values
Valueof FCR0 (If parameter check is NG, this function returns 0.)

Definition at line 5596 of file mfs.c.

References MfsGetInternDataPtr().

Here is the call graph for this function:

uint8_t Mfs_GetFCR1 ( volatile stc_mfsn_t *  pstcMfs)

Get value from FIFO Control Register 1 This Function returns value of FCR1.

Parameters
[in]pstcMfsPointer to MFS instance register area
Return values
Valueof FCR1 (If parameter check is NG, this function returns 0.)

Definition at line 5519 of file mfs.c.

References MfsGetInternDataPtr().

Here is the call graph for this function:

uint8_t Mfs_GetFifoBytes ( volatile stc_mfsn_t *  pstcMfs,
uint8_t  u8FifoNumber 
)

Get effective data count in the FIFO buffer This Function gets the FBYTE of the dedicated FIFO.

Parameters
[in]pstcMfsPointer to MFS instance register area
[in]u8FifoNumberNumber of FIFO to get FBYTE
Return values
Valueof FBYTE of the dedicated FIFO (If parameter check is NG, this function returns 0.)

Definition at line 4968 of file mfs.c.

References MfsFifo1, MfsFifo2, and MfsGetInternDataPtr().

Here is the call graph for this function:

uint8_t Mfs_GetISBA ( volatile stc_mfsn_t *  pstcMfs)

Get value from 7-bit Slave Address Register This Function can get value from ISBA.

Parameters
[in]pstcMfsPointer to MFS instance register area
Return values
Valueof ISBA (If parameter check is NG, this function returns 0.)

Definition at line 6098 of file mfs.c.

References MfsGetInternDataPtr().

Here is the call graph for this function:

uint8_t Mfs_GetISMK ( volatile stc_mfsn_t *  pstcMfs)

Get value from 7-bit Slave Address Mask Register This Function can get value from ISMK.

Parameters
[in]pstcMfsPointer to MFS instance register area
Return values
Valueof ISMK (If parameter check is NG, this function returns 0.)

Definition at line 6175 of file mfs.c.

References MfsGetInternDataPtr().

Here is the call graph for this function:

uint8_t Mfs_GetNFCR ( volatile stc_mfsn_t *  pstcMfs)

Get value from Noize Filter Control Register This Function can get value from NFCR.

Parameters
[in]pstcMfsPointer to MFS instance register area
Return values
Valueof NFCR (If parameter check is NG, this function returns 0.)

Definition at line 6209 of file mfs.c.

References MfsGetInternDataPtr().

Here is the call graph for this function:

uint32_t Mfs_GetReloadValue ( uint32_t  u32BaudRate)

Get reload value This function return the reload value to calucurate baud rate.

This function just uses Mfs_Xxx_Init()

Parameters
[in]u32BaudRateBaudrate to setup
Return values
reloadvalue (uint32_t)

Definition at line 5105 of file mfs.c.

References Mfs_GetBusClock(), and MFS_NUM_1.

Referenced by Mfs_Csio_SetBaudRate(), Mfs_Hl_Csio_Init(), Mfs_Hl_Lin_Init(), Mfs_Hl_Uart_Init(), and Mfs_Uart_SetBaudRate().

Here is the call graph for this function:

Here is the caller graph for this function:

uint16_t Mfs_GetSACSR ( volatile stc_mfsn_t *  pstcMfs)

Get value from Serial Assistant Status Control Register This Function can get value from SACSR.

Parameters
[in]pstcMfsPointer to MFS instance register area
Return values
Valueof SACSR (If parameter check is NG, this function returns 0.)

Definition at line 5827 of file mfs.c.

References MfsGetInternDataPtr().

Here is the call graph for this function:

uint8_t Mfs_GetSCR ( volatile stc_mfsn_t *  pstcMfs)

Get value from Serial Control Register This Function returns value of SCR.

Parameters
[in]pstcMfsPointer to MFS instance register area
Return values
Valueof SCR (If parameter check is NG, this function returns 0.)

Definition at line 5288 of file mfs.c.

References MfsGetInternDataPtr().

Here is the call graph for this function:

uint16_t Mfs_GetSCSCR ( volatile stc_mfsn_t *  pstcMfs)

Get value from Serial Chip Select Control Register This Function can get value from SCSCR.

Parameters
[in]pstcMfsPointer to MFS instance register area
Return values
OkProcess successfully done.
Valueof SCSCR (If parameter check is NG, this function returns 0.)

Definition at line 5939 of file mfs.c.

References MfsGetInternDataPtr().

Here is the call graph for this function:

uint16_t Mfs_GetSCSTR10 ( volatile stc_mfsn_t *  pstcMfs)

Get value from Serial Chip Select Timing Register 1-0 This Function returns value of SCSTR10.

Parameters
[in]pstcMfsPointer to MFS instance register area
Return values
Valueof SCSTR10 (If parameter check is NG, this function returns 0.)

Definition at line 5673 of file mfs.c.

References MfsGetInternDataPtr().

Here is the call graph for this function:

uint16_t Mfs_GetSCSTR32 ( volatile stc_mfsn_t *  pstcMfs)

Get value from Serial Chip Select Timing Register 1-0 This Function returns value of SCSTR32.

Parameters
[in]pstcMfsPointer to MFS instance register area
Return values
Valueof SCSTR32 (If parameter check is NG, this function returns 0.)

Definition at line 5750 of file mfs.c.

References MfsGetInternDataPtr().

Here is the call graph for this function:

uint8_t Mfs_GetSMR ( volatile stc_mfsn_t *  pstcMfs)

Get value from Serial Mode Register This Function returns value of SMR.

Parameters
[in]pstcMfsPointer to MFS instance register area
Return values
Valueof SMR (If parameter check is NG, this function returns 0.)

Definition at line 5211 of file mfs.c.

References MfsGetInternDataPtr().

Here is the call graph for this function:

uint8_t Mfs_GetStatus ( volatile stc_mfsn_t *  pstcMfs,
uint8_t  u8StatusMask 
)

Get status The Function can return the status (SSR) for MFS (UART/CSIO/LIN/I2C)

Parameters
[in]pstcMfsPointer to MFS instance register area
[in]u8StatusMaskMask data to get status
Return values
MaskedSSR value (If parameter check is NG, this function returns 0.)

Definition at line 4529 of file mfs.c.

References MfsGetInternDataPtr(), and u8Status.

Here is the call graph for this function:

uint16_t Mfs_GetSTMCR ( volatile stc_mfsn_t *  pstcMfs)

Get value from Serial Timer Compare Register This Function can get value from STMCR.

Parameters
[in]pstcMfsPointer to MFS instance register area
Return values
Valueof STMCR (If parameter check is NG, this function returns 0.)

Definition at line 5861 of file mfs.c.

References MfsGetInternDataPtr().

Here is the call graph for this function:

uint8_t Mfs_GetTBYTE0 ( volatile stc_mfsn_t *  pstcMfs)

Get value from Transmission Byte 0 This Function can get value from TBYTE0.

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

Definition at line 6021 of file mfs.c.

References MfsGetInternDataPtr().

Here is the call graph for this function:

boolean_t Mfs_GetTxFifoReqStatus ( volatile stc_mfsn_t *  pstcMfs)

Get TX FIFO request status for MFS The Function can return the TX FIFO request status (FCR1.FDRQ) of MFS.

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

Definition at line 4763 of file mfs.c.

References FALSE, MfsGetInternDataPtr(), and TRUE.

Here is the call graph for this function:

en_result_t Mfs_I2c_ClearIntStatus ( volatile stc_mfsn_t *  pstcI2c)

Clear interrupt status for I2C The Function clears the interrupt status (IBCR.INT) of I2C.

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

Definition at line 3080 of file mfs.c.

References ErrorInvalidParameter, FALSE, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_I2c_DeInit ( volatile stc_mfsn_t *  pstcI2c)

Deinitialisation of a MFS module activating as I2C.

All used uart register are reset to their default values.

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

Definition at line 2639 of file mfs.c.

References ErrorInvalidParameter, FALSE, Mfs_DeInitIrq(), MfsGetInternDataPtr(), Ok, stc_mfs_intern_data::pfnReceiveCbFunction, stc_mfs_intern_data::pfnStatusCbFunction, stc_mfs_intern_data::pfnTransmitCbFunction, stc_mfs_intern_data::pvUpperLayerHandle, and TRUE.

Here is the call graph for this function:

boolean_t Mfs_I2c_GetBusErrStatus ( volatile stc_mfsn_t *  pstcI2c)

Get bus error status for I2C The Function can return the bus error status (IBCR.BER) of I2C.

Parameters
[in]pstcI2cPointer to I2C (MFS) instance register area
Return values
Thebus error status (TRUE:Bus error)

Definition at line 3010 of file mfs.c.

References FALSE, MfsGetInternDataPtr(), and TRUE.

Here is the call graph for this function:

boolean_t Mfs_I2c_GetIntStatus ( volatile stc_mfsn_t *  pstcI2c)

Get interrupt status for I2C The Function can return the interrupt status (IBCR.INT) of I2C.

Parameters
[in]pstcI2cPointer to I2C (MFS) instance register area
Return values
Theinterrupt status (TRUE:interruption has been occured)

Definition at line 3043 of file mfs.c.

References FALSE, MfsGetInternDataPtr(), and TRUE.

Here is the call graph for this function:

uint32_t Mfs_I2c_GetReloadValue ( uint32_t  u32BaudRate)

Get reload value for I2C interface This function return the reload value to calucurate baud rate.

Parameters
[in]u32BaudRateBaudrate to setup
Return values
reloadvalue (uint32_t)

Definition at line 5136 of file mfs.c.

References Mfs_GetBusClock(), and MFS_NUM_3.

Referenced by Mfs_Hl_I2c_Init(), and Mfs_I2c_SetBaudRate().

Here is the call graph for this function:

Here is the caller graph for this function:

en_result_t Mfs_I2c_Init ( volatile stc_mfsn_t *  pstcI2c,
const stc_mfs_i2c_config_t *  pstcConfig 
)
en_result_t Mfs_I2c_SetAckEnable ( volatile stc_mfsn_t *  pstcI2c,
boolean_t  bEnable 
)

Enable or disable ACK for I2C The Function sets or clears ACKE bit of IBCR for I2C.

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

Definition at line 2809 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_I2c_SetBaudRate ( volatile stc_mfsn_t *  pstcI2c,
uint32_t  u32BaudRate 
)

Set baud rate This Function sets baud rate for I2C (MFS).

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

Definition at line 3594 of file mfs.c.

References ErrorInvalidParameter, ErrorUninitialized, MFS_BGR_MASK, Mfs_I2c_GetReloadValue(), MfsGetInternDataPtr(), and Ok.

Referenced by Mfs_I2c_Init().

Here is the call graph for this function:

Here is the caller graph for this function:

en_result_t Mfs_I2c_SetBusErrorControlEnable ( volatile stc_mfsn_t *  pstcI2c,
boolean_t  bEnable 
)

Enable or disable I2C continue after occurring bus error for I2C The Function sets or clears BEC bit of EIBCR for I2C.

Parameters
[in]pstcI2cPointer to I2C (MFS) instance register area
[in]bEnableSetting for I2C continue after occuring bus error FALSE:Disable, TRUE:Enable
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcI2c == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 3420 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_I2c_SetCondDetIntEnable ( volatile stc_mfsn_t *  pstcI2c,
boolean_t  bEnable 
)

Enable or disable condition detection interrupt for I2C The Function sets or clears CNDE bit of IBCR for I2C.

Parameters
[in]pstcI2cPointer to I2C (MFS) instance register area
[in]bEnableSetting for condition detection interrupt FALSE:Disable, TRUE:Enable
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcI2c == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 2912 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_I2c_SetDmaModeEnable ( volatile stc_mfsn_t *  pstcI2c,
boolean_t  bEnable 
)

Enable or disable DMA mode for I2C The Function sets or clears DMA bit of SSR for I2C.

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

Definition at line 3164 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_I2c_SetI2cEnable ( volatile stc_mfsn_t *  pstcI2c,
boolean_t  bEnable,
uint8_t  u8AddrMask 
)

Enable or disable I2C interface and set slave address mask for I2C The Function sets or clears EN bit and SM bits of ISMK for I2C.

Parameters
[in]pstcI2cPointer to I2C (MFS) instance register area
[in]bEnableSetting for I2C I/F FALSE:Disable, TRUE:Enable
[in]u8AddrMaskSlave address mask
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcI2c == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 3473 of file mfs.c.

References ErrorInvalidParameter, FALSE, MFS_ISMK_SLV_ADDR_MASK, MfsGetInternDataPtr(), Ok, and TRUE.

Here is the call graph for this function:

en_result_t Mfs_I2c_SetIntEnable ( volatile stc_mfsn_t *  pstcI2c,
boolean_t  bEnable 
)

Enable or disable interrupt for I2C The Function sets or clears INTE bit of IBCR for I2C.

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

Definition at line 2964 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_I2c_SetNoizeFilter ( volatile stc_mfsn_t *  pstcI2c,
uint8_t  u8NzFilter 
)

Set noize filter for I2C The Function sets NFCR for I2C.

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

Definition at line 3216 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), MfsI2cNoizeFilterLess400M, and Ok.

Here is the call graph for this function:

en_result_t Mfs_I2c_SetRxIntEnable ( volatile stc_mfsn_t *  pstcI2c,
boolean_t  bEnable 
)

Enable or disable I2C RX interrupt The Function sets or clears RIE bit of SMR for I2C.

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

Definition at line 2757 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_I2c_SetSclOutLevel ( volatile stc_mfsn_t *  pstcI2c,
boolean_t  bLevel 
)

Set SCL output level after passing noize filter for I2C The Function sets or clears SCLC bit of EIBCR for I2C.

Parameters
[in]pstcI2cPointer to I2C (MFS) instance register area
[in]bLevelSCL output level after passing noize filter PDLLow :SCL output level is "L" PDLHigh:SCL output level is "H"
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcI2c == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 3316 of file mfs.c.

References ErrorInvalidParameter, FALSE, MfsGetInternDataPtr(), Ok, PDLLow, and TRUE.

Here is the call graph for this function:

en_result_t Mfs_I2c_SetSdaOutLevel ( volatile stc_mfsn_t *  pstcI2c,
boolean_t  bLevel 
)

Set SDA output level after passing noize filter for I2C The Function sets or clears SDAC bit of EIBCR for I2C.

Parameters
[in]pstcI2cPointer to I2C (MFS) instance register area
[in]bLevelSDA output level after passing noize filter PDLLow :SDA output level is "L" PDLHigh:SDA output level is "H"
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcI2c == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 3263 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_I2c_SetSerlalOutEnable ( volatile stc_mfsn_t *  pstcI2c,
boolean_t  bEnable 
)

Enable or disable serial output for I2C The Function sets or clears SOCE bit of EIBCR for I2C.

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

Definition at line 3368 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_I2c_SetSlvAddrEnable ( volatile stc_mfsn_t *  pstcI2c,
boolean_t  bEnable,
uint8_t  u8SlvAdr 
)

Enable or disable slave address for I2C The Function sets or clears SAEN bit and SA bits of ISBA for I2C.

Parameters
[in]pstcI2cPointer to I2C (MFS) instance register area
[in]bEnableSetting for slave address enable FALSE:Disable, TRUE:Enable
[in]u8SlvAdrSlave address
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcI2c == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 3534 of file mfs.c.

References ErrorInvalidParameter, FALSE, MFS_ISBA_SLV_ADDR, MfsGetInternDataPtr(), Ok, and TRUE.

Here is the call graph for this function:

en_result_t Mfs_I2c_SetTransmitEmpty ( volatile stc_mfsn_t *  pstcI2c)

Set transmit empty flag for I2C The Function sets the TSET bit of SSR of I2C. This sets the TDRE bit of SSR. If DMA mode is enabled, TBI bit of SSR is set.

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

Definition at line 3122 of file mfs.c.

References ErrorInvalidParameter, FALSE, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_I2c_SetTxIntEnable ( volatile stc_mfsn_t *  pstcI2c,
boolean_t  bEnable 
)

Enable or disable I2C TX interrupt The Function sets or clears TIE bit of SMR for I2C.

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

Definition at line 2705 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_I2c_SetWaitSelect ( volatile stc_mfsn_t *  pstcI2c,
uint8_t  u8WaitSelect 
)

Set wait selection for I2C The Function sets or clears WSEL bit of IBCR for I2C.

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

Definition at line 2860 of file mfs.c.

References ErrorInvalidParameter, FALSE, MfsGetInternDataPtr(), MfsI2cWaitSelDataTxRx, Ok, and TRUE.

Here is the call graph for this function:

en_result_t Mfs_InitRxIrq ( volatile stc_mfsn_t *  pstcMfs)

Device dependent initialization of receive interrupts according CMSIS with level defined in pdl.h.

Parameters
pstcMfsPointer to MFS instance
Returns
Ok Successful initialization

Definition at line 438 of file mfs.c.

References MFS0, MFS1, MFS10, MFS11, MFS12, MFS13, MFS14, MFS15, MFS2, MFS3, MFS4, MFS5, MFS6, MFS7, MFS8, MFS9, Ok, PDL_IRQ_LEVEL_MFS0_RX, PDL_IRQ_LEVEL_MFS10_RX, PDL_IRQ_LEVEL_MFS11_RX, PDL_IRQ_LEVEL_MFS12_RX, PDL_IRQ_LEVEL_MFS13_RX, PDL_IRQ_LEVEL_MFS14_RX, PDL_IRQ_LEVEL_MFS15_RX, PDL_IRQ_LEVEL_MFS1_RX, PDL_IRQ_LEVEL_MFS2_RX, PDL_IRQ_LEVEL_MFS3_RX, PDL_IRQ_LEVEL_MFS4_RX, PDL_IRQ_LEVEL_MFS5_RX, PDL_IRQ_LEVEL_MFS6_RX, PDL_IRQ_LEVEL_MFS7_RX, PDL_IRQ_LEVEL_MFS8_RX, and PDL_IRQ_LEVEL_MFS9_RX.

Referenced by Mfs_Hl_Csio_Init(), Mfs_Hl_I2c_Init(), Mfs_Hl_Lin_Init(), and Mfs_Hl_Uart_Init().

Here is the caller graph for this function:

en_result_t Mfs_InitTxIrq ( volatile stc_mfsn_t *  pstcMfs)

Device dependent initialization of transmit interrupts according CMSIS with level defined in pdl.h.

Parameters
pstcMfsPointer to MFS instance
Returns
Ok Successful initialization

Definition at line 263 of file mfs.c.

References MFS0, MFS1, MFS10, MFS11, MFS12, MFS13, MFS14, MFS15, MFS2, MFS3, MFS4, MFS5, MFS6, MFS7, MFS8, MFS9, Ok, PDL_IRQ_LEVEL_MFS0_TX, PDL_IRQ_LEVEL_MFS10_TX, PDL_IRQ_LEVEL_MFS11_TX, PDL_IRQ_LEVEL_MFS12_TX, PDL_IRQ_LEVEL_MFS13_TX, PDL_IRQ_LEVEL_MFS14_TX, PDL_IRQ_LEVEL_MFS15_TX, PDL_IRQ_LEVEL_MFS1_TX, PDL_IRQ_LEVEL_MFS2_TX, PDL_IRQ_LEVEL_MFS3_TX, PDL_IRQ_LEVEL_MFS4_TX, PDL_IRQ_LEVEL_MFS5_TX, PDL_IRQ_LEVEL_MFS6_TX, PDL_IRQ_LEVEL_MFS7_TX, PDL_IRQ_LEVEL_MFS8_TX, and PDL_IRQ_LEVEL_MFS9_TX.

Referenced by Mfs_Hl_Csio_Init(), Mfs_Hl_I2c_Init(), Mfs_Hl_Lin_Init(), and Mfs_Hl_Uart_Init().

Here is the caller graph for this function:

en_result_t Mfs_Lin_ClearBreakDetFlag ( volatile stc_mfsn_t *  pstcLin)

Clear LIN break detection flag.

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

Definition at line 3868 of file mfs.c.

References ErrorInvalidParameter, FALSE, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_Lin_DeInit ( volatile stc_mfsn_t *  pstcLin)

Deinitialisation of a MFS module activating as LIN.

All used uart register are reset to their default values.

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

Definition at line 3799 of file mfs.c.

References Mfs_Uart_DeInit().

Here is the call graph for this function:

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

Initialisation of a MFS module to activate as LIN.

Set registers to active MFS as LIN.

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

Definition at line 3648 of file mfs.c.

References stc_mfs_lin_config::bLinBreakIrqEnable, ErrorInvalidParameter, FALSE, MFS_LIN_BREAK_13BITS, MFS_LIN_BREAK_14BITS, MFS_LIN_BREAK_15BITS, MFS_LIN_BREAK_16BITS, MFS_LIN_DELIMITER_1BIT, MFS_LIN_DELIMITER_2BITS, MFS_LIN_DELIMITER_3BITS, MFS_LIN_DELIMITER_4BITS, Mfs_Lin_SetBaudRate(), MFS_MD_LIN, MfsGetInternDataPtr(), MfsLinBreakLength13, MfsLinBreakLength14, MfsLinBreakLength15, MfsLinBreakLength16, MfsLinDelimiterLength1, MfsLinDelimiterLength2, MfsLinDelimiterLength3, MfsLinDelimiterLength4, MfsLinFourStopBits, MfsLinMaster, MfsLinOneStopBit, MfsLinSlave, MfsLinThreeStopBits, MfsLinTwoStopBits, Ok, TRUE, stc_mfs_lin_config::u32DataRate, stc_mfs_lin_config::u8BreakLength, stc_mfs_lin_config::u8DelimiterLength, stc_mfs_lin_config::u8LinMode, and stc_mfs_lin_config::u8StopBits.

Here is the call graph for this function:

en_result_t Mfs_Lin_SetBaudRate ( volatile stc_mfsn_t *  pstcLin,
uint32_t  u32BaudRate 
)

Set baud rate This Function sets baud rate for LIN (MFS).

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

Definition at line 4052 of file mfs.c.

References Mfs_Csio_SetBaudRate().

Referenced by Mfs_Lin_Init().

Here is the call graph for this function:

Here is the caller graph for this function:

en_result_t Mfs_Lin_SetBreak ( volatile stc_mfsn_t *  pstcLin)

Set LIN break field This Function sets LBR bit of SCR for LIN.

Note
MFS module must be initialized to LIN Master mode

This Function sets a LIN break and break delimiter length with the configuration by the previous initialization.

Parameters
[in]pstcLinPointer to LIN (MFS) instance register area
Return values
OkLIN Break is (being) generated
ErrorInvalidParameterIf one of following conditions are met:
  • pstcLin == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 3829 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), Ok, and TRUE.

Here is the call graph for this function:

en_result_t Mfs_Lin_SetBreakConfig ( volatile stc_mfsn_t *  pstcLin,
uint8_t  u8BreakLen,
uint8_t  u8DelimiterLen 
)

Set LIN break field length and break delimiter length The Function sets LBL bits and DEL bits of ESCR for LIN.

Note
MFS module must be initialized to LIN Master mode
Parameters
[in]pstcLinPointer to LIN (MFS) instance register area
[in]u8BreakLenBreak field length
[in]u8DelimiterLenBreak delimiter length
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcLin == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 3963 of file mfs.c.

References ErrorInvalidParameter, MFS_LIN_BREAK_13BITS, MFS_LIN_BREAK_14BITS, MFS_LIN_BREAK_15BITS, MFS_LIN_BREAK_16BITS, MFS_LIN_DELIMITER_1BIT, MFS_LIN_DELIMITER_2BITS, MFS_LIN_DELIMITER_3BITS, MFS_LIN_DELIMITER_4BITS, MfsGetInternDataPtr(), MfsLinBreakLength13, MfsLinBreakLength14, MfsLinBreakLength15, MfsLinBreakLength16, MfsLinDelimiterLength1, MfsLinDelimiterLength2, MfsLinDelimiterLength3, MfsLinDelimiterLength4, and Ok.

Here is the call graph for this function:

en_result_t Mfs_Lin_SetBreakDetIntEnable ( volatile stc_mfsn_t *  pstcLin,
boolean_t  bEnable 
)

Enable or disable LIN Break field detection interrupt for LIN The Function sets or clears LBIE bit of ESCR for LIN.

Parameters
[in]pstcLinPointer to LIN (MFS) instance register area
[in]bEnableSetting for LIN Break field detection interrupt FALSE:Disable, TRUE:Enable
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcLin == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 3909 of file mfs.c.

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

Here is the call graph for this function:

uint16_t Mfs_ReadData ( volatile stc_mfsn_t *  pstcMfs)

Read data from Received Data Register (RDR). The received data is read from Received Data Register (RDR) and return for MFS (UART/CSIO/LIN/I2C).

Note
This function access to 16 bits RDR. If RDR is accessed by upper 16 bits (for CSIO), the function of Mfs_Csio_ReadData32() should be used.
Parameters
[in]pstcMfsPointer to MFS instance register area
Return values
theValue of Received Data Register (RDR, 16bit)

Definition at line 4609 of file mfs.c.

References MfsGetInternDataPtr().

Here is the call graph for this function:

en_result_t Mfs_ResetFifo ( volatile stc_mfsn_t *  pstcMfs,
uint8_t  u8FifoNumber 
)

Reset FIFO funtion This Function resets dedicated FIFO of MFS.

Parameters
[in]pstcMfsPointer to MFS instance register area
[in]u8FifoNumberNumber of FIFO to reset
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcUart == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))
  • u8FifoNumber != MfsFifo1, MfsFifo2

Definition at line 4842 of file mfs.c.

References ErrorInvalidParameter, MfsFifo1, MfsFifo2, MfsGetInternDataPtr(), Ok, and TRUE.

Here is the call graph for this function:

en_result_t Mfs_SetBGR ( volatile stc_mfsn_t *  pstcMfs,
uint16_t  u16BGR 
)

Set value to Baud rate Generator Register This Function sets value to BGR.

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

Definition at line 5404 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_SetEIBCR ( volatile stc_mfsn_t *  pstcMfs,
uint8_t  u8EIBCR 
)

Set value to Extended I2C Bus Control Register This Function can set value to EIBCR.

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

Definition at line 6248 of file mfs.c.

References ErrorInvalidParameter, MFS_EIBCR_WRT_MASK, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_SetESCR ( volatile stc_mfsn_t *  pstcMfs,
uint8_t  u8ESCR 
)

Set value to Extended Serial Control Register This Function sets value to ESCR.

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

Definition at line 5327 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_SetFCR0 ( volatile stc_mfsn_t *  pstcMfs,
uint8_t  u8FCR0 
)

Set value to Fifo Control Register 0 This Function can set value to FCR0.

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

Definition at line 5558 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_SetFCR1 ( volatile stc_mfsn_t *  pstcMfs,
uint8_t  u8FCR1 
)

Set value to Fifo Control Register 1 This Function sets value to FCR1.

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

Definition at line 5481 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_SetFifoEnable ( volatile stc_mfsn_t *  pstcMfs,
uint8_t  u8FifoNumber,
boolean_t  bEnable 
)

Enable or disable FIFO funtion This Function sets or clears FE1/FE2 bit of MFS.

Parameters
[in]pstcMfsPointer to MFS instance register area
[in]u8FifoNumberNumber of FIFO to enable
[in]bEnableSetting for FIFO FALSE:Disable, TRUE:Enable
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcUart == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))
  • u8FifoNumber != MfsFifo1, MfsFifo2

Definition at line 4899 of file mfs.c.

References ErrorInvalidParameter, FALSE, MfsFifo1, MfsFifo2, MfsGetInternDataPtr(), Ok, and TRUE.

Here is the call graph for this function:

en_result_t Mfs_SetISBA ( volatile stc_mfsn_t *  pstcMfs,
uint8_t  u8ISBA 
)

Set value to 7-bit Slave Address Register This Function can set value to ISBA.

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

Definition at line 6060 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_SetISMK ( volatile stc_mfsn_t *  pstcMfs,
uint8_t  u8ISMK 
)

Set value to 7-bit Slave Address Mask Register This Function can set value to ISMK.

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

Definition at line 6137 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_SetRxEnable ( volatile stc_mfsn_t *  pstcMfs,
boolean_t  bEnable 
)

Enable or disable RX This Function sets or clears RXE bit of SCR for MFS (UART/CSIO/LIN).

Parameters
[in]pstcMfsPointer to MFS instance register area
[in]bEnableSetting for RX FALSE:Disable, TRUE:Enable
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcMfs == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 4430 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_SetRxIntCallBack ( volatile stc_mfsn_t *  pstcMfs,
mfs_rx_cb_func_ptr_t  pfnRxCbFunc 
)

Set RX ISR callback funtion.

The Function can set the RX callback function

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

Definition at line 6364 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), Ok, and stc_mfs_intern_data::pfnReceiveCbFunction.

Referenced by Mfs_Hl_Csio_DeInit(), Mfs_Hl_Csio_Init(), Mfs_Hl_I2c_DeInit(), Mfs_Hl_I2c_Init(), Mfs_Hl_Lin_Init(), Mfs_Hl_Uart_DeInit(), and Mfs_Hl_Uart_Init().

Here is the call graph for this function:

Here is the caller graph for this function:

en_result_t Mfs_SetRxIntEnable ( volatile stc_mfsn_t *  pstcMfs,
boolean_t  bEnable 
)

Enable or disable RX interrupt This Function sets or clears RIE bit of SCR for MFS (UART/CSIO/LIN).

Parameters
[in]pstcMfsPointer to MFS instance register area
[in]bEnableSetting for RX interrupt FALSE:Disable, TRUE:Enable
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcMfs == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 4222 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_SetSACSR ( volatile stc_mfsn_t *  pstcMfs,
uint16_t  u16SACSR 
)

Set value to Serial Assistant Status Control Register This Function can set value to SACSR.

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

Definition at line 5789 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_SetSCR ( volatile stc_mfsn_t *  pstcMfs,
uint8_t  u8SCR 
)

Set value to Serial Control Register This Function sets value to SCR.

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

Definition at line 5250 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_SetSCSCR ( volatile stc_mfsn_t *  pstcMfs,
uint16_t  u16SCSCR 
)

Set value to Serial Chip Select Control Register This Function can set value to SCSCR.

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

Definition at line 5900 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_SetSCSTR10 ( volatile stc_mfsn_t *  pstcMfs,
uint16_t  u16SCSTR10 
)

Set value to Serial Chip Select Timing Register 1-0 This Function can set value to SCSTR10.

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

Definition at line 5635 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_SetSCSTR32 ( volatile stc_mfsn_t *  pstcMfs,
uint16_t  u16SCSTR32 
)

Set value to Serial Chip Select Timing Register 3-2 This Function can set value to SCSTR32.

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

Definition at line 5712 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_SetSerialOutputEnable ( volatile stc_mfsn_t *  pstcMfs,
boolean_t  bEnable 
)

Enable or disable serial output This Function sets or clears SOE bit of SMR for MFS (UART/CSIO/LIN).

Parameters
[in]pstcMfsPointer to MFS instance register area
[in]bEnableSetting for serial output FALSE:Disable, TRUE:Enable
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcMfs == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 4078 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_SetSMR ( volatile stc_mfsn_t *  pstcMfs,
uint8_t  u8SMR 
)

Set value to Serial Mode Register This Function sets value to SMR.

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

Definition at line 5173 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_SetStsIntCallBack ( volatile stc_mfsn_t *  pstcMfs,
mfs_sts_cb_func_ptr_t  pfnStsCbFunc 
)

Set Status ISR callback funtion.

The Function can set the Status callback function

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

Definition at line 6403 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), Ok, and stc_mfs_intern_data::pfnStatusCbFunction.

Referenced by Mfs_Hl_Csio_DeInit(), Mfs_Hl_Csio_Init(), Mfs_Hl_I2c_DeInit(), Mfs_Hl_I2c_Init(), Mfs_Hl_Lin_Init(), and Mfs_Hl_Uart_DeInit().

Here is the call graph for this function:

Here is the caller graph for this function:

en_result_t Mfs_SetTBYTE0 ( volatile stc_mfsn_t *  pstcMfs,
uint8_t  u8TBYTE0 
)

Set value to Transmission Byte 0 This Function can set value to TBYTE0.

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

Definition at line 5978 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

en_result_t Mfs_SetTxBusIdleIntEnable ( volatile stc_mfsn_t *  pstcMfs,
boolean_t  bEnable 
)

Enable or disable TX bus idle interrupt The Function sets or clears TBIE bit of SCR for MFS (UART/CSIO/LIN).

Parameters
[in]pstcMfsPointer to MFS instance register area
[in]bEnableSetting for TX bus idle interrupt FALSE:Disable, TRUE:Enable
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcMfs == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 4326 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_SetTxEnable ( volatile stc_mfsn_t *  pstcMfs,
boolean_t  bEnable 
)

Enable or disable TX This Function sets or clears TXE bit of SCR for MFS (UART/CSIO/LIN).

Parameters
[in]pstcMfsPointer to MFS instance register area
[in]bEnableSetting for TX FALSE:Disable, TRUE:Enable
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcMfs == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 4482 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_SetTxFifoIntEnable ( volatile stc_mfsn_t *  pstcMfs,
boolean_t  bEnable 
)

Enable or disable TX FIFO interrupt The Function sets or clears FTIE bit of FCR1 for MFS (UART/CSIO/LIN).

Parameters
[in]pstcMfsPointer to MFS instance register area
[in]bEnableSetting for TX FIFO interrupt FALSE:Disable, TRUE:Enable
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcMfs == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 4378 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_SetTxIntCallBack ( volatile stc_mfsn_t *  pstcMfs,
mfs_tx_cb_func_ptr_t  pfnTxCbFunc 
)

Set TX ISR callback funtion.

The Function can set the TX callback function

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

Definition at line 6325 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), Ok, and stc_mfs_intern_data::pfnTransmitCbFunction.

Referenced by Mfs_Hl_Csio_DeInit(), Mfs_Hl_Csio_Init(), Mfs_Hl_I2c_DeInit(), Mfs_Hl_I2c_Init(), Mfs_Hl_Lin_Init(), Mfs_Hl_Uart_DeInit(), and Mfs_Hl_Uart_Init().

Here is the call graph for this function:

Here is the caller graph for this function:

en_result_t Mfs_SetTxIntEnable ( volatile stc_mfsn_t *  pstcMfs,
boolean_t  bEnable 
)

Enable or disable TX interrupt The Function sets or clears TIE bit of SCR for MFS (UART/CSIO/LIN).

Parameters
[in]pstcMfsPointer to MFS instance register area
[in]bEnableSetting for TX interrupt FALSE:Disable, TRUE:Enable
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcMfs == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 4274 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_SetUpperLayerHandle ( volatile stc_mfsn_t *  pstcMfs,
void *  pvHandle 
)

Set handle for upper layer.

The Function set the pointer to handle (internal data) for upper layer

Parameters
[in]pstcMfsPointer to MFS instance register area
[in]pvHandlePointer to handle(internal data) for upper layer
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcMfs == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 6442 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), Ok, and stc_mfs_intern_data::pvUpperLayerHandle.

Referenced by Mfs_Hl_Csio_DeInit(), Mfs_Hl_Csio_Init(), Mfs_Hl_I2c_DeInit(), Mfs_Hl_I2c_Init(), Mfs_Hl_Lin_Init(), Mfs_Hl_Uart_DeInit(), and Mfs_Hl_Uart_Init().

Here is the call graph for this function:

Here is the caller graph for this function:

en_result_t Mfs_SetWakeUpControlEnable ( volatile stc_mfsn_t *  pstcMfs,
boolean_t  bEnable 
)

Enable or disable wake up function This Function sets or clears WUCR bit of SMR for MFS (UART/LIN).

Parameters
[in]pstcMfsPointer to MFS instance register area
[in]bEnableSetting for serial output FALSE:Disable, TRUE:Enable
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcMfs == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 4130 of file mfs.c.

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

Here is the call graph for this function:

en_result_t Mfs_SoftwareReset ( volatile stc_mfsn_t *  pstcMfs)

Software Reset This Function initializes the MFS (UART/CSIO/LIN) internal state.

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

Definition at line 4180 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), Ok, and TRUE.

Here is the call graph for this function:

en_result_t Mfs_Uart_DeInit ( volatile stc_mfsn_t *  pstcUart)

Deinitialisation of a MFS module activating as UART.

All used uart register are reset to their default values.

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

Definition at line 1072 of file mfs.c.

References ErrorInvalidParameter, FALSE, Mfs_DeInitIrq(), MfsGetInternDataPtr(), Ok, stc_mfs_intern_data::pfnReceiveCbFunction, stc_mfs_intern_data::pfnStatusCbFunction, stc_mfs_intern_data::pfnTransmitCbFunction, stc_mfs_intern_data::pvUpperLayerHandle, and TRUE.

Referenced by Mfs_Lin_DeInit().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Initialisation of a MFS module to activate as UART.

Set registers to active MFS as UART.

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

Definition at line 919 of file mfs.c.

References stc_mfs_uart_config::bBitDirection, stc_mfs_uart_config::bHwFlow, stc_mfs_uart_config::bSignalSystem, ErrorInvalidParameter, FALSE, MFS_DATA_LEN_5, MFS_DATA_LEN_6, MFS_DATA_LEN_7, MFS_DATA_LEN_8, MFS_DATA_LEN_9, MFS_MD_UART_MULTI, MFS_MD_UART_NORNAL, Mfs_Uart_SetBaudRate(), MfsEightBits, MfsFiveBits, MfsFourStopBits, MfsGetInternDataPtr(), MfsNineBits, MfsOneStopBit, MfsParityEven, MfsParityNone, MfsParityOdd, MfsSevenBits, MfsSixBits, MfsThreeStopBits, MfsTwoStopBits, MfsUartMulti, MfsUartNormal, Ok, TRUE, stc_mfs_uart_config::u32DataRate, stc_mfs_uart_config::u8CharLength, stc_mfs_uart_config::u8Parity, stc_mfs_uart_config::u8StopBit, and stc_mfs_uart_config::u8UartMode.

Here is the call graph for this function:

en_result_t Mfs_Uart_SetBaudRate ( volatile stc_mfsn_t *  pstcUart,
uint32_t  u32BaudRate 
)

Set baud rate for UART This Function sets baud rate for UART (MFS).

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

Definition at line 1143 of file mfs.c.

References ErrorInvalidParameter, ErrorUninitialized, MFS_BGR_MASK, Mfs_GetReloadValue(), MFS_NUM_4, MfsGetInternDataPtr(), and Ok.

Referenced by Mfs_Uart_Init().

Here is the call graph for this function:

Here is the caller graph for this function:

en_result_t Mfs_WriteData ( volatile stc_mfsn_t *  pstcMfs,
const uint16_t  u16Data 
)

Write data to Transmit Data Register (TDR). The data provided by Mfs_WriteData::u16Data is written into the Transmit Data Register (TDR) for MFS (UART/CSIO/LIN/I2C).

Note
This function access to 16 bits TDR. If TDR is accessed by upper 16 bits (for CSIO), the function of Mfs_Csio_WriteData32() should be used.
Parameters
[in]pstcMfsPointer to MFS instance register area
[in]u16DataData to write to Transmit Data Register
Return values
OkProcess successfully done.
ErrorInvalidParameterIf one of following conditions are met:
  • pstcMfs == NULL
  • pu16Data == NULL
  • pstcMfsInternData == NULL (invalid or disabled MFS unit (PDL_PERIPHERAL_ENABLE_MFS))

Definition at line 4654 of file mfs.c.

References ErrorInvalidParameter, MfsGetInternDataPtr(), and Ok.

Here is the call graph for this function:

static stc_mfs_intern_data_t * MfsGetInternDataPtr ( volatile stc_mfsn_t *  pstcMfs)
static

Return the internal data for a certain MFS instance.

Parameters
pstcMfsPointer to MFS instance
Returns
Pointer to internal data or NULL if instance is not enabled (or not known)

Definition at line 233 of file mfs.c.

References MfsInstanceIndexMax, and stc_mfs_instance_data::stcInternData.

Referenced by Mfs_ClrTxFifoReqStatus(), Mfs_ConfigFifo(), Mfs_Csio_ClrChipSelectErr(), Mfs_Csio_ClrTimerIntReq(), Mfs_Csio_DeInit(), Mfs_Csio_GetSerialTimer(), Mfs_Csio_GetStatus(), Mfs_Csio_Init(), Mfs_Csio_ReadData32(), Mfs_Csio_SetBaudRate(), Mfs_Csio_SetChipSelectEnable(), Mfs_Csio_SetChipSelectErrEnable(), Mfs_Csio_SetChipSelectErrIntEnable(), Mfs_Csio_SetChipSelectOutEnable(), Mfs_Csio_SetCmpVal4SerialTimer(), Mfs_Csio_SetCsHold(), Mfs_Csio_SetCsInActiveLevel(), Mfs_Csio_SetCsTimingConfig(), Mfs_Csio_SetCsTimingPrescale(), Mfs_Csio_SetSckOutEnable(), Mfs_Csio_SetSerialTimerEnable(), Mfs_Csio_SetSerialTimerIntEnable(), Mfs_Csio_SetSyncTransEnable(), Mfs_Csio_SetTimerPrescale(), Mfs_Csio_SetTxLength(), Mfs_Csio_WriteData32(), Mfs_ErrorClear(), Mfs_GetBGR(), Mfs_GetEIBCR(), Mfs_GetESCR(), Mfs_GetFCR0(), Mfs_GetFCR1(), Mfs_GetFifoBytes(), Mfs_GetISBA(), Mfs_GetISMK(), Mfs_GetNFCR(), Mfs_GetSACSR(), Mfs_GetSCR(), Mfs_GetSCSCR(), Mfs_GetSCSTR10(), Mfs_GetSCSTR32(), Mfs_GetSMR(), Mfs_GetStatus(), Mfs_GetSTMCR(), Mfs_GetTBYTE0(), Mfs_GetTxFifoReqStatus(), Mfs_I2c_ClearIntStatus(), Mfs_I2c_DeInit(), Mfs_I2c_GetBusErrStatus(), Mfs_I2c_GetIntStatus(), Mfs_I2c_Init(), Mfs_I2c_SetAckEnable(), Mfs_I2c_SetBaudRate(), Mfs_I2c_SetBusErrorControlEnable(), Mfs_I2c_SetCondDetIntEnable(), Mfs_I2c_SetDmaModeEnable(), Mfs_I2c_SetI2cEnable(), Mfs_I2c_SetIntEnable(), Mfs_I2c_SetNoizeFilter(), Mfs_I2c_SetRxIntEnable(), Mfs_I2c_SetSclOutLevel(), Mfs_I2c_SetSdaOutLevel(), Mfs_I2c_SetSerlalOutEnable(), Mfs_I2c_SetSlvAddrEnable(), Mfs_I2c_SetTransmitEmpty(), Mfs_I2c_SetTxIntEnable(), Mfs_I2c_SetWaitSelect(), Mfs_Lin_ClearBreakDetFlag(), Mfs_Lin_Init(), Mfs_Lin_SetBreak(), Mfs_Lin_SetBreakConfig(), Mfs_Lin_SetBreakDetIntEnable(), Mfs_ReadData(), Mfs_ResetFifo(), Mfs_SetBGR(), Mfs_SetEIBCR(), Mfs_SetESCR(), Mfs_SetFCR0(), Mfs_SetFCR1(), Mfs_SetFifoEnable(), Mfs_SetISBA(), Mfs_SetISMK(), Mfs_SetRxEnable(), Mfs_SetRxIntCallBack(), Mfs_SetRxIntEnable(), Mfs_SetSACSR(), Mfs_SetSCR(), Mfs_SetSCSCR(), Mfs_SetSCSTR10(), Mfs_SetSCSTR32(), Mfs_SetSerialOutputEnable(), Mfs_SetSMR(), Mfs_SetStsIntCallBack(), Mfs_SetTBYTE0(), Mfs_SetTxBusIdleIntEnable(), Mfs_SetTxEnable(), Mfs_SetTxFifoIntEnable(), Mfs_SetTxIntCallBack(), Mfs_SetTxIntEnable(), Mfs_SetUpperLayerHandle(), Mfs_SetWakeUpControlEnable(), Mfs_SoftwareReset(), Mfs_Uart_DeInit(), Mfs_Uart_Init(), Mfs_Uart_SetBaudRate(), and Mfs_WriteData().

void MfsIrqHandlerRx ( volatile stc_mfsn_t *  pstcMfs,
stc_mfs_intern_data_t *  pstcMfsInternData 
)

MFS receive interrupt service routine.

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

Definition at line 848 of file mfs.c.

References stc_mfs_intern_data::pfnReceiveCbFunction, and stc_mfs_intern_data::pvUpperLayerHandle.

void MfsIrqHandlerStatus ( volatile stc_mfsn_t *  pstcMfs,
stc_mfs_intern_data_t *  pstcMfsInternData 
)

MFS status interrupt service routine.

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

Definition at line 888 of file mfs.c.

References stc_mfs_intern_data::pfnStatusCbFunction, and stc_mfs_intern_data::pvUpperLayerHandle.

void MfsIrqHandlerTx ( volatile stc_mfsn_t *  pstcMfs,
stc_mfs_intern_data_t *  pstcMfsInternData 
)

MFS transmit interrupt service routine.

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

Definition at line 868 of file mfs.c.

References stc_mfs_intern_data::pfnTransmitCbFunction, and stc_mfs_intern_data::pvUpperLayerHandle.

Variable Documentation

stc_mfs_instance_data_t m_astcMfsInstanceDataLut[MfsInstanceIndexMax]

Look-up table for all enabled MFS instances and their internal data.

Definition at line 107 of file mfs.c.

stc_mfs_instance_data_t m_astcMfsInstanceDataLut[MfsInstanceIndexMax]

Look-up table for all enabled MFS instances and their internal data.

Definition at line 107 of file mfs.c.