CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
cdc::ui::PsramCjsonScope Struct Reference

Routes cJSON allocations to PSRAM for the lifetime of the scope. More...

#include <PsramCjson.h>

Public Member Functions

 PsramCjsonScope ()
 ~PsramCjsonScope ()

Static Public Member Functions

static void * alloc (std::size_t sz)

Detailed Description

Routes cJSON allocations to PSRAM for the lifetime of the scope.

cJSON hooks are GLOBAL process state, so this is safe only for single-threaded use: do not nest scopes across threads or run two cJSON trees concurrently under different hook sets.

Definition at line 27 of file PsramCjson.h.

Constructor & Destructor Documentation

◆ PsramCjsonScope()

cdc::ui::PsramCjsonScope::PsramCjsonScope ( )
inline

Definition at line 31 of file PsramCjson.h.

References alloc().

◆ ~PsramCjsonScope()

cdc::ui::PsramCjsonScope::~PsramCjsonScope ( )
inline

Definition at line 35 of file PsramCjson.h.

Member Function Documentation

◆ alloc()

void * cdc::ui::PsramCjsonScope::alloc ( std::size_t sz)
inlinestatic

Definition at line 28 of file PsramCjson.h.

Referenced by PsramCjsonScope().


The documentation for this struct was generated from the following file: