aura: support keyboard LED enable/disable with awake/sleep

This commit is contained in:
Luke D. Jones
2021-04-25 12:28:09 +12:00
parent ab80b0742f
commit 1a4836246f
5 changed files with 125 additions and 11 deletions

View File

@@ -14,3 +14,23 @@ pub const fn aura_brightness_bytes(brightness: u8) -> [u8; 17] {
0x5A, 0xBA, 0xC5, 0xC4, brightness, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
]
}
/// Enable the keyboard when laptop is awake
pub const LED_AWAKE_ON: [u8; 17] = [
0x5d, 0xbd, 0x01, 0xcf, 0x17, 0x0b, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
];
/// Disable the keyboard when laptop is awake
pub const LED_AWAKE_OFF: [u8; 17] = [
0x5d, 0xbd, 0x01, 0xc3, 0x13, 0x09, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
];
/// Enable animations when the laptop is suspended while plugged in
pub const LED_SLEEP_ON: [u8; 17] = [
0x5d, 0xbd, 0x01, 0xff, 0x1f, 0x0f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
];
/// Disable animations when the laptop is suspended while plugged in
pub const LED_SLEEP_OFF: [u8; 17] = [
0x5d, 0xbd, 0x01, 0xcf, 0x17, 0x0b, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
];