Introduce `VCC_MV` to `funconfig.h` for consistent voltage readings. Add `get_current_ma` function to `main.c` for clearer current calculations. Remove unused `PIN_LED` and `Delay_Ms(5000)` from `main.c`. Update VBUS voltage calculation to use `VCC_MV`. Print TIP sensor voltage in millivolts instead of raw ADC values.
13 lines
330 B
C
13 lines
330 B
C
#ifndef _FUNCONFIG_H
|
|
#define _FUNCONFIG_H
|
|
|
|
#define FUNCONF_USE_DEBUGPRINTF 0 // can only have one printf
|
|
#define FUNCONF_USE_USBPRINTF 1
|
|
#define FUNCONF_DEBUG_HARDFAULT 0
|
|
#define CH32X035 1
|
|
#define I2C_TARGET I2C1
|
|
#define VCC_MV 3480
|
|
|
|
|
|
#endif // _FUNCONFIG_H
|