Skip to content

Commit

Permalink
Device code should be 16-bits
Browse files Browse the repository at this point in the history
  • Loading branch information
grodansparadis committed Nov 22, 2024
1 parent 86ed953 commit 3402415
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/vscp/common/vscp-bootdevice-pic1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ CBootDevice_PIC1::deviceInfo(void)
//

int
CBootDevice_PIC1::deviceInit(cguid& ourguid, uint8_t devicecode, bool bAbortOnFirmwareCodeFail)
CBootDevice_PIC1::deviceInit(cguid& ourguid, uint16_t devicecode, bool bAbortOnFirmwareCodeFail)
{
int rv;

Expand Down
2 changes: 1 addition & 1 deletion src/vscp/common/vscp-bootdevice-pic1.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class CBootDevice_PIC1 : public CBootDevice {
MDF is not the same as the one read from the remote device.
@return VSCP_ERROR_SUCCESS on success.
*/
int deviceInit(cguid& ourguid, uint8_t devicecode, bool bAbortOnFirmwareCodeFail = false);
int deviceInit(cguid& ourguid, uint16_t devicecode, bool bAbortOnFirmwareCodeFail = false);

/*!
Write a boot block to the device
Expand Down
2 changes: 1 addition & 1 deletion src/vscp/common/vscp-bootdevice-vscp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ CBootDevice_VSCP::deviceInfo(void)
//

int
CBootDevice_VSCP::deviceInit(cguid &ourguid, uint8_t devicecode, bool bAbortOnFirmwareCodeFail)
CBootDevice_VSCP::deviceInit(cguid &ourguid, uint16_t devicecode, bool bAbortOnFirmwareCodeFail)
{
int rv;
vscpEventEx ex;
Expand Down
2 changes: 1 addition & 1 deletion src/vscp/common/vscp-bootdevice-vscp.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class CBootDevice_VSCP : public CBootDevice {
MDF is not the same as the one read from the remote device.
@return VSCP_ERROR_SUCCESS on success.
*/
int deviceInit(cguid &ourguid, uint8_t devicecode, bool bAbortOnFirmwareCodeFail = false);
int deviceInit(cguid &ourguid, uint16_t devicecode, bool bAbortOnFirmwareCodeFail = false);

/*!
Perform the actual firmware load process
Expand Down
6 changes: 3 additions & 3 deletions src/vscp/common/vscp-bootdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ class CBootDevice {
MDF is not the same as the one read from the remote device.
@return VSCP_ERROR_SUCCESS on success.
*/
virtual int deviceInit(cguid &ourguid, uint8_t devicecode, bool bAbortOnFirmwareCodeFail = false) = 0;
virtual int deviceInit(cguid &ourguid, uint16_t devicecode, bool bAbortOnFirmwareCodeFail = false) = 0;

/*!
Perform the actual firmware load process
Expand Down Expand Up @@ -272,12 +272,12 @@ class CBootDevice {

/*!
The device code tell the type of hardware of the remote device
Must be the same as the firmware we try to load is intended for.
Must/should be the same as for the firmware we try to load.
Some (old) devices will have this code set to 0 in this cae no check
should be performed.
*/
uint8_t m_firmwaredeviceCode;
uint16_t m_firmwaredeviceCode;

/// Our local GUID
cguid m_ourguid;
Expand Down

0 comments on commit 3402415

Please sign in to comment.