Skip to content

Commit e4bbdf8

Browse files
committed
Update to VSCP framework v2.3.0, please see the [changelog](https://github.com/BlueAndi/vscp-framework/releases/tag/v2.3.0) there.
1 parent 9b29860 commit e4bbdf8

File tree

8 files changed

+124
-5
lines changed

8 files changed

+124
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.3.0
2+
3+
- Update to VSCP framework v2.3.0, please see the [changelog](https://github.com/BlueAndi/vscp-framework/releases/tag/v2.3.0) there.
4+
15
## 2.2.0
26

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

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vscp-arduino",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"keywords": "vscp, arduino-library, vscp-arduino, automation, home automation",
55
"description": "Very Simple Control Procotol (VSCP) Level 1 Library for the arduino IDE.",
66
"repository": {

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=VSCP
2-
version=2.2.0
2+
version=2.3.0
33
author=Andreas Merkle
44
maintainer=Andreas Merkle <vscp@blue-andi.de>
55
sentence=Very Simple Control Protocol L1 framework for all Arduino boards.

src/framework/core/vscp_core.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,6 +1563,18 @@ static inline void vscp_core_handleProtocolClassType(void)
15631563
/* Boot loader specific event. Not supported. */
15641564
break;
15651565

1566+
case VSCP_TYPE_PROTOCOL_BOOT_LOADER_ABORT:
1567+
/* Boot loader specific event. Not supported. */
1568+
break;
1569+
1570+
case VSCP_TYPE_PROTOCOL_BOOT_LOADER_ABORT_ACK:
1571+
/* Boot loader specific event. Not supported. */
1572+
break;
1573+
1574+
case VSCP_TYPE_PROTOCOL_BOOT_LOADER_ABORT_NACK:
1575+
/* Boot loader specific event. Not supported. */
1576+
break;
1577+
15661578
/* Not handled type */
15671579
default:
15681580
break;

src/framework/core/vscp_core.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ extern "C"
9696
#define VSCP_CORE_VERSION_MINOR (15)
9797

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

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

104104
/** VSCP framework version string */
105-
#define VSCP_CORE_FRAMEWORK_VERSION "v2.2.0"
105+
#define VSCP_CORE_FRAMEWORK_VERSION "v2.3.0"
106106

107107
/*******************************************************************************
108108
MACROS

src/framework/core/vscp_type_protocol.h

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,40 @@ extern "C"
490490
*/
491491
#define VSCP_TYPE_PROTOCOL_BOOT_LOADER_CHECK 54
492492

493+
/**
494+
* Not mandatory. Only needed if a VSCP boot-loader algorithm is used.
495+
* Part of the VSCP boot-loader functionality. This event provide a way to leave the bootloader in a
496+
* secure fashion if there is problems loading firmware to a device. It is only available if the
497+
* device has a bootloader that supports this functionality. Typically this is a device that has
498+
* several firmware slots and can switch between them, and by that switch back to the last known
499+
* working firmware.
500+
* The event can be sent in all states of the bootloading procedure.
501+
* CLASS1.PROTOCOL, Type=56 (Bootloader abort ACK), should be sent as a positive response to a
502+
* bootloader exit or rollback.
503+
* CLASS1.PROTOCOL, Type=57 (Bootloader abort NACK), should be sent as a negative response to a
504+
* bootloader exit or rollback.
505+
*/
506+
#define VSCP_TYPE_PROTOCOL_BOOT_LOADER_ABORT 55
507+
508+
/**
509+
* Not mandatory. Only needed if a VSCP boot-loader algorithm is used.
510+
* Part of the VSCP boot-loader functionality. This event is a positive response to a bootloader abort
511+
* or rollback CLASS1.PROTOCOL, Type=55 (Bootloader abort).
512+
* Event is sent before execution of the new firmware starts. It is used to tell the controlling
513+
* device that the device is ready to leave the bootloader mode and start the new firmware.
514+
*/
515+
#define VSCP_TYPE_PROTOCOL_BOOT_LOADER_ABORT_ACK 56
516+
517+
/**
518+
* Not mandatory. Only needed if a VSCP boot-loader algorithm is used.
519+
* Part of the VSCP boot-loader functionality. This event is a negative response to a bootloader abort
520+
* or rollback CLASS1.PROTOCOL, Type=55 (Bootloader abort).
521+
* On a single slot firmware device where a firmware update has failed and there is no working
522+
* firmware to switch back to this event should be sent to tell the controlling device that we can't
523+
* leave the bootloader mode until a new full firmware has been loaded.
524+
*/
525+
#define VSCP_TYPE_PROTOCOL_BOOT_LOADER_ABORT_NACK 57
526+
493527
/*******************************************************************************
494528
MACROS
495529
*******************************************************************************/

src/framework/events/vscp_evt_protocol.c

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,3 +1359,51 @@ extern BOOL vscp_evt_protocol_sendBootloaderCheck(void)
13591359
return vscp_core_sendEvent(&txMsg);
13601360
}
13611361

1362+
/**
1363+
* Bootloader Abort.
1364+
*
1365+
* @return If event is sent, it will return TRUE otherwise FALSE.
1366+
*/
1367+
extern BOOL vscp_evt_protocol_sendBootloaderAbort(void)
1368+
{
1369+
vscp_TxMessage txMsg;
1370+
1371+
vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_PROTOCOL, VSCP_TYPE_PROTOCOL_BOOT_LOADER_ABORT, VSCP_PRIORITY_3_NORMAL);
1372+
1373+
txMsg.dataSize = 0;
1374+
1375+
return vscp_core_sendEvent(&txMsg);
1376+
}
1377+
1378+
/**
1379+
* Bootloader Abort ACK.
1380+
*
1381+
* @return If event is sent, it will return TRUE otherwise FALSE.
1382+
*/
1383+
extern BOOL vscp_evt_protocol_sendBootloaderAbortAck(void)
1384+
{
1385+
vscp_TxMessage txMsg;
1386+
1387+
vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_PROTOCOL, VSCP_TYPE_PROTOCOL_BOOT_LOADER_ABORT_ACK, VSCP_PRIORITY_3_NORMAL);
1388+
1389+
txMsg.dataSize = 0;
1390+
1391+
return vscp_core_sendEvent(&txMsg);
1392+
}
1393+
1394+
/**
1395+
* Bootloader Abort NACK.
1396+
*
1397+
* @return If event is sent, it will return TRUE otherwise FALSE.
1398+
*/
1399+
extern BOOL vscp_evt_protocol_sendBootloaderAbortNack(void)
1400+
{
1401+
vscp_TxMessage txMsg;
1402+
1403+
vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_PROTOCOL, VSCP_TYPE_PROTOCOL_BOOT_LOADER_ABORT_NACK, VSCP_PRIORITY_3_NORMAL);
1404+
1405+
txMsg.dataSize = 0;
1406+
1407+
return vscp_core_sendEvent(&txMsg);
1408+
}
1409+

src/framework/events/vscp_evt_protocol.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,27 @@ extern BOOL vscp_evt_protocol_sendBlockDataChunkNack(void);
529529
*/
530530
extern BOOL vscp_evt_protocol_sendBootloaderCheck(void);
531531

532+
/**
533+
* Bootloader Abort.
534+
*
535+
* @return If event is sent, it will return TRUE otherwise FALSE.
536+
*/
537+
extern BOOL vscp_evt_protocol_sendBootloaderAbort(void);
538+
539+
/**
540+
* Bootloader Abort ACK.
541+
*
542+
* @return If event is sent, it will return TRUE otherwise FALSE.
543+
*/
544+
extern BOOL vscp_evt_protocol_sendBootloaderAbortAck(void);
545+
546+
/**
547+
* Bootloader Abort NACK.
548+
*
549+
* @return If event is sent, it will return TRUE otherwise FALSE.
550+
*/
551+
extern BOOL vscp_evt_protocol_sendBootloaderAbortNack(void);
552+
532553
#ifdef __cplusplus
533554
}
534555
#endif

0 commit comments

Comments
 (0)