esphome-ratgdo/components/ratgdo/rolling_code.h

22 lines
590 B
C
Raw Normal View History

2023-06-05 17:12:51 +00:00
#ifndef _RATGDO_ROLLING_CODE_H
#define _RATGDO_ROLLING_CODE_H
2023-06-05 17:13:01 +00:00
#include "BootstrapManager.h"
2023-06-05 17:12:51 +00:00
#include <Arduino.h>
#include <ArduinoJson.h>
2023-06-05 17:13:01 +00:00
#include <LittleFS.h>
2023-06-05 17:12:51 +00:00
extern "C" {
#include "secplus.h"
}
2023-06-05 17:13:01 +00:00
void readCounterFromFlash(); // get the rolling code counter from setup.json &
// return it
void writeCounterToFlash(); // write the counter back to setup.json
void getRollingCode(
const char
*command); // get the next rolling code for type
// [reboot1,reboot2,reboot3,reboot4,reboot5,door1,light]
2023-06-05 17:12:51 +00:00
void printRollingCode();
#endif