feat(config): Read / write hardware configuration area (#423)
* add write-hca.js * refactor: Move config serializer into the uhk-common package * refactor: Move getTransferBuffers into the uhk-usb package * refactor: delete obsoleted classes * build: add uhk-usb build command * refactor: move eeprom transfer to uhk-usb package * fix: Fix write-hca.js * feat: load hardware config from the device and * style: fix ts lint errors * build: fix rxjs dependency resolve * test: Add jasmine unit test framework to the tet serializer * fix(user-config): A "type": "basic", properties to the "keystroke" action types * feat(usb): set chmod+x on write-hca.js * feat(usb): Create USB logger * style: Fix type * build: Add chalk to dependencies. Chalk will colorize the output
This commit is contained in:
committed by
László Monda
parent
1122784bdb
commit
9294bede50
35
packages/uhk-usb/src/constants.ts
Normal file
35
packages/uhk-usb/src/constants.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
export namespace Constants {
|
||||
export const VENDOR_ID = 0x1D50;
|
||||
export const PRODUCT_ID = 0x6122;
|
||||
export const MAX_PAYLOAD_SIZE = 64;
|
||||
}
|
||||
|
||||
/**
|
||||
* UHK USB Communications command. All communication package should have start with a command code.
|
||||
*/
|
||||
export enum UsbCommand {
|
||||
GetProperty = 0,
|
||||
UploadUserConfig = 8,
|
||||
ApplyConfig = 9,
|
||||
LaunchEepromTransfer = 12,
|
||||
ReadHardwareConfig = 13,
|
||||
WriteHardwareConfig = 14,
|
||||
ReadUserConfig = 15,
|
||||
GetKeyboardState = 16
|
||||
}
|
||||
|
||||
export enum EepromTransfer {
|
||||
ReadHardwareConfig = 0,
|
||||
WriteHardwareConfig = 1,
|
||||
ReadUserConfig = 2,
|
||||
WriteUserConfig = 3
|
||||
}
|
||||
|
||||
export enum SystemPropertyIds {
|
||||
UsbProtocolVersion = 0,
|
||||
BridgeProtocolVersion = 1,
|
||||
DataModelVersion = 2,
|
||||
FirmwareVersion = 3,
|
||||
HardwareConfigSize = 4,
|
||||
UserConfigSize = 5
|
||||
}
|
||||
Reference in New Issue
Block a user