Clears any recorded error on the device.
PROTOCOLv2: bRequest: [cmd] wValue: 0x00 wIndex: interface wLength: 0x00 Direction: DEVICE->HOST Data: []
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | × ColorHug2 | × | × ColorHug+ | × | ✓ ColorHugALS | × | ×
Erases flash memory before a write is done. Erasing flash can only be done in 1k byte chunks and should be aligned to 1k.
IN: [1:cmd][2:address][2:length] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | ✓ | × ColorHug2 | ✓ | × ColorHug+ | ✓ | × ColorHugALS | ✓ | ×
Gets the value of the Vref- ADC adjustment.
vref
is a packed float.
IN: [1:cmd] OUT: [1:retval][1:cmd][4:vref]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | × ColorHug2 | × | × ColorHug+ | × | ✓ ColorHugALS | × | ×
Gets the value of the Vref+ ADC adjustment.
vref
is a packed float.
IN: [1:cmd] OUT: [1:retval][1:cmd][4:vref]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | × ColorHug2 | × | × ColorHug+ | × | ✓ ColorHugALS | × | ×
Gets the calibration matrix. The description does not have to be NULL terminated.
types
is a bitmask which corresponds to:
bit: 0 Can be used with LCD panels 1 Can be used with CRT monitors 2 Can be used with projectors 3 Can be used with LED panels 4-7 Reserved for future use
IN: [1:cmd][2:index] OUT: [1:retval][1:cmd][2*9:matrix_value][1:types][23:description]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | ✓ ColorHug+ | × | × ColorHugALS | × | ×
Get the mappings from default calibration type to calibration indexes.
The calibration types are as follows: LCD = 0 CRT = 1 Projector = 2 LED = 3 Custom1 = 4 Custom2 = 5
In the future CustomX may be renamed to another display technology, e.g. e-ink.
IN: [1:cmd] OUT: [1:retval][1:cmd][6*2:types]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | ✓ ColorHug+ | × | × ColorHugALS | × | ×
Gets the spectral indexes for the RGB calibration which are values between 0 and %CH_CCD_SPECTRAL_RESOLUTION pointing to the dominant peak for the color. Red is nominally 625nm, green 520nm and blue 465nm.
IN: [1:cmd] OUT: [1:retval][1:cmd][2:red-idx][2:green-idx][2:blue-idx]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | × ColorHug2 | × | × ColorHug+ | × | ✓ ColorHugALS | × | ×
Get the color select state.
IN: [1:cmd] OUT: [1:retval][1:cmd][1:color_select]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | × ColorHug+ | × | × ColorHugALS | × | ✓
Get the DAC value. scale
is a packed float, where 1.0f is 3.3V
IN: [1:cmd] OUT: [1:retval][1:cmd][4:value]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | × ColorHug2 | × | × ColorHug+ | × | ✓ ColorHugALS | × | ×
Get the dark offsets.
IN: [1:cmd] OUT: [1:retval][1:cmd][2:red][2:green][2:blue]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | × ColorHug+ | × | ✓ ColorHugALS | × | ×
Gets any recorded error from the device.
PROTOCOLv2: bRequest: [cmd] wValue: 0x00 wIndex: interface wLength: 0x00 Direction: DEVICE->HOST Data: [1:error][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | × ColorHug2 | × | × ColorHug+ | × | ✓ ColorHugALS | × | ×
Gets the firmware version.
IN: [1:cmd] OUT: [1:retval][1:cmd][2:major][2:minor][2:micro]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | ✓ | ✓ ColorHug2 | ✓ | ✓ ColorHug+ | ✓ | ✓ ColorHugALS | ✓ | ✓
Get the hardware version.
The hardware versions are as follows: 0x00 = Pre-production hardware 0x01 = ColorHug 0x02 = ColorHug2 0x03 = ColorHug+ 0x04 = ColorHugALS 0x05-0x0f = Reserved for future use
IN: [1:cmd] OUT: [1:retval][1:cmd][1:hw_version]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | ✓ | ✓ ColorHug2 | ✓ | ✓ ColorHug+ | ✓ | ✓ ColorHugALS | ✓ | ✓
Get the illuminant state.
IN: [1:cmd] OUT: [1:retval][1:cmd][1:illuminants]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | × ColorHug2 | × | × ColorHug+ | × | ✓ ColorHugALS | × | ×
Gets the integral time.
IN: [1:cmd] OUT: [1:retval][1:cmd][2:integral_time]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | × ColorHug+ | × | ✓ ColorHugALS | × | ✓
Get the LED state.
IN: [1:cmd] OUT: [1:retval][1:cmd][1:led_state]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | ✓ ColorHug+ | × | ✓ ColorHugALS | ✓ | ✓
Gets the measurement mode.
IN: [1:cmd] OUT: [1:retval][1:cmd][1:measure_mode]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | × ColorHug+ | × | × ColorHugALS | × | ×
Gets the multiplier value.
IN: [1:cmd] OUT: [1:retval][1:cmd][1:multiplier_value]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | × ColorHug+ | × | × ColorHugALS | × | ✓
Get User's Email Address
IN: [1:cmd] OUT: [1:retval][1:cmd][60:owner-email]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | ✓ ColorHug+ | × | ✓ ColorHugALS | × | ×
Get User's Name
IN: [1:cmd] OUT: [1:retval][1:cmd][60:owner-name]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | ✓ ColorHug+ | × | ✓ ColorHugALS | × | ×
Gets the board errata value.
IN: [1:cmd] OUT: [1:retval][1:cmd][2:pcb_errata]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | ✓ ColorHug+ | × | ✓ ColorHugALS | × | ×
Get the post XYZ scaling constant. scale
is a packed float.
IN: [1:cmd] OUT: [1:retval][1:cmd][4:scale]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | × ColorHug+ | × | × ColorHugALS | × | ×
Get the pre XYZ scaling constant. scale
is a packed float.
IN: [1:cmd] OUT: [1:retval][1:cmd][4:scale]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | × ColorHug+ | × | × ColorHugALS | × | ×
Gets the remote hash which is used to get the last profile saved to a public web service.
IN: [1:cmd] OUT: [1:retval][1:cmd][20:sha1_hash]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | ✓ ColorHug+ | × | ✓ ColorHugALS | × | ×
Gets the device serial number.
IN: [1:cmd] OUT: [1:retval][1:cmd][4:serial_number]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | ✓ ColorHug+ | × | ✓ ColorHugALS | × | ✓
Gets the temperature of the sensor in degrees celsius
IN: [1:cmd] OUT: [1:retval][1:cmd][4:temperature]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | × ColorHug2 | × | ✓ ColorHug+ | × | ✓ ColorHugALS | × | ×
Load the SRAM from the EEPROM.
PROTOCOLv2: bRequest: [cmd] wValue: 0x00 wIndex: interface wLength: 0x00 Direction: DEVICE->HOST Data: [1:error][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | × ColorHug2 | × | × ColorHug+ | × | ✓ ColorHugALS | × | ×
Read in raw data from the flash memory.
IN: [1:cmd][2:address][1:length] OUT: [1:retval][1:cmd][1:checksum][1-60:data]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | ✓ | × ColorHug2 | ✓ | × ColorHug+ | ✓ | × ColorHugALS | ✓ | ×
Read in raw data from the SRAM memory.
PROTOCOLv1: IN: [1:cmd][2:address][1:length] OUT: [1:retval][1:cmd][1-60:data]
PROTOCOLv2: bRequest: [cmd] wValue: [address-index/64] wIndex: interface wLength: 0x64 Direction: DEVICE->HOST Data: [64:DATA]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | × ColorHug2 | × | ✓ ColorHug+ | × | ✓ ColorHugALS | × | ×
Reset the processor.
IN: [1:cmd] OUT: [1:retval][1:cmd] (but with success the device will disconnect)
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | ✓ | ✓ ColorHug2 | ✓ | ✓ ColorHug+ | ✓ | ✓ ColorHugALS | ✓ | ✓
Save the SRAM to the EEPROM.
PROTOCOLv2: bRequest: [cmd] wValue: 0x00 wIndex: interface wLength: 0x00 Direction: DEVICE->HOST Data: [1:error][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | × ColorHug2 | × | × ColorHug+ | × | ✓ ColorHugALS | × | ×
Tests the device by trying to get a non-zero reading from each color channel.
IN: [1:cmd] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | ✓ | ✓ ColorHug2 | ✓ | ✓ ColorHug+ | ✓ | ✓ ColorHugALS | ✓ | ×
Sets the calibration matrix.
IN: [1:cmd][2:index][4*9:matrix_value][1:types][23:description] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | ✓ ColorHug+ | × | × ColorHugALS | × | ×
Set the calibration type to index map.
IN: [1:cmd][6*2:types] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | ✓ ColorHug+ | × | × ColorHugALS | × | ×
Sets the spectral indexes for the RGB calibration.
IN: [1:cmd][2:red-idx][2:green-idx][2:blue-idx] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | × ColorHug2 | × | × ColorHug+ | × | ✓ ColorHugALS | × | ×
Set the color select state.
IN: [1:cmd][1:color_select] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | × ColorHug+ | × | × ColorHugALS | × | ✓
Sets the 128 bit encyption key for the device.
PROTOCOLv2: bRequest: [cmd] wValue: 0x00 wIndex: interface wLength: 0x00 Direction: DEVICE->HOST Data: [4:key0][4:key1][4:key2][4:key3]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | × ColorHug2 | × | × ColorHug+ | × | ✓ ColorHugALS | × | ×
Set the DAC value. scale
is a packed float, where 1.0f is 3.3V
IN: [1:cmd][4:value] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | × ColorHug2 | × | × ColorHug+ | × | ✓ ColorHugALS | × | ×
Set the dark offsets for use when taking samples when the measure mode is FREQUENCY. When the measure mode is DURATION these values have no effect.
IN: [1:cmd][2:red][2:green][2:blue] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | × ColorHug+ | × | ✓ ColorHugALS | × | ×
Sets the result of the firmware flashing. The idea of this command is that the flashing interaction is thus:
Reset() device goes to bootloader mode
SetFlashSuccess(FALSE)
WriteFlash($data)
ReadFlash($data) to verify
BootFlash() switch to program mode
SetFlashSuccess(TRUE)
The idea is that we only set the success FALSE from the bootoloader to indicate that on booting we should not boot into the program. We can only set the success true from the new program code so as to verify that the new program boots, and can accept HID commands.
IN: [1:cmd][1:success] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | ✓ | ✓ ColorHug2 | ✓ | ✓ ColorHug+ | ✓ | ✓ ColorHugALS | ✓ | ✓
Different values of success
are permitted in each mode.
Set the illuminants.
IN: [1:cmd][1:illuminant] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | × ColorHug2 | × | × ColorHug+ | × | ✓ ColorHugALS | × | ×
Sets the integral time.
IN: [1:cmd][2:integral_time] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | × ColorHug+ | × | ✓ ColorHugALS | × | ✓
Set the LED state. Using a repeat
value of anything other than
0 will block the processor for the duration of the command.
If repeat
is not 0, then the LEDs are reset to all off at the end
of the sequence.
IN: [1:cmd][1:led_state][1:repeat][1:on-time][1:off-time] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | ✓ ColorHug+ | × | ✓ ColorHugALS | × | ✓
Sets the measurement mode. The mode can either be frequency or pulse duration. The former is well tested, but the latter is much more precise.
IN: [1:cmd][1:measure_mode] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | × ColorHug+ | × | × ColorHugALS | × | ×
Sets the multiplier value.
IN: [1:cmd][1:multiplier_value] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | × ColorHug+ | × | × ColorHugALS | × | ✓
Set User's Email Address
IN: [1:cmd][60:owner-email] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | ✓ ColorHug+ | × | ✓ ColorHugALS | × | ×
Set User's Name
IN: [1:cmd][60:owner-name] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | ✓ ColorHug+ | × | ✓ ColorHugALS | × | ×
Sets the board errata value. Board errata is used to correct swapped LEDs and any future problems discovered that only affect some batches of hardware version 1.
The errata bitmask is as follows: 0x00 = No errata for this PCB 0x01 = Leds are swapped 0x02-0xffff = Reserved for future use
IN: [1:cmd][2:pcb_errata] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | ✓ ColorHug+ | × | ✓ ColorHugALS | × | ×
Set the post XYZ scaling constant. scale
is a packed float.
IN: [1:cmd][4:scale] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | × ColorHug+ | × | × ColorHugALS | × | ×
Set the pre XYZ scaling constant. scale
is a packed float.
IN: [1:cmd][4:scale] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | × ColorHug+ | × | × ColorHugALS | × | ×
Sets the remote SHA1 hash of the profile. This is designed to be used by the calibration program to indicate the key which allows the completed profile to be found from a public web service.
IN: [1:cmd][20:sha1_hash] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | ✓ ColorHug+ | × | ✓ ColorHugALS | × | ×
Sets the device serial number.
IN: [1:cmd][4:serial_number] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | ✓ ColorHug+ | × | ✓ ColorHugALS | × | ×
Take a reading taking into account just dark offsets.
All of red,
green
and blue
are packed float values.
This command is useful if you want to do an ambient reading.
IN: [1:cmd] OUT: [1:retval][1:cmd][4:red][4:green][4:blue]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | ✓ ColorHug+ | × | ✓ ColorHugALS | × | ×
Takes 30 raw samples and returns them in an array.
This command can be used to find the optimum delay between patches by showing a black sample area, then white, and then using this command to find out how long the actual hardware delay is.
It can also be used to find out how stable the device or output is over a small amount of time, typically ~2.5 seconds for the maximum integral time.
IN: [1:cmd] OUT: [1:retval][1:cmd][30:reading_array]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | × ColorHug+ | × | × ColorHugALS | × | ×
Take a raw reading.
IN: [1:cmd] OUT: [1:retval][1:cmd][4:count]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | × ColorHug+ | × | ✓ ColorHugALS | × | ✓
Takes a spectral reading putting %CH_CCD_SPECTRAL_RESOLUTION uint16_t values (typically 7296 bytes) in SRAM. The values are scaled from 0x0000 to 0x03ff and correspond to the actual signal amplitude once Vref- and Vref+ have been taken into account.
IN: [1:cmd] OUT: [1:retval][1:cmd][4:addr]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | × ColorHug2 | × | × ColorHug+ | × | ✓ ColorHugALS | × | ×
Take a reading taking into account:
If the calibration index > %CH_CALIBRATION_MAX then the calibration map is used to find the default calibration index to use.
If the calibration index is set to %CH_CALIBRATION_SPECTRAL then the spectral hardware is used if it is available. The CIE 1931 luminosity function data is used by default.
IN: [1:cmd][2:calibration-index] OUT: [1:retval][1:cmd][4:red][4:green][4:blue]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | ✓ ColorHug+ | × | ✓ ColorHugALS | × | ×
Write values to EEPROM.
IN: [1:cmd][8:eeprom_magic] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | ✓ ColorHug2 | × | ✓ ColorHug+ | × | ✓ ColorHugALS | × | ×
Write raw data to the flash memory. You can only write aligned to a 32 byte boundary, and you must flush any incomplete 64 byte block.
IN: [1:cmd][2:address][1:length][1:checksum][1-32:data] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | ✓ | × ColorHug2 | ✓ | × ColorHug+ | ✓ | × ColorHugALS | ✓ | ×
Write raw data to the SRAM memory.
IN: [1:cmd][2:address][1:length][1-60:data] OUT: [1:retval][1:cmd]
This command is available under these conditions:
| Bootloader | Firmware
---------------+--------------+----------- ColorHug | × | × ColorHug2 | × | ✓ ColorHug+ | × | ✓ ColorHugALS | × | ×
Gets the ADC positive calibration value.
A #GUsbDevice
a #GCancellable, or %NULL
Gets the ADC positive calibration value.
A #GUsbDevice
a #GCancellable, or %NULL
Gets any PCB wavelength_cal from the device.
A #GUsbDevice
a #GCancellable, or %NULL
Gets the illuminants from the device.
A #GUsbDevice
a #GCancellable, or %NULL
Gets the integration time used for taking the next samples.
A #GUsbDevice
a #GCancellable, or %NULL
Gets the LEDs from the device.
A #GUsbDevice
a #GCancellable, or %NULL
Gets any PCB errata from the device.
A #GUsbDevice
a #GCancellable, or %NULL
Gets the serial number from the device.
A #GUsbDevice
a #GCancellable, or %NULL
Gets the spectrum from the device. This queries the device multiple times until the spectrum has been populated.
A #GUsbDevice
a #GCancellable, or %NULL
Gets the spectrum from the device. This queries the device multiple times until the spectrum has been populated.
A #GUsbDevice
A #ChSpectrumKind
a #GCancellable, or %NULL
Gets the PCB board temperature from the device.
A #GUsbDevice
a #GCancellable, or %NULL
Loads the entire SRAM from the device EEPROM.
A #GUsbDevice
a #GCancellable, or %NULL
Gets the device mode from the unique code stored in the firmware data. The firmware identifier has been present since colorhug-1.2.2.bin for ColorHug and all firmware versions for ColorHug2 and ColorHug+.
firmware binary data
size of data
Opens the device ready for use.
A #GUsbDevice
a #GCancellable, or %NULL
Reads a value from the SRAM.
A #GUsbDevice
a #GCancellable, or %NULL
Saves the entire SRAM space into the device EEPROM.
A #GUsbDevice
a #GCancellable, or %NULL
Performs a self test on the device
A #GUsbDevice
a #GCancellable, or %NULL
Sets any PCB wavelength_cal on the device
A #GUsbDevice
a #GCancellable, or %NULL
Sets the firmware signing keys on the device.
IMPORTANT: This can only be called once until the device is unlocked.
A #GUsbDevice
a set of XTEA keys
a #GCancellable, or %NULL
Sets the illuminants on the device
A #GUsbDevice
serial number
a #GCancellable, or %NULL
Sets the integration value for the next sample.
A #GUsbDevice
integration time in ms
a #GCancellable, or %NULL
Sets the LEDs on the device
A #GUsbDevice
serial number
a #GCancellable, or %NULL
Sets any PCB errata on the device
A #GUsbDevice
#ChPcbErrata, e.g. %CH_PCB_ERRATA_SWAPPED_LEDS
a #GCancellable, or %NULL
Sets the serial number on the device
A #GUsbDevice
serial number
a #GCancellable, or %NULL
Sets the spectrum from the device. This sends data multiple multiple times until the spectrum has been populated.
A #GUsbDevice
A #ChSpectrumKind
A #CdSpectrum
a #GCancellable, or %NULL
Takes a reading from the device.
A #GUsbDevice
a #ChSpectrumKind, e.g. %CH_SPECTRUM_KIND_RAW
a #GCancellable, or %NULL
Takes a reading from the device and returns the XYZ value.
A #GUsbDevice
A calibration index or 0 for none
a #GCancellable, or %NULL
Sends a message to the device and waits for a reply.
A #GUsbDevice
The command to use, e.g. %CH_CMD_GET_COLOR_SELECT
The input buffer of data, or %NULL
The input buffer length
The output buffer of data, or %NULL
The output buffer length
A #GCancellable or %NULL
Sends a message to the device and waits for a reply.
A #GUsbDevice
The command to use, e.g. %CH_CMD_GET_COLOR_SELECT
The input buffer of data, or %NULL
The input buffer length
The output buffer of data, or %NULL
The output buffer length
A #GCancellable, or %NULL
A #GAsyncReadyCallback that will be called when finished.
Gets the result from the asynchronous function.
a #GUsbDevice instance.
the #GAsyncResult
Loads the entire SRAM from the device EEPROM.
A #GUsbDevice
A #GBytes
a #GCancellable, or %NULL
Parses a SHA1 hash from a string value.
A string representation of the SHA1 hash
A %ChSha1
Boot into to the flash memory.
IN: [1:cmd] OUT: [1:retval][1:cmd]
This command is available under these conditions:
---------------+--------------+----------- ColorHug | ✓ | × ColorHug2 | ✓ | × ColorHug+ | ✓ | × ColorHugALS | ✓ | ×