msg_t msg;
if (usb_led & (1<<USB_LED_NUM_LOCK)) {
- // signal the LED control thread
chSysUnconditionalLock();
msg=(TOGGLE_NUM_LOCK << 8) | 1;
chMBPostI(&led_mailbox, msg);
chSysUnconditionalUnlock();
} else {
- // signal the LED control thread
chSysUnconditionalLock();
msg=(TOGGLE_NUM_LOCK << 8) | 0;
chMBPostI(&led_mailbox, msg);
chSysUnconditionalUnlock();
}
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
- // signal the LED control thread
chSysUnconditionalLock();
msg=(TOGGLE_CAPS_LOCK << 8) | 1;
chMBPostI(&led_mailbox, msg);
chSysUnconditionalUnlock();
} else {
- // signal the LED control thread
chSysUnconditionalLock();
msg=(TOGGLE_CAPS_LOCK << 8) | 0;
chMBPostI(&led_mailbox, msg);