Skip to content

Commit

Permalink
Update to VSCP framework v2.3.0, please see the [changelog](https://g…
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueAndi committed Jan 20, 2025
1 parent 9b29860 commit e4bbdf8
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.3.0

- Update to VSCP framework v2.3.0, please see the [changelog](https://github.com/BlueAndi/vscp-framework/releases/tag/v2.3.0) there.

## 2.2.0

- Update to VSCP framework v2.2.0, please see the [changelog](https://github.com/BlueAndi/vscp-framework/releases/tag/v2.2.0) there.
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vscp-arduino",
"version": "2.2.0",
"version": "2.3.0",
"keywords": "vscp, arduino-library, vscp-arduino, automation, home automation",
"description": "Very Simple Control Procotol (VSCP) Level 1 Library for the arduino IDE.",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=VSCP
version=2.2.0
version=2.3.0
author=Andreas Merkle
maintainer=Andreas Merkle <[email protected]>
sentence=Very Simple Control Protocol L1 framework for all Arduino boards.
Expand Down
12 changes: 12 additions & 0 deletions src/framework/core/vscp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1563,6 +1563,18 @@ static inline void vscp_core_handleProtocolClassType(void)
/* Boot loader specific event. Not supported. */
break;

case VSCP_TYPE_PROTOCOL_BOOT_LOADER_ABORT:
/* Boot loader specific event. Not supported. */
break;

case VSCP_TYPE_PROTOCOL_BOOT_LOADER_ABORT_ACK:
/* Boot loader specific event. Not supported. */
break;

case VSCP_TYPE_PROTOCOL_BOOT_LOADER_ABORT_NACK:
/* Boot loader specific event. Not supported. */
break;

/* Not handled type */
default:
break;
Expand Down
6 changes: 3 additions & 3 deletions src/framework/core/vscp_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ extern "C"
#define VSCP_CORE_VERSION_MINOR (15)

/** VSCP specification sub-minor version number, the framework is compliant to. */
#define VSCP_CORE_VERSION_SUB_MINOR (9)
#define VSCP_CORE_VERSION_SUB_MINOR (10)

/** VSCP specification version string, the framework is compliant to. */
#define VSCP_CORE_VERSION_STR "v1.15.9"
#define VSCP_CORE_VERSION_STR "v1.15.10"

/** VSCP framework version string */
#define VSCP_CORE_FRAMEWORK_VERSION "v2.2.0"
#define VSCP_CORE_FRAMEWORK_VERSION "v2.3.0"

/*******************************************************************************
MACROS
Expand Down
34 changes: 34 additions & 0 deletions src/framework/core/vscp_type_protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,40 @@ extern "C"
*/
#define VSCP_TYPE_PROTOCOL_BOOT_LOADER_CHECK 54

/**
* Not mandatory. Only needed if a VSCP boot-loader algorithm is used.
* Part of the VSCP boot-loader functionality. This event provide a way to leave the bootloader in a
* secure fashion if there is problems loading firmware to a device. It is only available if the
* device has a bootloader that supports this functionality. Typically this is a device that has
* several firmware slots and can switch between them, and by that switch back to the last known
* working firmware.
* The event can be sent in all states of the bootloading procedure.
* CLASS1.PROTOCOL, Type=56 (Bootloader abort ACK), should be sent as a positive response to a
* bootloader exit or rollback.
* CLASS1.PROTOCOL, Type=57 (Bootloader abort NACK), should be sent as a negative response to a
* bootloader exit or rollback.
*/
#define VSCP_TYPE_PROTOCOL_BOOT_LOADER_ABORT 55

/**
* Not mandatory. Only needed if a VSCP boot-loader algorithm is used.
* Part of the VSCP boot-loader functionality. This event is a positive response to a bootloader abort
* or rollback CLASS1.PROTOCOL, Type=55 (Bootloader abort).
* Event is sent before execution of the new firmware starts. It is used to tell the controlling
* device that the device is ready to leave the bootloader mode and start the new firmware.
*/
#define VSCP_TYPE_PROTOCOL_BOOT_LOADER_ABORT_ACK 56

/**
* Not mandatory. Only needed if a VSCP boot-loader algorithm is used.
* Part of the VSCP boot-loader functionality. This event is a negative response to a bootloader abort
* or rollback CLASS1.PROTOCOL, Type=55 (Bootloader abort).
* On a single slot firmware device where a firmware update has failed and there is no working
* firmware to switch back to this event should be sent to tell the controlling device that we can't
* leave the bootloader mode until a new full firmware has been loaded.
*/
#define VSCP_TYPE_PROTOCOL_BOOT_LOADER_ABORT_NACK 57

/*******************************************************************************
MACROS
*******************************************************************************/
Expand Down
48 changes: 48 additions & 0 deletions src/framework/events/vscp_evt_protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -1359,3 +1359,51 @@ extern BOOL vscp_evt_protocol_sendBootloaderCheck(void)
return vscp_core_sendEvent(&txMsg);
}

/**
* Bootloader Abort.
*
* @return If event is sent, it will return TRUE otherwise FALSE.
*/
extern BOOL vscp_evt_protocol_sendBootloaderAbort(void)
{
vscp_TxMessage txMsg;

vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_PROTOCOL, VSCP_TYPE_PROTOCOL_BOOT_LOADER_ABORT, VSCP_PRIORITY_3_NORMAL);

txMsg.dataSize = 0;

return vscp_core_sendEvent(&txMsg);
}

/**
* Bootloader Abort ACK.
*
* @return If event is sent, it will return TRUE otherwise FALSE.
*/
extern BOOL vscp_evt_protocol_sendBootloaderAbortAck(void)
{
vscp_TxMessage txMsg;

vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_PROTOCOL, VSCP_TYPE_PROTOCOL_BOOT_LOADER_ABORT_ACK, VSCP_PRIORITY_3_NORMAL);

txMsg.dataSize = 0;

return vscp_core_sendEvent(&txMsg);
}

/**
* Bootloader Abort NACK.
*
* @return If event is sent, it will return TRUE otherwise FALSE.
*/
extern BOOL vscp_evt_protocol_sendBootloaderAbortNack(void)
{
vscp_TxMessage txMsg;

vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_PROTOCOL, VSCP_TYPE_PROTOCOL_BOOT_LOADER_ABORT_NACK, VSCP_PRIORITY_3_NORMAL);

txMsg.dataSize = 0;

return vscp_core_sendEvent(&txMsg);
}

21 changes: 21 additions & 0 deletions src/framework/events/vscp_evt_protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,27 @@ extern BOOL vscp_evt_protocol_sendBlockDataChunkNack(void);
*/
extern BOOL vscp_evt_protocol_sendBootloaderCheck(void);

/**
* Bootloader Abort.
*
* @return If event is sent, it will return TRUE otherwise FALSE.
*/
extern BOOL vscp_evt_protocol_sendBootloaderAbort(void);

/**
* Bootloader Abort ACK.
*
* @return If event is sent, it will return TRUE otherwise FALSE.
*/
extern BOOL vscp_evt_protocol_sendBootloaderAbortAck(void);

/**
* Bootloader Abort NACK.
*
* @return If event is sent, it will return TRUE otherwise FALSE.
*/
extern BOOL vscp_evt_protocol_sendBootloaderAbortNack(void);

#ifdef __cplusplus
}
#endif
Expand Down

0 comments on commit e4bbdf8

Please sign in to comment.