![]() |
MINI55_BSP V3.02.004
The Board Support Package for Mini55 Series MCU
|

Macros | |
| #define | ADC_CONFIG_CH7(adc, u32Source) |
| Configure the analog input source of channel 7. More... | |
| #define | ADC_GET_CONVERSION_DATA(adc, u32ChNum) |
| Get the latest ADC conversion data. More... | |
| #define | ADC_GET_INT_FLAG(adc, u32Mask) |
| Return the user-specified interrupt flags. More... | |
| #define | ADC_CLR_INT_FLAG(adc, u32Mask) |
| This macro clear the selected interrupt status bits. More... | |
| #define | ADC_IS_BUSY(adc) |
| Get the busy state of ADC. More... | |
| #define | ADC_IS_DATA_OVERRUN(adc, u32ChNum) |
| Check if the ADC conversion data is over written or not. More... | |
| #define | ADC_IS_DATA_VALID(adc, u32ChNum) |
| Check if the ADC conversion data is valid or not. More... | |
| #define | ADC_POWER_DOWN(adc) |
| Power down ADC module. More... | |
| #define | ADC_POWER_ON(adc) |
| Power on ADC module. More... | |
| #define | ADC_ENABLE_CMP0(adc, u32ChNum, u32Condition, u32Data, u32MatchCount) |
| Configure the comparator 0 and enable it. More... | |
| #define | ADC_DISABLE_CMP0(adc) |
| Disable comparator 0. More... | |
| #define | ADC_ENABLE_CMP1(adc, u32ChNum, u32Condition, u32Data, u32MatchCount) |
| Configure the comparator 1 and enable it. More... | |
| #define | ADC_DISABLE_CMP1(adc) |
| Disable comparator 1. More... | |
| #define | ADC_SET_INPUT_CHANNEL(adc, u32Mask) |
| Set ADC input channel. Enabled channel will be converted while ADC starts. More... | |
| #define | ADC_START_CONV(adc) |
| Start the A/D conversion. More... | |
| #define | ADC_STOP_CONV(adc) |
| Stop the A/D conversion. More... | |
Functions | |
| void | ADC_Open (ADC_T *adc, uint32_t u32InputMode, uint32_t u32OpMode, uint32_t u32ChMask) |
| This API configures ADC module to be ready for convert the input from selected channel. More... | |
| void | ADC_Close (ADC_T *adc) |
| Disable ADC module. More... | |
| void | ADC_EnableHWTrigger (ADC_T *adc, uint32_t u32Source, uint32_t u32Param) |
| Configure the hardware trigger condition and enable hardware trigger. More... | |
| void | ADC_DisableHWTrigger (ADC_T *adc) |
| Disable hardware trigger ADC function. More... | |
| void | ADC_SetExtraSampleTime (ADC_T *adc, uint32_t u32ChNum, uint32_t u32SampleTime) |
| Set ADC sample time for designated channel. More... | |
| void | ADC_EnableInt (ADC_T *adc, uint32_t u32Mask) |
| Enable the interrupt(s) selected by u32Mask parameter. More... | |
| void | ADC_DisableInt (ADC_T *adc, uint32_t u32Mask) |
| Disable the interrupt(s) selected by u32Mask parameter. More... | |
| void | ADC_SeqModeEnable (ADC_T *adc, uint32_t u32SeqTYPE, uint32_t u32ModeSel) |
| ADC PWM Sequential Mode Control. More... | |
| void | ADC_SeqModeTriggerSrc (ADC_T *adc, uint32_t u32SeqModeTrgSrc1, uint32_t u32Trg1Type, uint32_t u32SeqModeTrgSrc2, uint32_t u32Trg2Type) |
| ADC PWM Sequential Mode PWM Trigger Source and type. More... | |
| #define ADC_CLR_INT_FLAG | ( | adc, | |
| u32Mask | |||
| ) |
This macro clear the selected interrupt status bits.
| [in] | adc | Base address of ADC module |
| [in] | u32Mask | The combination of following interrupt status bits. Each bit corresponds to a interrupt status. |
| #define ADC_CONFIG_CH7 | ( | adc, | |
| u32Source | |||
| ) |
Configure the analog input source of channel 7.
| [in] | adc | Base address of ADC module |
| [in] | u32Source | Decides the analog input source of channel 7, valid values are |
| #define ADC_DISABLE_CMP0 | ( | adc | ) |
| #define ADC_DISABLE_CMP1 | ( | adc | ) |
| #define ADC_ENABLE_CMP0 | ( | adc, | |
| u32ChNum, | |||
| u32Condition, | |||
| u32Data, | |||
| u32MatchCount | |||
| ) |
Configure the comparator 0 and enable it.
| [in] | adc | Base address of ADC module |
| [in] | u32ChNum | Specifies the source channel, valid value are from 0 to 7 |
| [in] | u32Condition | Specifies the compare condition |
| [in] | u32Data | Specifies the compare value. Valid value are between 0 ~ 0x3FF |
| [in] | u32MatchCount | Specifies the match count setting, valid values are between 1~16 |
For example, ADC_ENABLE_CMP0(ADC, 5, ADC_CMP_GREATER_OR_EQUAL_TO, 0x800, 10); Means ADC will assert comparator 0 flag if channel 5 conversion result is greater or equal to 0x800 for 10 times continuously.
| #define ADC_ENABLE_CMP1 | ( | adc, | |
| u32ChNum, | |||
| u32Condition, | |||
| u32Data, | |||
| u32MatchCount | |||
| ) |
Configure the comparator 1 and enable it.
| [in] | adc | Base address of ADC module |
| [in] | u32ChNum | Specifies the source channel, valid value are from 0 to 7 |
| [in] | u32Condition | Specifies the compare condition |
| [in] | u32Data | Specifies the compare value. Valid value are between 0 ~ 0x3FF |
| [in] | u32MatchCount | Specifies the match count setting, valid values are between 1~16 |
For example, ADC_ENABLE_CMP1(ADC, 5, ADC_CMP_GREATER_OR_EQUAL_TO, 0x800, 10); Means ADC will assert comparator 1 flag if channel 5 conversion result is greater or equal to 0x800 for 10 times continuously.
| #define ADC_GET_CONVERSION_DATA | ( | adc, | |
| u32ChNum | |||
| ) |
| #define ADC_GET_INT_FLAG | ( | adc, | |
| u32Mask | |||
| ) |
Return the user-specified interrupt flags.
| [in] | adc | Base address of ADC module |
| [in] | u32Mask | The combination of following interrupt status bits. Each bit corresponds to a interrupt status. |
| #define ADC_IS_BUSY | ( | adc | ) |
| #define ADC_IS_DATA_OVERRUN | ( | adc, | |
| u32ChNum | |||
| ) |
| #define ADC_IS_DATA_VALID | ( | adc, | |
| u32ChNum | |||
| ) |
| #define ADC_POWER_DOWN | ( | adc | ) |
| #define ADC_POWER_ON | ( | adc | ) |
| #define ADC_SET_INPUT_CHANNEL | ( | adc, | |
| u32Mask | |||
| ) |
Set ADC input channel. Enabled channel will be converted while ADC starts.
| [in] | adc | Base address of ADC module |
| [in] | u32Mask | Channel enable bit. Each bit corresponds to a input channel. Bit 0 is channel 0, bit 1 is channel 1... |
| #define ADC_START_CONV | ( | adc | ) |
| #define ADC_STOP_CONV | ( | adc | ) |
| void ADC_Close | ( | ADC_T * | adc | ) |
| void ADC_DisableHWTrigger | ( | ADC_T * | adc | ) |
| void ADC_DisableInt | ( | ADC_T * | adc, |
| uint32_t | u32Mask | ||
| ) |
Disable the interrupt(s) selected by u32Mask parameter.
| [in] | adc | Base address of ADC module |
| [in] | u32Mask | The combination of interrupt status bits listed below. Each bit corresponds to a interrupt status. This parameter decides which interrupts will be disabled. |
| void ADC_EnableHWTrigger | ( | ADC_T * | adc, |
| uint32_t | u32Source, | ||
| uint32_t | u32Param | ||
| ) |
Configure the hardware trigger condition and enable hardware trigger.
| [in] | adc | Base address of ADC module |
| [in] | u32Source | Decides the hardware trigger source. Valid values are: |
| [in] | u32Param | While ADC trigger by PWM, this parameter is used to set the delay between PWM trigger and ADC conversion. Valid values are from 0 ~ 0xFF, and actual delay time is (4 * u32Param * HCLK). While ADC trigger by external pin, this parameter is used to set trigger condition. Valid values are: |
| void ADC_EnableInt | ( | ADC_T * | adc, |
| uint32_t | u32Mask | ||
| ) |
Enable the interrupt(s) selected by u32Mask parameter.
| [in] | adc | Base address of ADC module |
| [in] | u32Mask | The combination of interrupt status bits listed below. Each bit corresponds to a interrupt status. This parameter decides which interrupts will be enabled. |
| void ADC_Open | ( | ADC_T * | adc, |
| uint32_t | u32InputMode, | ||
| uint32_t | u32OpMode, | ||
| uint32_t | u32ChMask | ||
| ) |
This API configures ADC module to be ready for convert the input from selected channel.
| [in] | adc | Base address of ADC module |
| [in] | u32InputMode | This parameter is unused |
| [in] | u32OpMode | This parameter is unused |
| [in] | u32ChMask | Channel enable bit. Each bit corresponds to a input channel. Bit 0 is channel 0, bit 1 is channel 1... |
| void ADC_SeqModeEnable | ( | ADC_T * | adc, |
| uint32_t | u32SeqTYPE, | ||
| uint32_t | u32ModeSel | ||
| ) |
ADC PWM Sequential Mode Control.
| [in] | adc | Base address of ADC module |
| [in] | u32SeqTYPE | This parameter decides which type will be selected. |
| [in] | u32ModeSel | This parameter decides which mode will be selected. |
| void ADC_SeqModeTriggerSrc | ( | ADC_T * | adc, |
| uint32_t | u32SeqModeTrgSrc1, | ||
| uint32_t | u32Trg1Type, | ||
| uint32_t | u32SeqModeTrgSrc2, | ||
| uint32_t | u32Trg2Type | ||
| ) |
ADC PWM Sequential Mode PWM Trigger Source and type.
| [in] | adc | Base address of ADC module |
| [in] | u32SeqModeTrgSrc1 | This parameter decides first PWM trigger source. |
| [in] | u32Trg1Type | This parameter decides second PWM trigger type. |
| [in] | u32SeqModeTrgSrc2 | This parameter decides first PWM trigger source. |
| [in] | u32Trg2Type | This parameter decides second PWM trigger type. |
| void ADC_SetExtraSampleTime | ( | ADC_T * | adc, |
| uint32_t | u32ChNum, | ||
| uint32_t | u32SampleTime | ||
| ) |
Set ADC sample time for designated channel.
| [in] | adc | Base address of ADC module |
| [in] | u32ChNum | This parameter is not used |
| [in] | u32SampleTime | ADC sample ADC time, valid values are |