Skip to content

Commit

Permalink
fix: Adds dummy EEPROM
Browse files Browse the repository at this point in the history
  • Loading branch information
ntlhui committed Nov 13, 2024
1 parent 94e0e77 commit 1cdac32
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
24 changes: 23 additions & 1 deletion pc_hal/Particle.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,26 @@
*
* @copyright Copyright (c) 2024
*
*/
*/
#ifndef __PC_HAL_PARTICLE_H__
#define __PC_HAL_PARTICLE_H__
class EEPROMClass
{
EEPROMClass()
{
}

template <typename T> T &get(int idx, T &t)
{
return T();
}

template <typename T> const T &put(int idx, const T &t)
{
return t;
}
};

#define EEPROM __fetch_global_EEPROM()
EEPROMClass &__fetch_global_EEPROM();
#endif // __PC_HAL_PARTICLE_H__
18 changes: 18 additions & 0 deletions pc_hal/Particle_dummy.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* @file Particle_dummy.cpp
* @author Nathan Hui ([email protected])
* @brief Dummy Particle Implementation
* @version 0.1
* @date 2024-11-13
*
* @copyright Copyright (c) 2024
*
*/

#include "Particle.h"

EEPROMClass __global_eeprom;
EEPROMClass &__fetch_global_EEPROM()
{
return __global_eeprom;
}

0 comments on commit 1cdac32

Please sign in to comment.