21 #ifndef COSA_EEPROM_HH 22 #define COSA_EEPROM_HH 59 virtual int read(
void* dest,
const void* src,
size_t size);
70 virtual int write(
void* dest,
const void* src,
size_t size);
92 __attribute__((always_inline))
94 return (m_dev->is_ready());
102 __attribute__((always_inline))
115 int read(
void* dest,
const void* src,
size_t size)
116 __attribute__((always_inline))
118 return (m_dev->read(dest, src, size));
128 template<
class T>
int read(T* dest,
const T* src)
130 return (m_dev->read(dest, src,
sizeof(T)));
133 int read(
unsigned char* dest,
const unsigned char* src)
134 __attribute__((always_inline))
136 return (m_dev->read(dest, src,
sizeof(
unsigned char)));
139 int read(
unsigned short* dest,
const unsigned short* src)
140 __attribute__((always_inline))
142 return (m_dev->read(dest, src,
sizeof(
unsigned short)));
145 int read(
unsigned int* dest,
const unsigned int* src)
146 __attribute__((always_inline))
148 return (m_dev->read(dest, src,
sizeof(
unsigned int)));
151 int read(
unsigned long* dest,
const unsigned long* src)
152 __attribute__((always_inline))
154 return (m_dev->read(dest, src,
sizeof(
unsigned long)));
157 int read(
char* dest,
const char* src)
158 __attribute__((always_inline))
160 return (m_dev->read(dest, src,
sizeof(
char)));
163 int read(
short* dest,
const short* src)
164 __attribute__((always_inline))
166 return (m_dev->read(dest, src,
sizeof(
short)));
169 int read(
int* dest,
const int* src)
170 __attribute__((always_inline))
172 return (m_dev->read(dest, src,
sizeof(
int)));
175 int read(
long* dest,
const long* src)
176 __attribute__((always_inline))
178 return (m_dev->read(dest, src,
sizeof(
long)));
181 int read(
float* dest,
const float* src)
182 __attribute__((always_inline))
184 return (m_dev->read(dest, src,
sizeof(
float)));
195 int write(
void* dest,
const void* src,
size_t size)
196 __attribute__((always_inline))
198 return (m_dev->write(dest, src, size));
209 template<
class T>
int write(T* dest,
const T* src)
211 return (m_dev->write(dest, src,
sizeof(T)));
214 int write(
unsigned char* dest,
unsigned char src)
215 __attribute__((always_inline))
217 return (m_dev->write(dest, &src,
sizeof(
unsigned char)));
220 int write(
unsigned short* dest,
unsigned short src)
221 __attribute__((always_inline))
223 return (m_dev->write(dest, &src,
sizeof(
unsigned short)));
226 int write(
unsigned int* dest,
unsigned int src)
227 __attribute__((always_inline))
229 return (m_dev->write(dest, &src,
sizeof(
unsigned int)));
232 int write(
unsigned long* dest,
unsigned long src)
233 __attribute__((always_inline))
235 return (m_dev->write(dest, &src,
sizeof(
unsigned long)));
239 __attribute__((always_inline))
241 return (m_dev->write(dest, &src,
sizeof(
char)));
245 __attribute__((always_inline))
247 return (m_dev->write(dest, &src,
sizeof(
short)));
251 __attribute__((always_inline))
253 return (m_dev->write(dest, &src,
sizeof(
int)));
257 __attribute__((always_inline))
259 return (m_dev->write(dest, &src,
sizeof(
long)));
263 __attribute__((always_inline))
265 return (m_dev->write(dest, &src,
sizeof(
float)));
int write(float *dest, float src)
EEPROM(Device *dev=&Device::eeprom)
int write(unsigned short *dest, unsigned short src)
int write(char *dest, char src)
int write(unsigned int *dest, unsigned int src)
int read(int *dest, const int *src)
int read(unsigned long *dest, const unsigned long *src)
int read(unsigned short *dest, const unsigned short *src)
int read(void *dest, const void *src, size_t size)
int write(int *dest, int src)
virtual int write(void *dest, const void *src, size_t size)
int read(T *dest, const T *src)
int write(unsigned char *dest, unsigned char src)
int read(long *dest, const long *src)
virtual int read(void *dest, const void *src, size_t size)
int write(void *dest, const void *src, size_t size)
int write(long *dest, long src)
int read(char *dest, const char *src)
int read(float *dest, const float *src)
int write(unsigned long *dest, unsigned long src)
int read(short *dest, const short *src)
int write(T *dest, const T *src)
int read(unsigned char *dest, const unsigned char *src)
int read(unsigned int *dest, const unsigned int *src)
int write(short *dest, short src)