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

  __CLOCK__ | ADC clock.

Return values

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

Definition at line 355 of file 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_IO5) || \
((__INPUT__) == ADC_INPUT_SRC_IO6) || \
((__INPUT__) == ADC_INPUT_SRC_IO7) || \
((__INPUT__) == ADC_INPUT_SRC_TMP) || \
((__INPUT__) == ADC_INPUT_SRC_BAT) || \
((__INPUT__) == ADC_INPUT_SRC_REF))

Check if ADC input source is valid.

Parameters

  __INPUT__ | ADC input source.

Return values

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

Definition at line 300 of file 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

  __MODE__ | ADC input mode.

Return values

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

Definition at line 317 of file 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

  __INPUT__ | ADC reference source.

Return values

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

Definition at line 325 of file hal_adc.h.

## ◆ IS_ADC_REF_VALUE

#define IS_ADC_REF_VALUE | ( |  | __VALUE__ | ) |

Value:
(((__VALUE__) >= ADC_REF_VALUE_0P5) && \
((__VALUE__) <= ADC_REF_VALUE_2P0))

Check if ADC reference value is valid.

Parameters

  __VALUE__ | ADC reference value.

Return values

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

Definition at line 337 of file hal_adc.h.

ADC_REF_SRC_IO0
#define ADC_REF_SRC_IO0
Definition: hal_adc.h:230
ADC_INPUT_SRC_IO1
#define ADC_INPUT_SRC_IO1
Definition: hal_adc.h:213
ADC_INPUT_SRC_IO3
#define ADC_INPUT_SRC_IO3
Definition: hal_adc.h:215
ADC_INPUT_SRC_TMP
#define ADC_INPUT_SRC_TMP
Definition: hal_adc.h:220
ADC_INPUT_DIFFERENTIAL
#define ADC_INPUT_DIFFERENTIAL
Definition: hal_adc.h:206
ADC_INPUT_SRC_IO7
#define ADC_INPUT_SRC_IO7
Definition: hal_adc.h:219
ADC_INPUT_SRC_IO4
#define ADC_INPUT_SRC_IO4
Definition: hal_adc.h:216
ADC_INPUT_SRC_REF
#define ADC_INPUT_SRC_REF
Definition: hal_adc.h:222
ADC_INPUT_SINGLE
#define ADC_INPUT_SINGLE
Definition: hal_adc.h:205
ADC_CLK_8M
#define ADC_CLK_8M
Definition: hal_adc.h:183
ADC_INPUT_SRC_IO6
#define ADC_INPUT_SRC_IO6
Definition: hal_adc.h:218
ADC_REF_SRC_IO1
#define ADC_REF_SRC_IO1
Definition: hal_adc.h:231
ADC_INPUT_SRC_IO5
#define ADC_INPUT_SRC_IO5
Definition: hal_adc.h:217
ADC_INPUT_SRC_IO2
#define ADC_INPUT_SRC_IO2
Definition: hal_adc.h:214
ADC_REF_SRC_IO2
#define ADC_REF_SRC_IO2
Definition: hal_adc.h:232
ADC_INPUT_SRC_BAT
#define ADC_INPUT_SRC_BAT
Definition: hal_adc.h:221
ADC_REF_SRC_IO3
#define ADC_REF_SRC_IO3
Definition: hal_adc.h:233
ADC_CLK_1M
#define ADC_CLK_1M
Definition: hal_adc.h:185
ADC_CLK_16M
#define ADC_CLK_16M
Definition: hal_adc.h:182
ADC_CLK_4M
#define ADC_CLK_4M
Definition: hal_adc.h:184
ADC_REF_SRC_BUF_INT
#define ADC_REF_SRC_BUF_INT
Definition: hal_adc.h:229
ADC_REF_VALUE_2P0
#define ADC_REF_VALUE_2P0
Definition: hal_adc.h:198
ADC_INPUT_SRC_IO0
#define ADC_INPUT_SRC_IO0
Definition: hal_adc.h:212