Prusa MINI Firmware overview
adc.h
Go to the documentation of this file.
1 // adc.h
2 #ifndef _ADC_H
3 #define _ADC_H
4 
5 #include <inttypes.h>
6 #include "config.h"
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif //__cplusplus
11 
12 extern uint32_t adc_val[ADC_CHAN_CNT];
13 
14 extern uint32_t adc_sim_val[ADC_CHAN_CNT];
15 
16 extern uint32_t adc_sim_msk;
17 
18 extern void adc_init(void);
19 
20 extern void adc_cycle(void);
21 
22 #ifdef __cplusplus
23 }
24 #endif //__cplusplus
25 
26 #endif // _ADC_H
adc_sim_val
uint32_t adc_sim_val[ADC_CHAN_CNT]
Definition: adc.c:23
HAL_OK
Definition: stm32f4xx_hal_def.h:57
adc_init_sim_vals
void adc_init_sim_vals(void)
Definition: adc.c:97
HAL_ADC_Start
HAL_StatusTypeDef HAL_ADC_Start(ADC_HandleTypeDef *hadc)
ADC_FLAG_EOC
#define ADC_FLAG_EOC
Definition: stm32f4xx_hal_adc.h:430
adc_sim_msk
uint32_t adc_sim_msk
Definition: adc.c:24
ADC_SAMPLETIME_3CYCLES
#define ADC_SAMPLETIME_3CYCLES
Definition: stm32f4xx_hal_adc.h:370
adc_sim_val
uint32_t adc_sim_val[ADC_CHAN_CNT]
Definition: adc.c:23
i
uint8_t i
Definition: screen_test_graph.c:72
adc.h
adc_cycle
void adc_cycle(void)
Definition: adc.c:65
ADC_CHAN_MSK
#define ADC_CHAN_MSK
Definition: config_a3ides2209_02.h:29
HAL_ADC_GetValue
uint32_t HAL_ADC_GetValue(ADC_HandleTypeDef *hadc)
ADC_ChannelConfTypeDef::Channel
uint32_t Channel
Definition: stm32f4xx_hal_adc.h:133
adc_cnt
uint8_t adc_cnt[ADC_CHAN_CNT]
Definition: adc.c:18
ADC_ChannelConfTypeDef::Rank
uint32_t Rank
Definition: stm32f4xx_hal_adc.h:135
adc_cycle
void adc_cycle(void)
Definition: adc.c:65
ADC_SEQ_LEN
#define ADC_SEQ_LEN
Definition: config_a3ides2209_02.h:32
ADC_ChannelConfTypeDef
Structure definition of ADC channel for regular group.
Definition: stm32f4xx_hal_adc.h:131
adc_chan
uint8_t adc_chan(uint8_t idx)
Definition: adc.c:29
adc_val
uint32_t adc_val[ADC_CHAN_CNT]
Definition: adc.c:17
ADC_SIM_VAL1
#define ADC_SIM_VAL1
Definition: config_a3ides2209_02.h:38
ADC_ChannelConfTypeDef::SamplingTime
uint32_t SamplingTime
Definition: stm32f4xx_hal_adc.h:137
ADC_HandleTypeDef
ADC handle Structure definition.
Definition: stm32f4xx_hal_adc.h:208
hadc1
ADC_HandleTypeDef hadc1
Definition: main.c:75
ADC_SEQ2IDX
uint8_t ADC_SEQ2IDX(uint8_t seq)
uint8_t
const uint8_t[]
Definition: 404_html.c:3
ADC_OVRSAMPL
#define ADC_OVRSAMPL
Definition: config_a3ides2209_02.h:31
ADC_SIM_VAL4
#define ADC_SIM_VAL4
Definition: config_a3ides2209_02.h:41
Error_Handler
void Error_Handler(void)
This function is executed in case of error occurrence.
Definition: main.c:1057
adc_sta
uint8_t adc_sta
Definition: adc.c:20
adc_val
uint32_t adc_val[ADC_CHAN_CNT]
Definition: adc.c:17
ADC_SIM_MSK
#define ADC_SIM_MSK
Definition: adc.c:6
stm32f4xx_hal.h
This file contains all the functions prototypes for the HAL module driver.
HAL_ADC_ConfigChannel
HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef *hadc, ADC_ChannelConfTypeDef *sConfig)
adc_idx
int8_t adc_idx
Definition: adc.c:21
ADC_SIM_VAL2
#define ADC_SIM_VAL2
Definition: config_a3ides2209_02.h:39
ADC_CHAN_CNT
#define ADC_CHAN_CNT
Definition: config_a3ides2209_02.h:30
adc_set_mux
void adc_set_mux(uint8_t chn)
Definition: adc.c:42
config.h
adc_init
void adc_init(void)
Definition: adc.c:53
adc_init
void adc_init(void)
Definition: adc.c:53
adc_chn
uint8_t adc_chn[ADC_CHAN_CNT]
Definition: adc.c:19
adc_sim_msk
uint32_t adc_sim_msk
Definition: adc.c:24
__HAL_ADC_GET_FLAG
#define __HAL_ADC_GET_FLAG(__HANDLE__, __FLAG__)
Get the selected ADC's flag status.
Definition: stm32f4xx_hal_adc.h:515
ADC_READY
void ADC_READY(uint8_t index)
ADC_SIM_VAL3
#define ADC_SIM_VAL3
Definition: config_a3ides2209_02.h:40
ADC_SIM_VAL0
#define ADC_SIM_VAL0
Definition: config_a3ides2209_02.h:37