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
This commit is contained in:
parent
1da7c8c8d0
commit
1bff37781b
12 changed files with 35 additions and 36 deletions
|
@ -146,7 +146,7 @@ uint32_t eeprom_read_dword(const uint32_t *addr) {
|
|||
*
|
||||
* FIXME: needs doc
|
||||
*/
|
||||
void eeprom_read_block(void *buf, const void *addr, uint32_t len) {
|
||||
void eeprom_read_block(void *buf, const void *addr, size_t len) {
|
||||
uint32_t offset = (uint32_t)addr;
|
||||
uint8_t *dest = (uint8_t *)buf;
|
||||
uint32_t end = offset + len;
|
||||
|
@ -271,7 +271,7 @@ void eeprom_write_dword(uint32_t *addr, uint32_t value) {
|
|||
*
|
||||
* FIXME: needs doc
|
||||
*/
|
||||
void eeprom_write_block(const void *buf, void *addr, uint32_t len) {
|
||||
void eeprom_write_block(const void *buf, void *addr, size_t len) {
|
||||
uint32_t offset = (uint32_t)addr;
|
||||
const uint8_t *src = (const uint8_t *)buf;
|
||||
|
||||
|
@ -480,7 +480,7 @@ uint32_t eeprom_read_dword(const uint32_t *addr) {
|
|||
return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8) | (eeprom_read_byte(p + 2) << 16) | (eeprom_read_byte(p + 3) << 24);
|
||||
}
|
||||
|
||||
void eeprom_read_block(void *buf, const void *addr, uint32_t len) {
|
||||
void eeprom_read_block(void *buf, const void *addr, size_t len) {
|
||||
const uint8_t *p = (const uint8_t *)addr;
|
||||
uint8_t * dest = (uint8_t *)buf;
|
||||
while (len--) {
|
||||
|
@ -506,7 +506,7 @@ void eeprom_write_dword(uint32_t *addr, uint32_t value) {
|
|||
eeprom_write_byte(p, value >> 24);
|
||||
}
|
||||
|
||||
void eeprom_write_block(const void *buf, void *addr, uint32_t len) {
|
||||
void eeprom_write_block(const void *buf, void *addr, size_t len) {
|
||||
uint8_t * p = (uint8_t *)addr;
|
||||
const uint8_t *src = (const uint8_t *)buf;
|
||||
while (len--) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue