mirror of
https://github.com/skot/ESP-Miner.git
synced 2025-03-20 14:51:59 +01:00
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.
19 lines
618 B
C
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
|