Speeduino
Loading...
Searching...
No Matches
prog_mem_support.h
Go to the documentation of this file.
1
5#pragma once
6
15template <typename T>
16static inline T& copyObject_P(const T *pAddress, T &t)
17{
18 (void)memcpy_P(&t, pAddress, sizeof(T));
19 return t;
20}
21
29template <typename T>
30static inline T copyObject_P(const T *pAddress)
31{
32 T t = {};
33 return copyObject_P(pAddress, t);
34}
static TIntegral readSerialIntegralTimeout(void)
Reads an integral type, timing out if necessary.
Definition comms.cpp:175
static T & copyObject_P(const T *pAddress, T &t)
Copy an object stored in flash to an existing RAM based instance.
Definition prog_mem_support.h:16