From cf7c06297d04bade9cd04c056f9ed510e64dd7bd Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Wed, 5 Aug 2020 03:39:22 +0200 Subject: code -> fw --- fw/esp32/main/app_main.c | 38 ++++++++++++++++++++++++++++++++++++++ fw/esp32/main/component.mk | 8 ++++++++ 2 files changed, 46 insertions(+) create mode 100644 fw/esp32/main/app_main.c create mode 100644 fw/esp32/main/component.mk (limited to 'fw/esp32/main') diff --git a/fw/esp32/main/app_main.c b/fw/esp32/main/app_main.c new file mode 100644 index 0000000..4babcdc --- /dev/null +++ b/fw/esp32/main/app_main.c @@ -0,0 +1,38 @@ +#include +#include + +#include +#include +#include + +#include "i2c.h" +#include "cell.h" +#include "_net.h" +#include "wifi.h" +#include "sock.h" +#include "power.h" +#include "bq25895.h" + +#define ESP_INTR_FLAG_DEFAULT 0 + +// Main application +void app_main() { + tcpip_adapter_init(); + + eos_net_init(); + + eos_cell_pcm_init(); + gpio_install_isr_service(ESP_INTR_FLAG_DEFAULT); + eos_modem_init(); + + eos_cell_init(); + eos_wifi_init(); + eos_sock_init(); + + eos_power_init(); + + eos_i2c_init(); + eos_bq25895_set_ilim(); +} + + diff --git a/fw/esp32/main/component.mk b/fw/esp32/main/component.mk new file mode 100644 index 0000000..61f8990 --- /dev/null +++ b/fw/esp32/main/component.mk @@ -0,0 +1,8 @@ +# +# Main component makefile. +# +# This Makefile can be left empty. By default, it will take the sources in the +# src/ directory, compile them and link them into lib(subdirectory_name).a +# in the build directory. This behaviour is entirely configurable, +# please read the ESP-IDF documents if you need to do this. +# -- cgit v1.2.3