cryptnox-sdk-esp32 1.0.0
ESP32 SDK for Cryptnox Hardware Wallet
Loading...
Searching...
No Matches
ESP32Platform Class Reference

CW_Platform backed by FreeRTOS vTaskDelay. More...

#include <ESP32Platform.h>

Inheritance diagram for ESP32Platform:
[legend]
Collaboration diagram for ESP32Platform:
[legend]

Public Member Functions

void sleep_ms (uint32_t ms) override
 Sleep for at least ms milliseconds.
 ~ESP32Platform () override
 Default destructor.

Detailed Description

CW_Platform backed by FreeRTOS vTaskDelay.

The sleep_ms implementation delegates to vTaskDelay(pdMS_TO_TICKS(ms)), yielding the calling FreeRTOS task to the scheduler for at least the requested duration. The actual sleep may be slightly longer than ms due to tick granularity.

Note
Instantiate once and inject into CryptnoxWallet alongside the other adapter objects.
See also
CW_Platform
CryptnoxWallet
Examples
BasicUsage/main/main.cpp, Connect/main/main.cpp, Sign/main/main.cpp, UsdcSigning/main/main.cpp, and VerifyPin/main/main.cpp.

Definition at line 38 of file ESP32Platform.h.

Constructor & Destructor Documentation

◆ ~ESP32Platform()

ESP32Platform::~ESP32Platform ( )
inlineoverride

Default destructor.

Definition at line 52 of file ESP32Platform.h.

Member Function Documentation

◆ sleep_ms()

void ESP32Platform::sleep_ms ( uint32_t ms)
override

Sleep for at least ms milliseconds.

Yield to the FreeRTOS scheduler for at least ms milliseconds.

Calls vTaskDelay(pdMS_TO_TICKS(ms)). The calling FreeRTOS task is blocked and yields the CPU to other ready tasks for the duration.

Parameters
[in]msMinimum sleep duration in milliseconds. A value of 0 yields once to the scheduler without a guaranteed delay.

Definition at line 20 of file ESP32Platform.cpp.


The documentation for this class was generated from the following files: