CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
Rtc.cpp File Reference
#include "cdc_hal/IRtc.h"
#include "cdc_log.h"
#include "nvs_flash.h"
#include "nvs.h"
#include "esp_system.h"
#include "esp_timer.h"
#include "esp_clk_tree.h"
#include <sys/time.h>
#include <cstring>

Go to the source code of this file.

Classes

class  cdc::hal::Esp32Rtc

Namespaces

namespace  cdc
namespace  cdc::hal

Functions

IRtccdc::hal::getRtcInstance ()
 Returns the singleton RTC service instance.

Variables

static const char * TAG = "RTC"
static constexpr const char * cdc::hal::NVS_NAMESPACE = "rtc"
 NVS namespace used to persist RTC state across resets.
static constexpr const char * cdc::hal::NVS_KEY_TZ = "tz_offset"
static constexpr const char * cdc::hal::NVS_KEY_TS = "last_ts"
static Esp32Rtc cdc::hal::g_rtc
 Singleton RTC implementation instance.

Variable Documentation

◆ TAG

const char* TAG = "RTC"
static

ESP32-S3 Internal RTC Implementation

Uses the ESP32-S3's internal RTC. Time survives light sleep but NOT deep sleep or power cycles. Time is NOT persisted to NVS - better no time than a wrong/stale time.

Based on: ~/GIT/cdc-badge-os-legacy/components/cdc_badge/cdc_rtc.cpp

Definition at line 21 of file Rtc.cpp.