Macros
ADC Private Macros
Peripheral Driver » HAL Driver » ADC » Defines

## Macros
#define | IS_ADC_INPUT(__INPUT__)
| Check if ADC input source is valid. More...
#define | IS_ADC_INPUT_MODE(__MODE__)
| Check if ADC input mode is valid. More...
#define | IS_ADC_REF(__INPUT__)
| Check if ADC reference source is valid. More...
#define | IS_ADC_REF_VALUE(__VALUE__)
| Check if ADC reference value is valid. More...
#define | IS_ADC_CLOCK(__CLOCK__)
| Check if ADC clock is valid. More...

## Detailed Description

## Macro Definition Documentation

## ◆ IS_ADC_CLOCK

#define IS_ADC_CLOCK | ( |  | __CLOCK__ | ) |

Value:
(((__CLOCK__) == ADC_CLK_16M) || \
((__CLOCK__) == ADC_CLK_8M) || \
((__CLOCK__) == ADC_CLK_4M) || \
((__CLOCK__) == ADC_CLK_2M) || \
((__CLOCK__) == ADC_CLK_1M) || \
((__CLOCK__) == ADC_CLK_1P6M))

Check if ADC clock is valid.

Parameters

  <strong>CLOCK</strong> | ADC clock.

Return values

  SET | (CLOCK is valid) or RESET (CLOCK is invalid)

Definition at line 343 of file gr55xx_hal_adc.h.

## ◆ IS_ADC_INPUT

#define IS_ADC_INPUT | ( |  | __INPUT__ | ) |

Value:
(((__INPUT__) == ADC_INPUT_SRC_IO0) || \
((__INPUT__) == ADC_INPUT_SRC_IO1) || \
((__INPUT__) == ADC_INPUT_SRC_IO2) || \
((__INPUT__) == ADC_INPUT_SRC_IO3) || \
((__INPUT__) == ADC_INPUT_SRC_IO4) || \
((__INPUT__) == ADC_INPUT_SRC_TMP) || \
((__INPUT__) == ADC_INPUT_SRC_BAT) || \
((__INPUT__) == ADC_INPUT_SRC_REF))

Check if ADC input source is valid.

Parameters

  <strong>INPUT</strong> | ADC input source.

Return values

  SET | (INPUT is valid) or RESET (INPUT is invalid)

Definition at line 301 of file gr55xx_hal_adc.h.

## ◆ IS_ADC_INPUT_MODE

#define IS_ADC_INPUT_MODE | ( |  | __MODE__ | ) |

