This commit is contained in:
Michal Moskal 2021-04-20 13:34:45 -07:00
Родитель b5f6008beb
Коммит 339e1e7944
1 изменённых файлов: 16 добавлений и 1 удалений

Просмотреть файл

@ -2,8 +2,23 @@ namespace jacdac {
// Service: Control
export const SRV_CONTROL = 0x0
export const enum ControlRestartLightFlags { // uint8_t
RestartCounterSteady = 0xf,
RestartCounter1 = 0x1,
RestartCounter2 = 0x2,
RestartCounter4 = 0x4,
RestartCounter8 = 0x8,
StatusLightMono = 0x10,
StatusLightRgbNoFade = 0x20,
StatusLightRgbFade = 0x30,
}
export const enum ControlAnnounceFlags { // uint8_t
SupportsACK = 0x1,
SupportsBroadcast = 0x2,
SupportsFrames = 0x4,
IsClient = 0x8,
}
export const enum ControlCmd {
@ -22,7 +37,7 @@ namespace jacdac {
/**
* report Services
* ```
* const [restartCounter, flags, packetCount, serviceClass] = jdunpack<[number, jacdac.ControlAnnounceFlags, number, number[]]>(buf, "u8 u8 u8 x[1] u32[]")
* const [restartCounter, flags, packetCount, serviceClass] = jdunpack<[jacdac.ControlRestartLightFlags, jacdac.ControlAnnounceFlags, number, number[]]>(buf, "u8 u8 u8 x[1] u32[]")
* ```
*/