29 lines
420 B
C
29 lines
420 B
C
#include <hwo/logcsr.h>
|
|
#include <hwo/eeprom.h>
|
|
#include <hwo/utils.h>
|
|
|
|
#include <avr/io.h>
|
|
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
|
|
#ifndef MCUCSR
|
|
#define MCUCSR MCUSR
|
|
#endif
|
|
|
|
extern struct avr_eeprom_desc __ee_desc;
|
|
|
|
LogCSR *_csrbuffer;
|
|
|
|
LogCSR* get_csr_log(void)
|
|
{
|
|
if (!_csrbuffer)
|
|
{
|
|
_csrbuffer = malloc_ts(sizeof(LogCSR));
|
|
eeprom_load(__ee_desc.num_banks-1,&_csrbuffer->eeprom);
|
|
};
|
|
return _csrbuffer;
|
|
};
|
|
|
|
|