![]() |
PDL for FM4
Version1.2
Peripheral Driverl Library for FM4
|
#include "pdl.h"

Go to the source code of this file.
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 | 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... | |
Functions | |
| void | MfsIrqHandlerTx (volatile stc_mfsn_t *pstcMfs, stc_mfs_intern_data_t *pstcMfsInternData) |
| MFS transmit interrupt service routine. More... | |
| void | MfsIrqHandlerRx (volatile stc_mfsn_t *pstcMfs, stc_mfs_intern_data_t *pstcMfsInternData) |
| MFS receive 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... | |
| 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... | |
| 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... | |
| 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... | |
| 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... | |
| 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... | |
| 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... | |
| 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... | |
| 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... | |
| 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... | |
| 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... | |
| 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... | |
| 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... | |
| 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... | |
| 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... | |
| 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_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... | |
| 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_SetTxIntCallBack (volatile stc_mfsn_t *pstcMfs, mfs_tx_cb_func_ptr_t pfnTxCbFunc) |
| Set TX 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... | |