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.

13 line
258 B

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