Skip to content

Commit

Permalink
fix caps led bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bitsk committed Jan 7, 2022
1 parent 166bdb0 commit 29e22c1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion firmware/keyboard/sipeed_keyboard_68/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ add_definitions(-DCONFIG_BT_DEVICE_NAME="Sipeed Keyboard 68")
set(CONFIG_BT_DIS_SERVER on)
add_definitions(-DCONFIG_BT_GATT_DIS_PNP=1)
add_definitions(-DCONFIG_BT_BAS_SERVER=1)
add_definitions(-DEN_BAT_DEBUG=1)
generate_bin()

IF(CMAKE_BUILD_TYPE MATCHES DEBUG)
Expand All @@ -52,5 +51,6 @@ IF(CMAKE_BUILD_TYPE MATCHES DEBUG)
add_definitions(-DEN_USB_DEBUG=1)
add_definitions(-DEN_SCAN_DEBUG=1)
add_definitions(-DEN_EM_DEBUG=1)
add_definitions(-DEN_BAT_DEBUG=1)
ENDIF(CMAKE_BUILD_TYPE MATCHES DEBUG)

2 changes: 1 addition & 1 deletion firmware/keyboard/sipeed_keyboard_68/smk_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void smk_battery_update_task(void *pvParameters){
}))
BAT_DEBUG("[BAT] battery voltage = %d mV \r\n", voltage);
BAT_DEBUG("[BAT] battery level = %d%% \r\n", level);
vTaskDelay(2000);
vTaskDelay(10000);
}
exit:
vTaskDelete(NULL);
Expand Down
6 changes: 4 additions & 2 deletions firmware/keyboard/sipeed_keyboard_68/smk_spirgb.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ void RGB_DMA_Transmit(struct device *spi, struct device *dmatxch, DRGB * rgbbuff
Bbuf = gammalist[rgbbuffer[i].B];

if(i==CAPS_KEY_LED) {
Gbuf=Rbuf=Bbuf=shared_kb_led&0x02?0xff:0;
if (shared_kb_led&0x02) {
Gbuf = Rbuf = Bbuf = 0xff;
}
}

for (j = 0; j < 8; j++) {
Expand Down Expand Up @@ -88,7 +90,7 @@ void RGB_Transmit(struct device *spi, DRGB * rgbbuffer) {
#endif

/* static */ int rgb_mode = 0;
/* static */ uint8_t rgb_global_brightness = 255;
/* static */ uint8_t rgb_global_brightness = 120;

DRGB RGB_Buffer[RGB_LENGTH];

Expand Down
2 changes: 1 addition & 1 deletion firmware/keyboard/sipeed_keyboard_68/smk_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void usb_init(){ //task init
}

while (!usb_device_is_configured()) {
vTaskDelay(100);
// vTaskDelay(100);
}

// while (1) {
Expand Down

0 comments on commit 29e22c1

Please sign in to comment.