intermediate commit
This commit is contained in:
51
src/hal.h
Normal file
51
src/hal.h
Normal file
@@ -0,0 +1,51 @@
|
||||
#ifndef HALH
|
||||
#define HALH
|
||||
|
||||
#define MAXBATT 4200 // The default Lipo is 4200mv when the battery is fully charged.
|
||||
#define LIGHT_SLEEP_VOLTAGE 3750 // Point where start light sleep
|
||||
#define MINBATT 3200 // The default Lipo is 3200mv when the battery is empty...this WILL be low on the 3.3v rail specs!!!
|
||||
|
||||
|
||||
#ifndef ENVIRONMENT
|
||||
#error "Must define ENVIRONMENT..."
|
||||
#endif
|
||||
|
||||
#define HELTECv2 1
|
||||
#define LOLIN32 2
|
||||
#define HELTECv21 3
|
||||
|
||||
|
||||
#if ENVIRONMENT == HELTECv2 //HELTEC WIFI LORA V2
|
||||
|
||||
#define TRIGGER 27
|
||||
#define ECHO 14
|
||||
|
||||
#define VBATT ADC2_CHANNEL_4
|
||||
#define VEXT 21
|
||||
|
||||
#endif
|
||||
|
||||
#if ENVIRONMENT == LOLIN32 //LOLIN32
|
||||
|
||||
#define SDA_OLED 15
|
||||
#define SCL_OLED 4
|
||||
#define RST_OLED 17
|
||||
|
||||
#define TRIGGER 13
|
||||
#define ECHO 14
|
||||
|
||||
#define VBATT ADC2_CHANNEL_1
|
||||
#define VEXT 21
|
||||
#endif
|
||||
|
||||
#if ENVIRONMENT == HELTECv21 //
|
||||
|
||||
#define TRIGGER 27
|
||||
#define ECHO 14
|
||||
|
||||
#define VBATT ADC2_CHANNEL_1
|
||||
#define VEXT 21
|
||||
|
||||
#endif
|
||||
|
||||
#endif //HALH
|
||||
Reference in New Issue
Block a user