You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 regels
246 B

  1. #pragma once
  2. #include <Arduino.h>
  3. namespace flash {
  4. template<typename T, size_t N> size_t getFlashArraySize(T(&)[N]) { return N; }
  5. template<typename T> void readFromFlash(const T *source, T &dest) {
  6. memcpy_P(&dest, source, sizeof(T));
  7. }
  8. }