RTEMS 6.1-rc6
|
Macros | |
#define | IS_ADC_CONVERSIONDATAMGT(DATA) |
Verify the ADC data conversion setting. | |
#define | ADC_GET_RESOLUTION(__HANDLE__) (LL_ADC_GetResolution((__HANDLE__)->Instance)) |
Return resolution bits in CFGR register RES[1:0] field. | |
#define | ADC_CLEAR_ERRORCODE(__HANDLE__) ((__HANDLE__)->ErrorCode = HAL_ADC_ERROR_NONE) |
Clear ADC error code (set it to no error code "HAL_ADC_ERROR_NONE"). | |
#define | ADC_IS_ENABLE(__HANDLE__) |
Verification of ADC state: enabled or disabled. | |
#define | ADC_IS_CONVERSION_ONGOING_REGULAR(__HANDLE__) (LL_ADC_REG_IsConversionOngoing((__HANDLE__)->Instance)) |
Check if conversion is on going on regular group. | |
#define | ADC_IS_SYNCHRONOUS_CLOCK_MODE(__HANDLE__) ((ADC12_COMMON->CCR & ADC_CCR_CKMODE) != 0UL) |
Check if ADC clock mode is synchronous. | |
#define | ADC_STATE_CLR_SET MODIFY_REG |
Simultaneously clear and set specific bits of the handle State. | |
#define | IS_ADC_RANGE(__RESOLUTION__, __ADC_VALUE__) ((__ADC_VALUE__) <= __LL_ADC_DIGITAL_SCALE(__RESOLUTION__)) |
Verify that a given value is aligned with the ADC resolution range. | |
#define | IS_ADC_REGULAR_NB_CONV(__LENGTH__) (((__LENGTH__) >= (1UL)) && ((__LENGTH__) <= (16UL))) |
Verify the length of the scheduled regular conversions group. | |
#define | IS_ADC_REGULAR_DISCONT_NUMBER(NUMBER) (((NUMBER) >= (1UL)) && ((NUMBER) <= (8UL))) |
Verify the number of scheduled regular conversions in discontinuous mode. | |
#define | IS_ADC_CLOCKPRESCALER(__ADC_CLOCK__) |
Verify the ADC clock setting. | |
#define | IS_ADC_RESOLUTION(__RESOLUTION__) |
Verify the ADC resolution setting. | |
#define | IS_ADC_RESOLUTION_8_BITS(__RESOLUTION__) (((__RESOLUTION__) == ADC_RESOLUTION_8B)) |
Verify the ADC resolution setting when limited to 8 bits. | |
#define | IS_ADC_SCAN_MODE(__SCAN_MODE__) |
Verify the ADC scan mode. | |
#define | IS_ADC_EXTTRIG_EDGE(__EDGE__) |
Verify the ADC edge trigger setting for regular group. | |
#define | IS_ADC_EXTTRIG(__REGTRIG__) |
Verify the ADC regular conversions external trigger. | |
#define | IS_ADC_EOC_SELECTION(__EOC_SELECTION__) |
Verify the ADC regular conversions check for converted data availability. | |
#define | IS_ADC_OVERRUN(__OVR__) |
Verify the ADC regular conversions overrun handling. | |
#define | IS_ADC_SAMPLE_TIME(__TIME__) |
Verify the ADC conversions sampling time. | |
#define | IS_ADC_REGULAR_RANK(__CHANNEL__) |
Verify the ADC regular channel setting. | |
#define ADC_CLEAR_ERRORCODE | ( | __HANDLE__ | ) | ((__HANDLE__)->ErrorCode = HAL_ADC_ERROR_NONE) |
Clear ADC error code (set it to no error code "HAL_ADC_ERROR_NONE").
__HANDLE__ | ADC handle |
None |
#define ADC_GET_RESOLUTION | ( | __HANDLE__ | ) | (LL_ADC_GetResolution((__HANDLE__)->Instance)) |
Return resolution bits in CFGR register RES[1:0] field.
__HANDLE__ | ADC handle |
Value | of bitfield RES in CFGR register. |
#define ADC_IS_CONVERSION_ONGOING_REGULAR | ( | __HANDLE__ | ) | (LL_ADC_REG_IsConversionOngoing((__HANDLE__)->Instance)) |
Check if conversion is on going on regular group.
__HANDLE__ | ADC handle |
Value | "0" (no conversion is on going) or value "1" (conversion is on going) |
#define ADC_IS_ENABLE | ( | __HANDLE__ | ) |
Verification of ADC state: enabled or disabled.
__HANDLE__ | ADC handle |
SET | (ADC enabled) or RESET (ADC disabled) |
#define ADC_IS_SYNCHRONOUS_CLOCK_MODE | ( | __HANDLE__ | ) | ((ADC12_COMMON->CCR & ADC_CCR_CKMODE) != 0UL) |
Check if ADC clock mode is synchronous.
__HANDLE__ | ADC handle |
SET | (clock mode is synchronous) or RESET (clock mode is asynchronous) |
#define ADC_STATE_CLR_SET MODIFY_REG |
Simultaneously clear and set specific bits of the handle State.
None |
#define IS_ADC_CLOCKPRESCALER | ( | __ADC_CLOCK__ | ) |
Verify the ADC clock setting.
__ADC_CLOCK__ | programmed ADC clock. |
SET | (ADC_CLOCK is a valid value) or RESET (ADC_CLOCK is invalid) |
#define IS_ADC_CONVERSIONDATAMGT | ( | DATA | ) |
Verify the ADC data conversion setting.
DATA | : programmed DATA conversion mode. |
SET | (DATA is a valid value) or RESET (DATA is invalid) |
#define IS_ADC_EOC_SELECTION | ( | __EOC_SELECTION__ | ) |
Verify the ADC regular conversions check for converted data availability.
__EOC_SELECTION__ | converted data availability check. |
SET | (EOC_SELECTION is a valid value) or RESET (EOC_SELECTION is invalid) |
#define IS_ADC_EXTTRIG | ( | __REGTRIG__ | ) |
Verify the ADC regular conversions external trigger.
__REGTRIG__ | programmed ADC regular conversions external trigger. |
SET | (REGTRIG is a valid value) or RESET (REGTRIG is invalid) |
#define IS_ADC_EXTTRIG_EDGE | ( | __EDGE__ | ) |
Verify the ADC edge trigger setting for regular group.
__EDGE__ | programmed ADC edge trigger setting. |
SET | (EDGE is a valid value) or RESET (EDGE is invalid) |
#define IS_ADC_OVERRUN | ( | __OVR__ | ) |
Verify the ADC regular conversions overrun handling.
__OVR__ | ADC regular conversions overrun handling. |
SET | (OVR is a valid value) or RESET (OVR is invalid) |
#define IS_ADC_RANGE | ( | __RESOLUTION__, | |
__ADC_VALUE__ | |||
) | ((__ADC_VALUE__) <= __LL_ADC_DIGITAL_SCALE(__RESOLUTION__)) |
Verify that a given value is aligned with the ADC resolution range.
__RESOLUTION__ | ADC resolution (16, 14, 12, 10 or 8 bits). |
__ADC_VALUE__ | value checked against the resolution. |
SET | (ADC_VALUE in line with RESOLUTION) or RESET (ADC_VALUE not in line with RESOLUTION) |
#define IS_ADC_REGULAR_DISCONT_NUMBER | ( | NUMBER | ) | (((NUMBER) >= (1UL)) && ((NUMBER) <= (8UL))) |
Verify the number of scheduled regular conversions in discontinuous mode.
NUMBER | number of scheduled regular conversions in discontinuous mode. |
SET | (NUMBER is within the maximum number of regular conversions in discontinuous mode) or RESET (NUMBER is null or too large) |
#define IS_ADC_REGULAR_NB_CONV | ( | __LENGTH__ | ) | (((__LENGTH__) >= (1UL)) && ((__LENGTH__) <= (16UL))) |
Verify the length of the scheduled regular conversions group.
__LENGTH__ | number of programmed conversions. |
SET | (LENGTH is within the maximum number of possible programmable regular conversions) or RESET (LENGTH is null or too large) |
#define IS_ADC_REGULAR_RANK | ( | __CHANNEL__ | ) |
Verify the ADC regular channel setting.
__CHANNEL__ | programmed ADC regular channel. |
SET | (CHANNEL is valid) or RESET (CHANNEL is invalid) |
#define IS_ADC_RESOLUTION | ( | __RESOLUTION__ | ) |
Verify the ADC resolution setting.
__RESOLUTION__ | programmed ADC resolution. |
SET | (RESOLUTION is a valid value) or RESET (RESOLUTION is invalid) |
#define IS_ADC_RESOLUTION_8_BITS | ( | __RESOLUTION__ | ) | (((__RESOLUTION__) == ADC_RESOLUTION_8B)) |
Verify the ADC resolution setting when limited to 8 bits.
__RESOLUTION__ | programmed ADC resolution when limited to 8 bits. |
SET | (RESOLUTION is a valid value) or RESET (RESOLUTION is invalid) |
#define IS_ADC_SAMPLE_TIME | ( | __TIME__ | ) |
Verify the ADC conversions sampling time.
__TIME__ | ADC conversions sampling time. |
SET | (TIME is a valid value) or RESET (TIME is invalid) |
#define IS_ADC_SCAN_MODE | ( | __SCAN_MODE__ | ) |
Verify the ADC scan mode.
__SCAN_MODE__ | programmed ADC scan mode. |
SET | (SCAN_MODE is valid) or RESET (SCAN_MODE is invalid) |