cryptnox-sdk-arduino 1.0.0
Arduino library for Cryptnox Hardware Wallet
Loading...
Searching...
No Matches
ArduinoPlatform Class Reference

CW_Platform implementation using Arduino's blocking delay(). More...

#include <ArduinoPlatform.h>

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

Public Member Functions

 ArduinoPlatform ()=default
 ~ArduinoPlatform () override=default
 ArduinoPlatform (const ArduinoPlatform &)=delete
ArduinoPlatformoperator= (const ArduinoPlatform &)=delete
void sleep_ms (uint32_t ms) override
 Block for ms milliseconds via Arduino's delay().
Public Member Functions inherited from CW_Platform
virtual ~CW_Platform ()

Detailed Description

CW_Platform implementation using Arduino's blocking delay().

Single-method adapter — exists only so the SDK can stay platform-independent. Construct one alongside the other adapters and pass it as the 4th argument of CryptnoxWallet's constructor.

Example
PN532Adapter nfc(logger, 10);
CryptnoxWallet wallet(nfc, logger, crypto, platform);
CryptnoxWallet wallet(nfc, serialAdapter, cryptoProvider, platform)
PN532Adapter nfc(serialAdapter, PN532_SS, &SPI)
ArduinoPlatform platform
CW_CryptoProvider implementation for the Arduino UNO R4 (RA4M1).
ArduinoPlatform()=default
High-level interface for interacting with a Cryptnox Hardware Wallet over NFC.
No-op CW_Logger — guarantees nothing reaches the serial port.
CW_NfcTransport implementation over the Adafruit_PN532 driver.
Note
Blocking — sleep_ms parks the calling task until the timeout expires. On bare-metal Arduino this is the expected behaviour; on cooperative-scheduler ports a different platform implementation (e.g. one that yields) is appropriate.
Examples
BasicUsage.ino, Connect.ino, Sign.ino, UsdcSigning.ino, and VerifyPin.ino.

Definition at line 49 of file ArduinoPlatform.h.

Constructor & Destructor Documentation

◆ ArduinoPlatform() [1/2]

ArduinoPlatform::ArduinoPlatform ( )
default

Referenced by ArduinoPlatform(), and operator=().

◆ ~ArduinoPlatform()

ArduinoPlatform::~ArduinoPlatform ( )
overridedefault

◆ ArduinoPlatform() [2/2]

ArduinoPlatform::ArduinoPlatform ( const ArduinoPlatform & )
delete

References ArduinoPlatform().

Member Function Documentation

◆ operator=()

ArduinoPlatform & ArduinoPlatform::operator= ( const ArduinoPlatform & )
delete

References ArduinoPlatform().

◆ sleep_ms()

void ArduinoPlatform::sleep_ms ( uint32_t ms)
overridevirtual

Block for ms milliseconds via Arduino's delay().

Forward to Arduino's delay().

Parameters
[in]msDuration to sleep, in milliseconds.

Implements CW_Platform.

Definition at line 16 of file ArduinoPlatform.cpp.


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