mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-25 22:06:58 +02:00
* preliminary state, compiles good not tested on hardware
* converted struct inverter_t to class Inverter * started with calculation functions (idea from Hubi/mikrocontroller.net)
This commit is contained in:
parent
d195eee498
commit
f6b75aff90
15 changed files with 214 additions and 290 deletions
|
@ -37,7 +37,7 @@ class eep {
|
|||
}
|
||||
|
||||
void read(uint32_t addr, uint8_t data[], uint16_t length) {
|
||||
for(uint8_t i = 0; i < length; i ++) {
|
||||
for(uint16_t i = 0; i < length; i ++) {
|
||||
*(data++) = EEPROM.read(addr++);
|
||||
}
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ class eep {
|
|||
}
|
||||
|
||||
void write(uint32_t addr, uint8_t data[], uint16_t length) {
|
||||
for(uint8_t i = 0; i < length; i ++) {
|
||||
for(uint16_t i = 0; i < length; i ++) {
|
||||
EEPROM.write(addr++, data[i]);
|
||||
}
|
||||
EEPROM.commit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue