mirror of
https://github.com/hrvach/deskhop.git
synced 2025-02-22 04:31:45 +01:00
swap tabs for spaces
This commit is contained in:
parent
15dcc18aa9
commit
9af1966106
@ -193,7 +193,7 @@ void process_hid_queue_task(device_t *state) {
|
|||||||
|
|
||||||
/* ... then we can remove it from the queue. Race conditions shouldn't happen [tm] */
|
/* ... then we can remove it from the queue. Race conditions shouldn't happen [tm] */
|
||||||
if (succeeded)
|
if (succeeded)
|
||||||
queue_try_remove(&state->hid_queue_out, &packet);
|
queue_try_remove(&state->hid_queue_out, &packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Task that handles copying firmware from the other device to ours */
|
/* Task that handles copying firmware from the other device to ours */
|
||||||
|
10
src/utils.c
10
src/utils.c
@ -42,13 +42,13 @@ uint32_t crc32_iter(uint32_t crc, const uint8_t byte) {
|
|||||||
|
|
||||||
/* TODO - use DMA sniffer's built-in CRC32 */
|
/* TODO - use DMA sniffer's built-in CRC32 */
|
||||||
uint32_t calc_crc32(const uint8_t *s, size_t n) {
|
uint32_t calc_crc32(const uint8_t *s, size_t n) {
|
||||||
uint32_t crc = 0xffffffff;
|
uint32_t crc = 0xffffffff;
|
||||||
|
|
||||||
for(size_t i=0; i < n; i++) {
|
for(size_t i=0; i < n; i++) {
|
||||||
crc = crc32_iter(crc, s[i]);
|
crc = crc32_iter(crc, s[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ~crc;
|
return ~crc;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t calculate_firmware_crc32(void) {
|
uint32_t calculate_firmware_crc32(void) {
|
||||||
@ -195,7 +195,7 @@ bool validate_packet(uart_packet_t *packet) {
|
|||||||
const enum packet_type_e ALLOWED_PACKETS[] = {
|
const enum packet_type_e ALLOWED_PACKETS[] = {
|
||||||
FLASH_LED_MSG,
|
FLASH_LED_MSG,
|
||||||
GET_VAL_MSG,
|
GET_VAL_MSG,
|
||||||
GET_ALL_VALS_MSG,
|
GET_ALL_VALS_MSG,
|
||||||
SET_VAL_MSG,
|
SET_VAL_MSG,
|
||||||
WIPE_CONFIG_MSG,
|
WIPE_CONFIG_MSG,
|
||||||
SAVE_CONFIG_MSG,
|
SAVE_CONFIG_MSG,
|
||||||
|
Loading…
Reference in New Issue
Block a user