Value:
(((__MODE__) == ADC_INPUT_SINGLE) || \
((__MODE__) == ADC_INPUT_DIFFERENTIAL)

Check if ADC input mode is valid.

Parameters

  <strong>MODE</strong> | ADC input mode.

Return values

  SET | (MODE is valid) or RESET (MODE is invalid)

Definition at line 315 of file gr55xx_hal_adc.h.

## ◆ IS_ADC_REF

#define IS_ADC_REF | ( |  | __INPUT__ | ) |

Value:
(((__INPUT__) == ADC_REF_SRC_BUF_INT) || \
((__INPUT__) == ADC_REF_SRC_INT) || \
((__INPUT__) == ADC_REF_SRC_IO0) || \
((__INPUT__) == ADC_REF_SRC_IO1) || \
((__INPUT__) == ADC_REF_SRC_IO2) || \
((__INPUT__) == ADC_REF_SRC_IO3))

Check if ADC reference source is valid.

Parameters

  <strong>INPUT</strong> | ADC reference source.

Return values

  SET | (INPUT is valid) or RESET (INPUT is invalid)

Definition at line 323 of file gr55xx_hal_adc.h.

## ◆ IS_ADC_REF_VALUE

#define IS_ADC_REF_VALUE | ( |  | __VALUE__ | ) |

Value:
(((__VALUE__) >= ADC_REF_VALUE_0P8) && \
((__VALUE__) <= ADC_REF_VALUE_1P6))

Check if ADC reference value is valid.

Parameters

  <strong>VALUE</strong> | ADC reference value.

Return values

  SET | (VALUE is valid) or RESET (VALUE is invalid)

Definition at line 335 of file gr55xx_hal_adc.h.

ADC_REF_SRC_IO0
#define ADC_REF_SRC_IO0
Select MSIO0 as reference
Definition: gr55xx_hal_adc.h:225
ADC_CLK_1P6M
#define ADC_CLK_1P6M
ADC Clock = 1.6 MHz.
Definition: gr55xx_hal_adc.h:184
ADC_INPUT_SRC_IO1
#define ADC_INPUT_SRC_IO1
Select MSIO1 as input
Definition: gr55xx_hal_adc.h:211
ADC_INPUT_SRC_IO3
#define ADC_INPUT_SRC_IO3
Select MSIO3 as input
Definition: gr55xx_hal_adc.h:213
ADC_INPUT_SRC_TMP
#define ADC_INPUT_SRC_TMP
Select temperature as input.
Definition: gr55xx_hal_adc.h:215
ADC_INPUT_DIFFERENTIAL
#define ADC_INPUT_DIFFERENTIAL
Differential mode.
Definition: gr55xx_hal_adc.h:204
ADC_INPUT_SRC_IO4
#define ADC_INPUT_SRC_IO4
Select MSIO4 as input
Definition: gr55xx_hal_adc.h:214
ADC_INPUT_SRC_REF
#define ADC_INPUT_SRC_REF
Select reference as input
Definition: gr55xx_hal_adc.h:217
ADC_INPUT_SINGLE
#define ADC_INPUT_SINGLE
Single ended mode.
Definition: gr55xx_hal_adc.h:203
ADC_CLK_8M
#define ADC_CLK_8M
ADC Clock = 8 MHz
Definition: gr55xx_hal_adc.h:185
ADC_REF_SRC_IO1
#define ADC_REF_SRC_IO1
Select MSIO1 as reference
Definition: gr55xx_hal_adc.h:226
ADC_INPUT_SRC_IO2
#define ADC_INPUT_SRC_IO2
Select MSIO2 as input
Definition: gr55xx_hal_adc.h:212
ADC_REF_SRC_IO2
#define ADC_REF_SRC_IO2
Select MSIO2 as reference
Definition: gr55xx_hal_adc.h:227
ADC_INPUT_SRC_BAT
#define ADC_INPUT_SRC_BAT
Select Vbattery as input
Definition: gr55xx_hal_adc.h:216
ADC_REF_VALUE_1P6
#define ADC_REF_VALUE_1P6
Reference = 1.60 V
Definition: gr55xx_hal_adc.h:196
ADC_REF_SRC_IO3
#define ADC_REF_SRC_IO3
Select MSIO3 as reference
Definition: gr55xx_hal_adc.h:228
ADC_CLK_1M
#define ADC_CLK_1M
ADC Clock = 1 MHz
Definition: gr55xx_hal_adc.h:188
ADC_CLK_16M
#define ADC_CLK_16M
ADC Clock = 16 MHz
Definition: gr55xx_hal_adc.h:183
ADC_CLK_4M
#define ADC_CLK_4M
ADC Clock = 4 MHz
Definition: gr55xx_hal_adc.h:186
ADC_REF_VALUE_0P8
#define ADC_REF_VALUE_0P8
Reference = 0.85 V
Definition: gr55xx_hal_adc.h:194
ADC_REF_SRC_BUF_INT
#define ADC_REF_SRC_BUF_INT
Select buffered internal reference as reference
Definition: gr55xx_hal_adc.h:224
ADC_CLK_2M
#define ADC_CLK_2M
ADC Clock = 2 MHz
Definition: gr55xx_hal_adc.h:187
ADC_INPUT_SRC_IO0
#define ADC_INPUT_SRC_IO0
Select MSIO0 as input
Definition: gr55xx_hal_adc.h:210