diff options
| author | Ryan <fauxpark@gmail.com> | 2023-10-14 22:21:20 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-14 13:21:20 +0200 |
| commit | 1bff37781bda1d0c285aa5aa7102d6941ad64e7d (patch) | |
| tree | 6348d64c7d7bba987e8bb386768fde33f33ace18 /platforms | |
| parent | 1da7c8c8d0c70c9f614ce898ee3380db0f04fa27 (diff) | |
Prep work for NKRO report separation (#22268)
* Clean up some keyboard/userspace code
* Rename `KEYBOARD_REPORT_BITS` -> `NKRO_REPORT_BITS`
* Add some missing includes
* Use `PACKED` define for report types
* Fix incorrect function signatures for FlexRAM EEPROM driver
Diffstat (limited to 'platforms')
| -rw-r--r-- | platforms/chibios/drivers/eeprom/eeprom_kinetis_flexram.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/platforms/chibios/drivers/eeprom/eeprom_kinetis_flexram.c b/platforms/chibios/drivers/eeprom/eeprom_kinetis_flexram.c index 6468cbf3fa..9cf956b2f7 100644 --- a/platforms/chibios/drivers/eeprom/eeprom_kinetis_flexram.c +++ b/platforms/chibios/drivers/eeprom/eeprom_kinetis_flexram.c | |||
| @@ -146,7 +146,7 @@ uint32_t eeprom_read_dword(const uint32_t *addr) { | |||
| 146 | * | 146 | * |
| 147 | * FIXME: needs doc | 147 | * FIXME: needs doc |
| 148 | */ | 148 | */ |
| 149 | void eeprom_read_block(void *buf, const void *addr, uint32_t len) { | 149 | void eeprom_read_block(void *buf, const void *addr, size_t len) { |
| 150 | uint32_t offset = (uint32_t)addr; | 150 | uint32_t offset = (uint32_t)addr; |
| 151 | uint8_t *dest = (uint8_t *)buf; | 151 | uint8_t *dest = (uint8_t *)buf; |
| 152 | uint32_t end = offset + len; | 152 | uint32_t end = offset + len; |
| @@ -271,7 +271,7 @@ void eeprom_write_dword(uint32_t *addr, uint32_t value) { | |||
| 271 | * | 271 | * |
| 272 | * FIXME: needs doc | 272 | * FIXME: needs doc |
| 273 | */ | 273 | */ |
| 274 | void eeprom_write_block(const void *buf, void *addr, uint32_t len) { | 274 | void eeprom_write_block(const void *buf, void *addr, size_t len) { |
| 275 | uint32_t offset = (uint32_t)addr; | 275 | uint32_t offset = (uint32_t)addr; |
| 276 | const uint8_t *src = (const uint8_t *)buf; | 276 | const uint8_t *src = (const uint8_t *)buf; |
| 277 | 277 | ||
| @@ -480,7 +480,7 @@ uint32_t eeprom_read_dword(const uint32_t *addr) { | |||
| 480 | return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8) | (eeprom_read_byte(p + 2) << 16) | (eeprom_read_byte(p + 3) << 24); | 480 | return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8) | (eeprom_read_byte(p + 2) << 16) | (eeprom_read_byte(p + 3) << 24); |
| 481 | } | 481 | } |
| 482 | 482 | ||
| 483 | void eeprom_read_block(void *buf, const void *addr, uint32_t len) { | 483 | void eeprom_read_block(void *buf, const void *addr, size_t len) { |
| 484 | const uint8_t *p = (const uint8_t *)addr; | 484 | const uint8_t *p = (const uint8_t *)addr; |
| 485 | uint8_t * dest = (uint8_t *)buf; | 485 | uint8_t * dest = (uint8_t *)buf; |
| 486 | while (len--) { | 486 | while (len--) { |
| @@ -506,7 +506,7 @@ void eeprom_write_dword(uint32_t *addr, uint32_t value) { | |||
| 506 | eeprom_write_byte(p, value >> 24); | 506 | eeprom_write_byte(p, value >> 24); |
| 507 | } | 507 | } |
| 508 | 508 | ||
| 509 | void eeprom_write_block(const void *buf, void *addr, uint32_t len) { | 509 | void eeprom_write_block(const void *buf, void *addr, size_t len) { |
| 510 | uint8_t * p = (uint8_t *)addr; | 510 | uint8_t * p = (uint8_t *)addr; |
| 511 | const uint8_t *src = (const uint8_t *)buf; | 511 | const uint8_t *src = (const uint8_t *)buf; |
| 512 | while (len--) { | 512 | while (len--) { |
