3.3.4 Peripheral Library Interface
EMAFE peripheral library provides the following interfaces:
| Name | Description |
|---|---|
| EMAFE_Initialize | Initializes the EMAFE peripheral. |
| EMAFE_Reset | Resets the EMAFE peripheral by using EMAFE_NRESET GPIO. |
| EMAFE_SoftReset | Resets the EMAFE peripheral by using peripheral register. |
| EMAFE_SetSincDecimationFiltersReset | Enters/exits the reset state of low-pass filters. |
| EMAFE_EnableFilter | Enables the corresponding low-pass filter. |
| EMAFE_DisableFilter | Disables the corresponding low-pass filter. |
| EMAFE_EnableDMAChannel | Enables the corresponding DMA channel. |
| EMAFE_DisableDMAChannel | Disables the corresponding DMA channel. |
| EMAFE_GetDataChannel | Get the last sample of the corresponding low-pass filter. |
| EMAFE_GetAllDataChannel | Get the last samples of all low-pass filters. |
| EMAFE_EnableVariationDetection | Enables the detection of variation of the filtered data. |
| EMAFE_DisableVariationDetection | Disables the detection of variation of the filtered data. |
| EMAFE_IsEnableVariationDetection | Check if the detection of variation has been enabled. |
| EMAFE_SetDifferenceComparisonMode | Set the comparison mode between two channels. |
| EMAFE_SetDataFormat | Set data format of the captured samples. |
| EMAFE_SetClockPrescalerRatio | Set the clock prescaler ratio in the low-pass filter. |
| EMAFE_SetOSR | Set OSR of the decimation filters. |
| EMAFE_SetComparisonModeChannelA | Set the comparison mode between channel A and two thresholds. |
| EMAFE_SetComparisonModeChannelB | Set the comparison mode between channel B and two thresholds. |
| EMAFE_EnableInterrupt | Enables interrupt flags. |
| EMAFE_DisableInterrupt | Disables interrupt flags. |
| EMAFE_GetInterruptMask | Read interrupt flags mask. |
| EMAFE_GetInterruptSatus | Read interrupt flags status. |
| EMAFE_GetStatus | Read comparison events on Channel A and B. |
| EMAFE_WriteProtectionSet | Set write protection mode. |
| EMAFE_WriteProtectionGet | Get write protection state. |
| EMAFE_CallbackRegister | Sets a callback function that is called when interrupt is raised. |
| Name | Description |
|---|---|
| EMAFE_ADCI0Enable | Enable ADC I0. |
| EMAFE_ADCI0Disable | Disable ADC I0. |
| EMAFE_ADCI0IsEnable | Check if ADC I0 is enabled. |
| EMAFE_ADCI1Enable | Enable ADC I1. |
| EMAFE_ADCI1Disable | Disable ADC I1. |
| EMAFE_ADCI1IsEnable | Check if ADC I1 is enabled. |
| EMAFE_ADCV1Enable | Enable ADC V1. |
| EMAFE_ADCV1Disable | Disable ADC V1. |
| EMAFE_ADCV1IsEnable | Check if ADC V1 is enabled. |
| EMAFE_ADCI2Enable | Enable ADC I2. |
| EMAFE_ADCI2Disable | Disable ADC I2. |
| EMAFE_ADCI2IsEnable | Check if ADC I2 is enabled. |
| EMAFE_ADCV2Enable | Enable ADC V2. |
| EMAFE_ADCV2Disable | Disable ADC V2. |
| EMAFE_ADCV2IsEnable | Check if ADC V2 is enabled. |
| EMAFE_ADCSetClockConfig | Set ADC clocks configuration. |
| EMAFE_ADCEnableBIAS | Enable Current Bias Generator. |
| EMAFE_ADCDisableBIAS | Disable Current Bias Generator. |
| EMAFE_ADCIsBIASEnable | Check if Current Bias Generator is enabled. |
| EMAFE_ADCEnableREF | Enable Voltage Reference. |
| EMAFE_ADCDisableREF | Disable Voltage Reference. |
| EMAFE_ADCIsREFEnable | Check if Voltage Reference is enabled. |
| EMAFE_ADCEnableLDO | Enable internal LDO. |
| EMAFE_ADCDisableLDO | Disable internal LDO |
| EMAFE_ADCIsLDOEnable | Check if internal LDO is enabled. |
| EMAFE_ADCIsAnalogSystemReady | Check if analog system is ready. |
| EMAFE_ADCEnableSoftReset | Set ADCs in reset state. |
| EMAFE_ADCDisableSoftReset | Exits the ADCs reset state. |
| EMAFE_ADCSetSecurityControls | Configure the security options of the analog system. |
| EMAFE_ADCGetSecurityControls | Get the security options of the analog system. |
| EMAFE_ADCGGetVREFLowTemp | Get the Voltage Reference at low temperature. |
| EMAFE_ADCGGetTEMPLowTemp | Get the Temperature Sensor at low temperature. |
| EMAFE_ADCGGetVREFHighTemp | Get the Voltage Reference at high temperature. |
| EMAFE_ADCGGetTEMPHighTemp | Get the Temperature Sensor at high temperature. |
| Name | Type | Description |
|---|---|---|
| EMAFE_STATUS | Enum | Identifies the EMAFE status. |
| EMAFE_CHANNEL_ID | Enum | Identifies the EMAFE channel. |
| EMAFE_COMP_CHANNEL_ID | Enum | Identifies the channel used to perform a comparison. |
| EMAFE_DIFF_COMPARISON_TYPE | Enum | Identifies the type of comparison between two channels. |
| EMAFE_DIFF_COMPARISON_DATA | Struct | Describes the data used to perform a comparison between two channels. |
| EMAFE_CONDITION_TYPE | Enum | Identifies the condition applied for detection on channel A/B. |
| EMAFE_COMPARISON_DATA | Struct | Describes the data used to perform a comparison between one channel and threshold. |
