Expose the merge sensor via USB.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "test_led.h"
|
||||
#include "i2c_addresses.h"
|
||||
#include "led_driver.h"
|
||||
#include "merge_sensor.h"
|
||||
|
||||
void SetError(uint8_t error);
|
||||
void SetGenericError();
|
||||
@@ -14,6 +15,7 @@ void WriteLedDriver();
|
||||
void ReadLedDriver();
|
||||
void WriteEeprom();
|
||||
void ReadEeprom();
|
||||
void ReadMergeSensor();
|
||||
|
||||
// Functions for setting error statuses
|
||||
|
||||
@@ -59,6 +61,9 @@ void UsbProtocolHandler()
|
||||
case USB_COMMAND_READ_EEPROM:
|
||||
ReadEeprom();
|
||||
break;
|
||||
case USB_COMMAND_READ_MERGE_SENSOR:
|
||||
ReadMergeSensor();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -173,3 +178,8 @@ void ReadEeprom()
|
||||
|
||||
GenericHidOutBuffer[0] = PROTOCOL_RESPONSE_SUCCESS;
|
||||
}
|
||||
|
||||
void ReadMergeSensor()
|
||||
{
|
||||
SetResponseByte(MERGE_SENSOR_IS_MERGED);
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#define USB_COMMAND_WRITE_EEPROM 5
|
||||
#define WRITE_EEPROM_RESPONSE_INVALID_PAYLOAD_SIZE 1
|
||||
#define USB_COMMAND_READ_EEPROM 6
|
||||
#define USB_COMMAND_READ_MERGE_SENSOR 7
|
||||
|
||||
// Functions:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user