Moving cannonkeys boards to one place, eeprom fix (#4999)

* Move boards to cannonkeys and share resources

* Share common files between cannonkey boards

* Fix ortho60 keymap

* update LED numbers

* Add RGB keys to Ortho60 and Ortho48

* Add Backlight control to default layout Ortho60 and 48

* Remove unnecessary ws2812.c SRC from rules.mk
This commit is contained in:
Andrew Kannan 2019-01-29 23:04:20 -05:00 committed by Drashna Jaelre
parent 74fcfd5335
commit 7186d1581a
61 changed files with 1949 additions and 380 deletions

View file

@ -179,10 +179,14 @@ void eeprom_write_dword (uint32_t *Address, uint32_t Value)
void eeprom_update_dword (uint32_t *Address, uint32_t Value)
{
uint16_t p = (const uint32_t) Address;
EEPROM_WriteDataByte(p, (uint8_t) Value);
EEPROM_WriteDataByte(p+1, (uint8_t) (Value >> 8));
EEPROM_WriteDataByte(p+2, (uint8_t) (Value >> 16));
EEPROM_WriteDataByte(p+3, (uint8_t) (Value >> 24));
uint32_t existingValue = EEPROM_ReadDataByte(p) | (EEPROM_ReadDataByte(p+1) << 8)
| (EEPROM_ReadDataByte(p+2) << 16) | (EEPROM_ReadDataByte(p+3) << 24);
if(Value != existingValue){
EEPROM_WriteDataByte(p, (uint8_t) Value);
EEPROM_WriteDataByte(p+1, (uint8_t) (Value >> 8));
EEPROM_WriteDataByte(p+2, (uint8_t) (Value >> 16));
EEPROM_WriteDataByte(p+3, (uint8_t) (Value >> 24));
}
}
void eeprom_read_block(void *buf, const void *addr, uint32_t len) {