2014-11-10 14:16:45 +00:00
|
|
|
#ifndef __PROM_H__
|
|
|
|
#define __PROM_H__
|
|
|
|
|
2014-10-18 11:33:48 +00:00
|
|
|
class prom: public Memory::Device {
|
|
|
|
public:
|
2018-08-13 13:41:23 +00:00
|
|
|
virtual void operator= (uint8_t) {}
|
2018-11-07 21:37:20 +00:00
|
|
|
virtual operator uint8_t () { return pgm_read_byte(_mem+_acc); }
|
2014-10-18 11:33:48 +00:00
|
|
|
|
2018-08-13 13:41:23 +00:00
|
|
|
prom(const uint8_t *mem, int uint8_ts): Memory::Device(uint8_ts), _mem(mem) {}
|
2014-10-18 11:33:48 +00:00
|
|
|
|
|
|
|
private:
|
2018-08-13 13:41:23 +00:00
|
|
|
const uint8_t *_mem;
|
2014-10-18 11:33:48 +00:00
|
|
|
};
|
2014-11-10 14:16:45 +00:00
|
|
|
|
|
|
|
#endif
|