63 namespace batteryCalibration
115 const ::std::vector<Pixel> &buttons,
116 const ::std::vector<Pixel> &individual);
251 std::string deviceName,
252 std::string deviceManufacturer,
253 bool enableAutoPowerOff,
256 bool usb_enable =
true,
257 bool ble_enable =
true,
258 bool exclusive =
false);
352 const uint8_t *buffer,
364 const uint8_t *buffer,
390 bool notifyConfigChanges,
Types and constants used everywhere for firmware implementation.
void configureForTesting()
Configure period, warning and power-off limits for testing.
void * getHardwareInstance()
Get the Hardware Instance object.
void reportInput(const uint128_t &inputs, uint8_t POVstate, uint8_t leftAxis, uint8_t rightAxis, uint8_t clutchAxis)
Report HID inputs.
void addFakeInput(FakeInput *instance)
Add a fake input instance for testing.
void clear()
Clear calibration data (but may persist in flash memory).
void getReady()
Prepare to run.
bool isConnected()
Tell if there is a host connection.
uint8_t getCount(PixelGroup group)
Get the total number of pixels in a group.
bool supportsCustomHardwareID()
Support for a custom PID/VID.
void notifyInputEvent(const DecouplingEvent &input)
Push an input event into the decoupling queue (for testing)
void reset()
Report all inputs as not active.
void addSample(int reading)
Add an ADC reading to calibration data. The battery should get fully charged before first call.
void reportChangeInConfig()
Report a change in user settings (clutch function, etc.)
void map(bool isAltModeEngaged, uint128_t &bitmap)
Map a firmware-defined input bitmap.
void show(const ::std::vector< Pixel > &telemetry, const ::std::vector< Pixel > &buttons, const ::std::vector< Pixel > &individual)
Show pixel data in all groups.
void begin(std::string deviceName, std::string deviceManufacturer, bool enableAutoPowerOff, uint16_t VID, uint16_t PID, bool usb_enable=true, bool ble_enable=true, bool exclusive=false)
Start BLE/Bluetooth HID.
void onRawInput(DecouplingEvent &input)
Process a single input event.
void configureFakeMonitor(BatteryStatus *fakeStatus)
Configure a fake monitor for testing.
void routeInput(uint8_t inputNumber)
Route an input event to all UI instances.
void reportBatteryLevel(const BatteryStatus &status)
Report current battery level and status to the host computer.
Types and constants required for custom firmware setup.
PixelGroup
Available RGB LED groups for pixel control.
Everything related to the measurement of available battery charge.
Everything related to the HID protocol.
uint16_t onGetFeature(uint8_t report_id, uint8_t *buffer, uint16_t len)
Send feature report.
void onOutput(uint8_t report_id, const uint8_t *buffer, uint16_t len)
Receive an output report.
void getReady()
Prepare to run.
void onReset(uint8_t *report)
Resets data for the input report.
void onReportInput(uint8_t *report, bool notifyConfigChanges, const uint128_t &inputs, uint8_t POVstate, uint8_t leftAxis, uint8_t rightAxis, uint8_t clutchAxis)
Sets data for the input report.
BatteryStatusChrData toBleBatteryStatus(const BatteryStatus &status)
Convert a battery status to the data format required by the BAS specification (BLE only)
void onSetFeature(uint8_t report_id, const uint8_t *buffer, uint16_t len)
Receive a feature report.
Everything related to pixel control.
Everything related to power management.
Holds received telemetry data.
Everything related to the user interface, if available.
Data format for the Battery Level Status characteristic (packed)