Git Product home page Git Product logo

esp32-eaas's Introduction

KNU Equipment as a Service(EaaS) for ESP32 EaaS Library

API List

Include Library

platformIO

lib_deps = 
    https://github.com/111KNUIM-EaaS/esp32-EaaS

main.cpp

#include <Arduino.h>
#include <EaaS.h>

void setup() {
    init_EaaS();
}

void loop() {
    loop_eaas();
}

API (User can not used)

๐Ÿ“„ EaaS

void init_EaaS(void);

๐Ÿ“„ call this function in setup()

void loop_eaas(void *parameter);

๐Ÿ“„ When OTA is running, this function is ready to Get OTA data.

void EaaS_OTA();

๐Ÿ“„ When OTA is running, loop_eaas will call to this function.

๐Ÿ’ซ EaaS_OTA

void init_EaaS_OTA(char *user, char *passwd);

๐Ÿ’ซ This function is save user and password for EaaS_OTA file.

int flash_EaaS_firmware();

๐Ÿ’ซ This function is flash EaaS_OTA firmware.
return 0 is susses, other is fail.

๐Ÿ—ƒ๏ธ EaaS_nvs

esp_err_t init_Eaas_nvs     (void);

๐Ÿ—ƒ๏ธ This function is init nvs.

esp_err_t open_Eaas_nvs     (nvs_handle_t *handle, const char* name);

๐Ÿ—ƒ๏ธ This function is open nvs.

esp_err_t get_sta_ssid      (nvs_handle_t *handle, char** ssid);
esp_err_t get_sta_password  (nvs_handle_t *handle, char** password);
esp_err_t get_user_password (nvs_handle_t *handle, char** password);
esp_err_t get_nvs_str       (nvs_handle_t *handle, const char* name, char** value);

esp_err_t get_mac           (nvs_handle_t *handle, uint8_t* mac, char** user_name);

๐Ÿ—ƒ๏ธ This function is get nvs data.

esp_err_t close_Eaas_nvs    (nvs_handle_t *handle);

๐Ÿ—ƒ๏ธ This function is close nvs.

๐Ÿš€ EaaS_network

void init_EaaS_network(const char* ssid, const char* password, const uint8_t* mac);

๐Ÿš€ This function is init network.

๐ŸŒ EaaS_client

void init_client(char* user, char* passwd);

๐ŸŒ This function is init client and save user and password.

void set_machine_status(const uint8_t status);

๐ŸŒ This function is set machine status.
0: offline, 1: booting, 2: boot, 3: pausing, 4: pause, 5: otaing, 6: ota

uint8_t loop_eaas_status();

๐ŸŒ This function is loop eaas, Get status from server.

esp32-eaas's People

Contributors

hsun1031 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.