Prusa MINI Firmware overview
|
◆ ADC_IS_ENABLE
#define ADC_IS_ENABLE |
( |
|
__HANDLE__ | ) |
|
Value:((( ((__HANDLE__)->Instance->SR & ADC_SR_ADONS) == ADC_SR_ADONS ) \
Verification of ADC state: enabled or disabled.
- Parameters
-
<strong>HANDLE</strong> | ADC handle |
- Return values
-
SET | (ADC enabled) or RESET (ADC disabled) |
◆ ADC_IS_SOFTWARE_START_REGULAR
#define ADC_IS_SOFTWARE_START_REGULAR |
( |
|
__HANDLE__ | ) |
(((__HANDLE__)->Instance->CR2 & ADC_CR2_EXTEN) == RESET) |
Test if conversion trigger of regular group is software start or external trigger.
- Parameters
-
<strong>HANDLE</strong> | ADC handle |
- Return values
-
SET | (software start) or RESET (external trigger) |
◆ ADC_IS_SOFTWARE_START_INJECTED
#define ADC_IS_SOFTWARE_START_INJECTED |
( |
|
__HANDLE__ | ) |
(((__HANDLE__)->Instance->CR2 & ADC_CR2_JEXTEN) == RESET) |
Test if conversion trigger of injected group is software start or external trigger.
- Parameters
-
<strong>HANDLE</strong> | ADC handle |
- Return values
-
SET | (software start) or RESET (external trigger) |
◆ ADC_STATE_CLR_SET
#define ADC_STATE_CLR_SET MODIFY_REG |
Simultaneously clears and sets specific bits of the handle State.
- Note
- : ADC_STATE_CLR_SET() macro is merely aliased to generic macro MODIFY_REG(), the first parameter is the ADC handle State, the second parameter is the bit field to clear, the third and last parameter is the bit field to set.
- Return values
-
◆ ADC_CLEAR_ERRORCODE
Clear ADC error code (set it to error code: "no error")
- Parameters
-
<strong>HANDLE</strong> | ADC handle |
- Return values
-
◆ IS_ADC_CLOCKPRESCALER
#define IS_ADC_CLOCKPRESCALER |
( |
|
ADC_CLOCK | ) |
|
◆ IS_ADC_SAMPLING_DELAY
#define IS_ADC_SAMPLING_DELAY |
( |
|
DELAY | ) |
|
◆ IS_ADC_RESOLUTION
#define IS_ADC_RESOLUTION |
( |
|
RESOLUTION | ) |
|
◆ IS_ADC_EXT_TRIG_EDGE
#define IS_ADC_EXT_TRIG_EDGE |
( |
|
EDGE | ) |
|
◆ IS_ADC_EXT_TRIG
#define IS_ADC_EXT_TRIG |
( |
|
REGTRIG | ) |
|
◆ IS_ADC_DATA_ALIGN
#define IS_ADC_DATA_ALIGN |
( |
|
ALIGN | ) |
|
◆ IS_ADC_SAMPLE_TIME
#define IS_ADC_SAMPLE_TIME |
( |
|
TIME | ) |
|
◆ IS_ADC_EOCSelection
#define IS_ADC_EOCSelection |
( |
|
EOCSelection | ) |
|
◆ IS_ADC_EVENT_TYPE
#define IS_ADC_EVENT_TYPE |
( |
|
EVENT | ) |
|
◆ IS_ADC_ANALOG_WATCHDOG
#define IS_ADC_ANALOG_WATCHDOG |
( |
|
WATCHDOG | ) |
|
◆ IS_ADC_CHANNELS_TYPE
#define IS_ADC_CHANNELS_TYPE |
( |
|
CHANNEL_TYPE | ) |
|
◆ IS_ADC_THRESHOLD
#define IS_ADC_THRESHOLD |
( |
|
THRESHOLD | ) |
((THRESHOLD) <= 0xFFFU) |
◆ IS_ADC_REGULAR_LENGTH
◆ IS_ADC_REGULAR_RANK
#define IS_ADC_REGULAR_RANK |
( |
|
RANK | ) |
(((RANK) >= 1U) && ((RANK) <= (16U))) |
◆ IS_ADC_REGULAR_DISC_NUMBER
#define IS_ADC_REGULAR_DISC_NUMBER |
( |
|
NUMBER | ) |
(((NUMBER) >= 1U) && ((NUMBER) <= 8U)) |
◆ IS_ADC_RANGE
#define IS_ADC_RANGE |
( |
|
RESOLUTION, |
|
|
|
ADC_VALUE |
|
) |
| |
◆ ADC_SQR1
#define ADC_SQR1 |
( |
|
_NbrOfConversion_ | ) |
(((_NbrOfConversion_) - (uint8_t)1U) << 20U) |
Set ADC Regular channel sequence length.
- Parameters
-
<em>NbrOfConversion</em> | Regular channel sequence length. |
- Return values
-
◆ ADC_SMPR1
#define ADC_SMPR1 |
( |
|
_SAMPLETIME_, |
|
|
|
_CHANNELNB_ |
|
) |
| ((_SAMPLETIME_) << (3U * (((uint32_t)((uint16_t)(_CHANNELNB_))) - 10U))) |
Set the ADC's sample time for channel numbers between 10 and 18.
- Parameters
-
<em>SAMPLETIME</em> | Sample time parameter. |
<em>CHANNELNB</em> | Channel number. |
- Return values
-
◆ ADC_SMPR2
#define ADC_SMPR2 |
( |
|
_SAMPLETIME_, |
|
|
|
_CHANNELNB_ |
|
) |
| ((_SAMPLETIME_) << (3U * ((uint32_t)((uint16_t)(_CHANNELNB_))))) |
Set the ADC's sample time for channel numbers between 0 and 9.
- Parameters
-
<em>SAMPLETIME</em> | Sample time parameter. |
<em>CHANNELNB</em> | Channel number. |
- Return values
-
◆ ADC_SQR3_RK
#define ADC_SQR3_RK |
( |
|
_CHANNELNB_, |
|
|
|
_RANKNB_ |
|
) |
| (((uint32_t)((uint16_t)(_CHANNELNB_))) << (5U * ((_RANKNB_) - 1U))) |
Set the selected regular channel rank for rank between 1 and 6.
- Parameters
-
<em>CHANNELNB</em> | Channel number. |
<em>RANKNB</em> | Rank number. |
- Return values
-
◆ ADC_SQR2_RK
#define ADC_SQR2_RK |
( |
|
_CHANNELNB_, |
|
|
|
_RANKNB_ |
|
) |
| (((uint32_t)((uint16_t)(_CHANNELNB_))) << (5U * ((_RANKNB_) - 7U))) |
Set the selected regular channel rank for rank between 7 and 12.
- Parameters
-
<em>CHANNELNB</em> | Channel number. |
<em>RANKNB</em> | Rank number. |
- Return values
-
◆ ADC_SQR1_RK
#define ADC_SQR1_RK |
( |
|
_CHANNELNB_, |
|
|
|
_RANKNB_ |
|
) |
| (((uint32_t)((uint16_t)(_CHANNELNB_))) << (5U * ((_RANKNB_) - 13U))) |
Set the selected regular channel rank for rank between 13 and 16.
- Parameters
-
<em>CHANNELNB</em> | Channel number. |
<em>RANKNB</em> | Rank number. |
- Return values
-
◆ ADC_CR2_CONTINUOUS
#define ADC_CR2_CONTINUOUS |
( |
|
_CONTINUOUS_MODE_ | ) |
((_CONTINUOUS_MODE_) << 1U) |
Enable ADC continuous conversion mode.
- Parameters
-
<em>CONTINUOUS_MODE</em> | Continuous mode. |
- Return values
-
◆ ADC_CR1_DISCONTINUOUS
#define ADC_CR1_DISCONTINUOUS |
( |
|
_NBR_DISCONTINUOUSCONV_ | ) |
(((_NBR_DISCONTINUOUSCONV_) - 1U) << ADC_CR1_DISCNUM_Pos) |
Configures the number of discontinuous conversions for the regular group channels.
- Parameters
-
<em>NBR_DISCONTINUOUSCONV</em> | Number of discontinuous conversions. |
- Return values
-
◆ ADC_CR1_SCANCONV
#define ADC_CR1_SCANCONV |
( |
|
_SCANCONV_MODE_ | ) |
((_SCANCONV_MODE_) << 8U) |
Enable ADC scan mode.
- Parameters
-
<em>SCANCONV_MODE</em> | Scan conversion mode. |
- Return values
-
◆ ADC_CR2_EOCSelection
#define ADC_CR2_EOCSelection |
( |
|
_EOCSelection_MODE_ | ) |
((_EOCSelection_MODE_) << 10U) |
Enable the ADC end of conversion selection.
- Parameters
-
<em>EOCSelection_MODE</em> | End of conversion selection mode. |
- Return values
-
◆ ADC_CR2_DMAContReq
#define ADC_CR2_DMAContReq |
( |
|
_DMAContReq_MODE_ | ) |
((_DMAContReq_MODE_) << 9U) |
Enable the ADC DMA continuous request.
- Parameters
-
<em>DMAContReq_MODE</em> | DMA continuous request mode. |
- Return values
-
◆ ADC_GET_RESOLUTION
#define ADC_GET_RESOLUTION |
( |
|
__HANDLE__ | ) |
(((__HANDLE__)->Instance->CR1) & ADC_CR1_RES) |
Return resolution bits in CR1 register.
- Parameters
-
<strong>HANDLE</strong> | ADC handle |
- Return values
-
#define ADC_ANALOGWATCHDOG_SINGLE_REG
Definition: stm32f4xx_hal_adc.h:404
#define ADC_EXTERNALTRIGCONVEDGE_RISING
Definition: stm32f4xx_hal_adc.h:296
#define ADC_ANALOGWATCHDOG_NONE
Definition: stm32f4xx_hal_adc.h:410
#define ADC_SAMPLETIME_28CYCLES
Definition: stm32f4xx_hal_adc.h:372
#define ADC_SAMPLETIME_15CYCLES
Definition: stm32f4xx_hal_adc.h:371
#define ADC_EXTERNALTRIGCONVEDGE_FALLING
Definition: stm32f4xx_hal_adc.h:297
#define ADC_TWOSAMPLINGDELAY_19CYCLES
Definition: stm32f4xx_hal_adc.h:275
#define ADC_REGULAR_CHANNELS
Definition: stm32f4xx_hal_adc.h:443
#define ADC_EXTERNALTRIGCONV_T1_CC1
Definition: stm32f4xx_hal_adc.h:308
#define ADC_TWOSAMPLINGDELAY_14CYCLES
Definition: stm32f4xx_hal_adc.h:270
#define ADC_EXTERNALTRIGCONV_T3_CC1
Definition: stm32f4xx_hal_adc.h:315
#define ADC_EXTERNALTRIGCONV_T2_CC3
Definition: stm32f4xx_hal_adc.h:312
#define ADC_ANALOGWATCHDOG_ALL_REG
Definition: stm32f4xx_hal_adc.h:407
#define RESET
Definition: dac_mcp4728.h:34
#define ADC_RESOLUTION_6B
Definition: stm32f4xx_hal_adc.h:287
#define ADC_EXTERNALTRIGCONV_T1_CC2
Definition: stm32f4xx_hal_adc.h:309
#define ADC_EOC_SINGLE_CONV
Definition: stm32f4xx_hal_adc.h:386
#define ADC_INJECTED_CHANNELS
Definition: stm32f4xx_hal_adc.h:444
#define ADC_SAMPLETIME_3CYCLES
Definition: stm32f4xx_hal_adc.h:370
#define ADC_RESOLUTION_12B
Definition: stm32f4xx_hal_adc.h:284
#define ADC_DATAALIGN_RIGHT
Definition: stm32f4xx_hal_adc.h:332
#define DELAY
Definition: st25dv64k.c:38
#define ADC_TWOSAMPLINGDELAY_11CYCLES
Definition: stm32f4xx_hal_adc.h:267
#define ADC_EXTERNALTRIGCONV_T2_CC4
Definition: stm32f4xx_hal_adc.h:313
#define ADC_EXTERNALTRIGCONV_Ext_IT11
Definition: stm32f4xx_hal_adc.h:323
#define ADC_TWOSAMPLINGDELAY_16CYCLES
Definition: stm32f4xx_hal_adc.h:272
#define ADC_TWOSAMPLINGDELAY_8CYCLES
Definition: stm32f4xx_hal_adc.h:264
#define ADC_TWOSAMPLINGDELAY_13CYCLES
Definition: stm32f4xx_hal_adc.h:269
#define ADC_ALL_CHANNELS
Definition: stm32f4xx_hal_adc.h:442
#define ADC_RESOLUTION_8B
Definition: stm32f4xx_hal_adc.h:286
#define ADC_SOFTWARE_START
Definition: stm32f4xx_hal_adc.h:324
#define ADC_CLOCK_SYNC_PCLK_DIV4
Definition: stm32f4xx_hal_adc.h:251
#define ADC_TWOSAMPLINGDELAY_17CYCLES
Definition: stm32f4xx_hal_adc.h:273
#define ADC_ANALOGWATCHDOG_ALL_REGINJEC
Definition: stm32f4xx_hal_adc.h:409
#define ADC_ANALOGWATCHDOG_SINGLE_REGINJEC
Definition: stm32f4xx_hal_adc.h:406
#define ADC_SAMPLETIME_480CYCLES
Definition: stm32f4xx_hal_adc.h:377
#define ADC_EXTERNALTRIGCONV_T5_CC1
Definition: stm32f4xx_hal_adc.h:318
#define ADC_EXTERNALTRIGCONV_T2_TRGO
Definition: stm32f4xx_hal_adc.h:314
#define ADC_ANALOGWATCHDOG_SINGLE_INJEC
Definition: stm32f4xx_hal_adc.h:405
#define ADC_SAMPLETIME_56CYCLES
Definition: stm32f4xx_hal_adc.h:373
#define ADC_RESOLUTION_10B
Definition: stm32f4xx_hal_adc.h:285
#define ADC_OVR_EVENT
Definition: stm32f4xx_hal_adc.h:396
#define ADC_EXTERNALTRIGCONV_T8_CC1
Definition: stm32f4xx_hal_adc.h:321
#define ADC_CLOCK_SYNC_PCLK_DIV6
Definition: stm32f4xx_hal_adc.h:252
#define ADC_EOC_SEQ_CONV
Definition: stm32f4xx_hal_adc.h:385
#define ADC_TWOSAMPLINGDELAY_9CYCLES
Definition: stm32f4xx_hal_adc.h:265
#define ADC_TWOSAMPLINGDELAY_12CYCLES
Definition: stm32f4xx_hal_adc.h:268
#define ADC_EXTERNALTRIGCONV_T4_CC4
Definition: stm32f4xx_hal_adc.h:317
#define ADC_EXTERNALTRIGCONVEDGE_NONE
Definition: stm32f4xx_hal_adc.h:295
#define ADC_EXTERNALTRIGCONV_T1_CC3
Definition: stm32f4xx_hal_adc.h:310
#define ADC_EXTERNALTRIGCONV_T2_CC2
Definition: stm32f4xx_hal_adc.h:311
#define ADC_CLOCK_SYNC_PCLK_DIV2
Definition: stm32f4xx_hal_adc.h:250
#define ADC_TWOSAMPLINGDELAY_18CYCLES
Definition: stm32f4xx_hal_adc.h:274
#define ADC_CLOCK_SYNC_PCLK_DIV8
Definition: stm32f4xx_hal_adc.h:253
#define ADC_SAMPLETIME_112CYCLES
Definition: stm32f4xx_hal_adc.h:375
#define ADC_TWOSAMPLINGDELAY_10CYCLES
Definition: stm32f4xx_hal_adc.h:266
#define ADC_EXTERNALTRIGCONV_T3_TRGO
Definition: stm32f4xx_hal_adc.h:316
#define ADC_EXTERNALTRIGCONV_T8_TRGO
Definition: stm32f4xx_hal_adc.h:322
#define ADC_EXTERNALTRIGCONVEDGE_RISINGFALLING
Definition: stm32f4xx_hal_adc.h:298
#define ADC_TWOSAMPLINGDELAY_5CYCLES
Definition: stm32f4xx_hal_adc.h:261
#define ADC_EXTERNALTRIGCONV_T5_CC2
Definition: stm32f4xx_hal_adc.h:319
#define ADC_TWOSAMPLINGDELAY_15CYCLES
Definition: stm32f4xx_hal_adc.h:271
#define ADC_DATAALIGN_LEFT
Definition: stm32f4xx_hal_adc.h:333
#define ADC_EOC_SINGLE_SEQ_CONV
Definition: stm32f4xx_hal_adc.h:387
#define ADC_SAMPLETIME_144CYCLES
Definition: stm32f4xx_hal_adc.h:376
#define ADC_SAMPLETIME_84CYCLES
Definition: stm32f4xx_hal_adc.h:374
#define ADC_TWOSAMPLINGDELAY_6CYCLES
Definition: stm32f4xx_hal_adc.h:262
#define ADC_AWD_EVENT
Definition: stm32f4xx_hal_adc.h:395
#define ADC_TWOSAMPLINGDELAY_20CYCLES
Definition: stm32f4xx_hal_adc.h:276
#define ADC_TWOSAMPLINGDELAY_7CYCLES
Definition: stm32f4xx_hal_adc.h:263
#define ADC_ANALOGWATCHDOG_ALL_INJEC
Definition: stm32f4xx_hal_adc.h:408
#define ADC_EXTERNALTRIGCONV_T5_CC3
Definition: stm32f4xx_hal_adc.h:320