Harmonize definition ins core (#628)
This commit is contained in:
committed by
Embedded Innovation
parent
e77f3c06cd
commit
c6ff9122b4
@@ -35,7 +35,6 @@
|
||||
#endif
|
||||
|
||||
#define MY_SERIALDEVICE Serial
|
||||
#define MY_DEBUG_BUFFER_SIZE 300
|
||||
|
||||
#if defined __AVR_ATmega328P__
|
||||
#ifndef sleep_bod_disable
|
||||
@@ -73,21 +72,20 @@ do { \
|
||||
#define hwReboot() wdt_enable(WDTO_15MS); while (1)
|
||||
#define hwMillis() millis()
|
||||
#define hwRandomNumberInit() randomSeed(analogRead(MY_SIGNING_SOFT_RANDOMSEED_PIN))
|
||||
#define hwReadConfig(__pos) (eeprom_read_byte((uint8_t*)(__pos)))
|
||||
#define hwReadConfig(__pos) eeprom_read_byte((uint8_t*)(__pos))
|
||||
|
||||
#ifndef eeprom_update_byte
|
||||
#define hwWriteConfig(loc, val) if((uint8_t)(val) != eeprom_read_byte((uint8_t*)(loc))) { eeprom_write_byte((uint8_t*)(loc), (val)); }
|
||||
#define hwWriteConfig(__loc, __val) if((uint8_t)(__val) != eeprom_read_byte((uint8_t*)(__loc))) { eeprom_write_byte((uint8_t*)(__loc), (__val)); }
|
||||
#else
|
||||
#define hwWriteConfig(__pos, __value) (eeprom_update_byte((uint8_t*)(__pos), (__value)))
|
||||
#define hwWriteConfig(__pos, __val) eeprom_update_byte((uint8_t*)(__pos), (__val))
|
||||
#endif
|
||||
|
||||
#define hwReadConfigBlock(__buf, __pos, __length) (eeprom_read_block((__buf), (void*)(__pos), (__length)))
|
||||
#define hwWriteConfigBlock(__buf, __pos, __length) (eeprom_write_block((void*)(__buf), (void*)(__pos), (__length)))
|
||||
#define hwReadConfigBlock(__buf, __pos, __length) eeprom_read_block((void*)(__buf), (void*)(__pos), (__length))
|
||||
#define hwWriteConfigBlock(__buf, __pos, __length) eeprom_write_block((void*)(__buf), (void*)(__pos), (__length))
|
||||
|
||||
|
||||
|
||||
enum period_t
|
||||
{
|
||||
enum period_t {
|
||||
SLEEP_15MS,
|
||||
SLEEP_30MS,
|
||||
SLEEP_60MS,
|
||||
|
||||
Reference in New Issue
Block a user