forked from zmkfirmware/zmk
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
|
||
uint8_t gen4_checksum(uint8_t *buffer, uint8_t length) { | ||
uint16_t temp; | ||
uint8_t checksum = 0; | ||
for (temp = 0; temp < length; temp++) | ||
checksum += *(buffer + temp); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#define GEN4_REG_CHIP_ID 0xC2C0 | ||
#define GEN4_REG_FW_VER 0xC2C1 | ||
#define GEN4_REG_SYSCONFIG_1 0xC2C2 | ||
#define GEN4_REG_SYSCONFIG_2 0xC2C3 | ||
#define GEN4_REG_FEEDCONFIG_1 0xC2C4 | ||
#define GEN4_REG_FEEDCONFIG_2 0xC2C5 | ||
#define GEN4_REG_FEEDCONFIG_3 0xC2C6 | ||
#define GEN4_REG_COMPCONFIG_1 0xC2C7 | ||
#define GEN4_REG_PS2_AUXCONTROL 0xC2C8 | ||
#define GEN4_REG_SAMPLERATE 0xC2C9 | ||
#define GEN4_REG_ZIDLE 0xC2CA | ||
#define GEN4_REG_FILTERCONTROL 0xC2CB | ||
#define GEN4_REG_POWERCONTROL 0xC2CE | ||
|
||
#define GEN4_EXT_ACCESS_WRITE 0x0900 | ||
#define GEN4_EXT_ACCESS_READ 0x0901 |