mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
Initial hal changes
This commit is contained in:
parent
d6cbd1bcdd
commit
12b402f994
77 changed files with 924 additions and 672 deletions
30
Software/src/devboard/hal/hal.cpp
Normal file
30
Software/src/devboard/hal/hal.cpp
Normal file
|
@ -0,0 +1,30 @@
|
|||
#include "hal.h"
|
||||
|
||||
#include "../../../USER_SETTINGS.h"
|
||||
|
||||
#include "hw_3LB.h"
|
||||
#include "hw_devkit.h"
|
||||
#include "hw_lilygo.h"
|
||||
#include "hw_stark.h"
|
||||
|
||||
extern Esp32Hal* esp32hal;
|
||||
|
||||
void init_hal() {
|
||||
#if defined(HW_LILYGO)
|
||||
esp32hal = new LilyGoHal();
|
||||
#elif defined(HW_STARK)
|
||||
esp32hal = new StarkHal();
|
||||
#elif defined(HW_3LB)
|
||||
esp32hal = new ThreeLBHal();
|
||||
#elif defined(HW_DEVKIT)
|
||||
esp32hal = new DevKitHal();
|
||||
#else
|
||||
#error "No HW defined."
|
||||
#endif
|
||||
}
|
||||
|
||||
unsigned long millis();
|
||||
|
||||
bool Esp32Hal::system_booted_up() {
|
||||
return milliseconds(millis()) > BOOTUP_TIME();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue