ESP-Miner/main/nvs_config.h
johnny9 6949b73bb9 nvs_config: introduce configuration through NVS
Stratum and Wifi configuration can now be read from NVS on the
flash. An example config.cvs file is included and can be used
to generate the partition and then be flashed to the esp32 using
the esp-idf parttool.py.
2023-07-01 14:23:35 -04:00

19 lines
618 B
C

#ifndef MAIN_NVS_CONFIG_H
#define MAIN_NVS_CONFIG_H
#include <stdint.h>
#define NVS_CONFIG_WIFI_SSID "wifissid"
#define NVS_CONFIG_WIFI_PASS "wifipass"
#define NVS_CONFIG_STRATUM_URL "stratumurl"
#define NVS_CONFIG_STRATUM_PORT "stratumport"
#define NVS_CONFIG_STRATUM_USER "stratumuser"
#define NVS_CONFIG_STRATUM_PASS "stratumpass"
#define NVS_CONFIG_BM1397_FREQ "bm1397frequency"
#define NVS_CONFIG_BM1397_VOLTAGE "bm1397voltage"
char * nvs_config_get_string(const char * key, const char * default_value);
uint16_t nvs_config_get_u16(const char * key, const uint16_t default_value);
#endif // MAIN_NVS_CONFIG_H