| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #ifndef __MAIN_H
- #define __MAIN_H
- #ifdef __cplusplus
- extern "C" {
- #endif
- #define VOLTAGE_CMD 0xA5A5
- #define ADC_CONVERT_COUNT (1000)
- #define Vref (33)
- #define COUNT_BASE (4096)
- #define ALL_RES (505000)
- #define GATHER_RES (5000)
- #include "stm32f0xx_hal.h"
- typedef union{
- uint8_t u8_buff[4];
- uint16_t u16_buff[2];
- uint32_t u32_buff;
- }Data;
- typedef union{
- uint8_t u8_tx[4];
- uint32_t f_data;
- }Tx_Data;
- void Error_Handler(void);
- #ifdef __cplusplus
- }
- #endif
- #endif /* __MAIN_H */
|