diff --git a/CHANGELOG.md b/CHANGELOG.md index 80b838a..0a3d621 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.0.3 + +- Update to VSCP framework v2.0.3, please see the ![changelog](https://github.com/BlueAndi/vscp-framework/releases/tag/v2.0.3) there. +- Deprecated "dataNum" replaced with "dataSize". Thanks to michpro! + ## 2.0.2 - Update to VSCP framework v2.0.2, please see the ![changelog](https://github.com/BlueAndi/vscp-framework/releases/tag/v2.0.2) there. diff --git a/README.md b/README.md index 2402c87..3dbf58c 100644 --- a/README.md +++ b/README.md @@ -50,10 +50,10 @@ vscp.prepareTxMessage(txMsg, VSCP_CLASS_L1_INFORMATION, VSCP_TYPE_INFORMATION_ON ### Add the class and type specific data. ``` -txMsg.data[0] = 1; // Index -txMsg.data[1] = 0; // Zone -txMsg.data[2] = 0; // Sub zone -txMsg.dataNum = 3; +txMsg.data[0] = 1; // Index +txMsg.data[1] = 0; // Zone +txMsg.data[2] = 0; // Sub zone +txMsg.dataSize = 3; ``` ### Send the event. diff --git a/examples/Generic/Generic.ino b/examples/Generic/Generic.ino index a143502..c3b2eec 100644 --- a/examples/Generic/Generic.ino +++ b/examples/Generic/Generic.ino @@ -46,16 +46,16 @@ bool transportRead(vscp_RxMessage * const rxMsg) { rxMsg->vscpType = ... rxMsg->oAddr = ... rxMsg->hardCoded = ... - rxMsg->dataNum = ... + rxMsg->dataSize = ... // Protect against data buffer out of bounce access - if (VSCP_L1_DATA_SIZE < rxMsg->dataNum) + if (VSCP_L1_DATA_SIZE < rxMsg->dataSize) { - rxMsg->dataNum = VSCP_L1_DATA_SIZE; + rxMsg->dataSize = VSCP_L1_DATA_SIZE; } // Copy the payload - for(index = 0; index < rxMsg->dataNum; ++index) + for(index = 0; index < rxMsg->dataSize; ++index) { rxMsg->data[index] = ... } @@ -79,10 +79,10 @@ bool transportWrite(vscp_TxMessage const * const txMsg) { ... = rxMsg->vscpType; ... = rxMsg->oAddr; ... = rxMsg->hardCoded; - ... = rxMsg->dataNum; + ... = rxMsg->dataSize; // Copy the payload - for(index = 0; index < rxMsg->dataNum; ++index) + for(index = 0; index < rxMsg->dataSize; ++index) { ... = rxMsg->data[index]; } @@ -163,10 +163,10 @@ void loop() { // Send a VSCP message here ... e.g. a CLASS1.INFORMATION ON event vscp.prepareTxMessage(txMsg, VSCP_CLASS_L1_INFORMATION, VSCP_TYPE_INFORMATION_ON, VSCP_PRIORITY_3_NORMAL); - txMsg.data[0] = 1; // Index - txMsg.data[1] = 0; // Zone - txMsg.data[2] = 0; // Sub zone - txMsg.dataNum = 3; + txMsg.data[0] = 1; // Index + txMsg.data[1] = 0; // Zone + txMsg.data[2] = 0; // Sub zone + txMsg.dataSize = 3; vscp.write(txMsg); } else { diff --git a/examples/Seeed-Studio-CAN_BUS_Shield/Seeed-Studio-CAN_BUS_Shield.ino b/examples/Seeed-Studio-CAN_BUS_Shield/Seeed-Studio-CAN_BUS_Shield.ino index 2025a5e..f9ec957 100644 --- a/examples/Seeed-Studio-CAN_BUS_Shield/Seeed-Studio-CAN_BUS_Shield.ino +++ b/examples/Seeed-Studio-CAN_BUS_Shield/Seeed-Studio-CAN_BUS_Shield.ino @@ -50,7 +50,7 @@ bool transportRead(vscp_RxMessage * const rxMsg) { { unsigned long canMsgId = 0; - if (CAN_OK == canCom.readMsgBufID(&canMsgId, &rxMsg->dataNum, rxMsg->data)) { + if (CAN_OK == canCom.readMsgBufID(&canMsgId, &rxMsg->dataSize, rxMsg->data)) { rxMsg->vscpClass = (uint16_t)((canMsgId >> 16) & 0x01ff); rxMsg->vscpType = (uint8_t)((canMsgId >> 8) & 0x00ff); @@ -88,7 +88,7 @@ bool transportWrite(vscp_TxMessage const * const txMsg) { } // Send CAN message - if (CAN_OK != canCom.sendMsgBuf(canMsgId, 1, 0, txMsg->dataNum, (unsigned char*)txMsg->data)) { + if (CAN_OK != canCom.sendMsgBuf(canMsgId, 1, 0, txMsg->dataSize, (unsigned char*)txMsg->data)) { // CAN message couldn't be sent, try again. ++retryCnt; @@ -225,4 +225,4 @@ void loop() { } -} +} diff --git a/examples/Sparkfun_CAN-BUS_Shield/Sparkfun_CAN-BUS_Shield.ino b/examples/Sparkfun_CAN-BUS_Shield/Sparkfun_CAN-BUS_Shield.ino index 8ed9b24..d73874c 100644 --- a/examples/Sparkfun_CAN-BUS_Shield/Sparkfun_CAN-BUS_Shield.ino +++ b/examples/Sparkfun_CAN-BUS_Shield/Sparkfun_CAN-BUS_Shield.ino @@ -54,16 +54,16 @@ bool transportRead(vscp_RxMessage * const rxMsg) { rxMsg->oAddr = (uint8_t)((canMsg.adrsValue >> 0) & 0x00ff); rxMsg->hardCoded = (uint8_t)((canMsg.adrsValue >> 25) & 0x0001); rxMsg->priority = (VSCP_PRIORITY)((canMsg.adrsValue >> 26) & 0x0007); - rxMsg->dataNum = canMsg.dataLength; + rxMsg->dataSize = canMsg.dataLength; // Protect against a buffer out of bounce access - if (VSCP_L1_DATA_SIZE < rxMsg->dataNum) { + if (VSCP_L1_DATA_SIZE < rxMsg->dataSize) { - rxMsg->dataNum = VSCP_L1_DATA_SIZE; + rxMsg->dataSize = VSCP_L1_DATA_SIZE; } // Copy payload - for(index = 0; index < rxMsg->dataNum; ++index) { + for(index = 0; index < rxMsg->dataSize; ++index) { rxMsg->data[index] = canMsg.data[index]; } @@ -94,7 +94,7 @@ bool transportWrite(vscp_TxMessage const * const txMsg) { canMsg.rtr = 0; - canMsg.dataLength = txMsg->dataNum; + canMsg.dataLength = txMsg->dataSize; for(index = 0; index < canMsg.dataLength; ++index) { @@ -242,4 +242,4 @@ void loop() { } -} +} diff --git a/library.json b/library.json index 72452a3..723441c 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "vscp-arduino", - "version": "2.0.2", + "version": "2.0.3", "keywords": "vscp, arduino-library, vscp-arduino, automation, home automation", "description": "Very Simple Control Procotol (VSCP) Level 1 Library for the arduino IDE.", "repository": { diff --git a/library.properties b/library.properties index 8b7187e..270382c 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=VSCP -version=2.0.2 +version=2.0.3 author=Andreas Merkle maintainer=Andreas Merkle sentence=Very Simple Control Protocol L1 framework for all Arduino boards. diff --git a/src/framework/core/vscp_core.h b/src/framework/core/vscp_core.h index 8d5953c..7c723ed 100644 --- a/src/framework/core/vscp_core.h +++ b/src/framework/core/vscp_core.h @@ -102,7 +102,7 @@ extern "C" #define VSCP_CORE_VERSION_STR "v1.13.1" /** VSCP framework version string */ -#define VSCP_CORE_FRAMEWORK_VERSION "v2.0.2" +#define VSCP_CORE_FRAMEWORK_VERSION "v2.0.3" /******************************************************************************* MACROS diff --git a/src/framework/events/vscp_evt_alarm.h b/src/framework/events/vscp_evt_alarm.h index e0e1574..6690d82 100644 --- a/src/framework/events/vscp_evt_alarm.h +++ b/src/framework/events/vscp_evt_alarm.h @@ -49,6 +49,11 @@ This file is automatically generated. Don't change it manually. #include #include "..\user\vscp_platform.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -225,4 +230,8 @@ extern BOOL vscp_evt_alarm_sendWatchdog(uint8_t index, uint8_t zone, uint8_t sub */ extern BOOL vscp_evt_alarm_sendAlarmReset(uint8_t alarmRegister, uint8_t zone, uint8_t subZone); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_ALARM_H__ */ diff --git a/src/framework/events/vscp_evt_aol.h b/src/framework/events/vscp_evt_aol.h index ff01589..642adc4 100644 --- a/src/framework/events/vscp_evt_aol.h +++ b/src/framework/events/vscp_evt_aol.h @@ -49,6 +49,11 @@ This file is automatically generated. Don't change it manually. #include #include "..\user\vscp_platform.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -256,4 +261,8 @@ extern BOOL vscp_evt_aol_sendUpdateBiosImage(uint8_t index, uint8_t zone, uint8_ */ extern BOOL vscp_evt_aol_sendUpdatePerformOtherDiagnosticProcedures(uint8_t index, uint8_t zone, uint8_t subZone); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_AOL_H__ */ diff --git a/src/framework/events/vscp_evt_configuration.h b/src/framework/events/vscp_evt_configuration.h index f82cb11..b55c935 100644 --- a/src/framework/events/vscp_evt_configuration.h +++ b/src/framework/events/vscp_evt_configuration.h @@ -48,6 +48,11 @@ This file is automatically generated. Don't change it manually. #include #include "..\user\vscp_platform.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -279,4 +284,8 @@ extern BOOL vscp_evt_configuration_sendSetParameterAcknowledge(uint16_t paramete */ extern BOOL vscp_evt_configuration_sendSetParamterNegativeAcknowledge(uint16_t parameterid, uint16_t parametervalue); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_CONFIGURATION_H__ */ diff --git a/src/framework/events/vscp_evt_control.h b/src/framework/events/vscp_evt_control.h index 09ed963..1f321a4 100644 --- a/src/framework/events/vscp_evt_control.h +++ b/src/framework/events/vscp_evt_control.h @@ -52,6 +52,11 @@ This file is automatically generated. Don't change it manually. #include #include "..\user\vscp_platform.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -685,4 +690,8 @@ extern BOOL vscp_evt_control_sendIncrement(uint8_t userSpecific, uint8_t zone, u */ extern BOOL vscp_evt_control_sendDecrement(uint8_t userSpecific, uint8_t zone, uint8_t subzone, uint8_t const * const decrementValue, uint8_t decrementValueSize); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_CONTROL_H__ */ diff --git a/src/framework/events/vscp_evt_data.h b/src/framework/events/vscp_evt_data.h index 3e18534..59ba7b4 100644 --- a/src/framework/events/vscp_evt_data.h +++ b/src/framework/events/vscp_evt_data.h @@ -49,6 +49,11 @@ This file is automatically generated. Don't change it manually. #include #include "..\user\vscp_platform.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -152,4 +157,8 @@ extern BOOL vscp_evt_data_sendSignalLevel(uint8_t index, uint8_t unit, int32_t d */ extern BOOL vscp_evt_data_sendSignalQuality(uint8_t index, uint8_t unit, int32_t data, int8_t exp); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_DATA_H__ */ diff --git a/src/framework/events/vscp_evt_diagnostic.h b/src/framework/events/vscp_evt_diagnostic.h index b9faab2..fdb8a7f 100644 --- a/src/framework/events/vscp_evt_diagnostic.h +++ b/src/framework/events/vscp_evt_diagnostic.h @@ -48,6 +48,11 @@ This file is automatically generated. Don't change it manually. #include #include "..\user\vscp_platform.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -1213,4 +1218,8 @@ extern BOOL vscp_evt_diagnostic_sendChargingOn(uint8_t index, uint8_t zone, uint */ extern BOOL vscp_evt_diagnostic_sendChargingOff(uint8_t index, uint8_t zone, uint8_t subZone, uint8_t const * const user, uint8_t userSize); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_DIAGNOSTIC_H__ */ diff --git a/src/framework/events/vscp_evt_display.h b/src/framework/events/vscp_evt_display.h index a7a4436..c26b859 100644 --- a/src/framework/events/vscp_evt_display.h +++ b/src/framework/events/vscp_evt_display.h @@ -48,6 +48,11 @@ This file is automatically generated. Don't change it manually. #include #include "..\user\vscp_platform.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -193,4 +198,8 @@ extern BOOL vscp_evt_display_sendSetLed(uint8_t index, uint8_t zone, uint8_t sub */ extern BOOL vscp_evt_display_sendSetRgbColor(uint8_t index, uint8_t zone, uint8_t subZone, uint8_t red, uint8_t green, uint8_t blue); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_DISPLAY_H__ */ diff --git a/src/framework/events/vscp_evt_error.h b/src/framework/events/vscp_evt_error.h index 291b286..9d74ae6 100644 --- a/src/framework/events/vscp_evt_error.h +++ b/src/framework/events/vscp_evt_error.h @@ -48,6 +48,11 @@ This file is automatically generated. Don't change it manually. #include #include "..\user\vscp_platform.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -604,4 +609,8 @@ extern BOOL vscp_evt_error_sendOperationStoppedOrAborted(uint8_t index, uint8_t */ extern BOOL vscp_evt_error_sendPointerWithInvalidValue(uint8_t index, uint8_t zone, uint8_t subZone, uint8_t const * const user, uint8_t userSize); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_ERROR_H__ */ diff --git a/src/framework/events/vscp_evt_gnss.h b/src/framework/events/vscp_evt_gnss.h index 6eaa625..68fd537 100644 --- a/src/framework/events/vscp_evt_gnss.h +++ b/src/framework/events/vscp_evt_gnss.h @@ -50,6 +50,11 @@ This file is automatically generated. Don't change it manually. #include "..\user\vscp_platform.h" #include +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -100,4 +105,8 @@ extern BOOL vscp_evt_gnss_sendPosition(float_t latitude, float_t longitude); */ extern BOOL vscp_evt_gnss_sendSatellites(uint8_t count); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_GNSS_H__ */ diff --git a/src/framework/events/vscp_evt_information.c b/src/framework/events/vscp_evt_information.c index f2a4a82..b1e24ba 100644 --- a/src/framework/events/vscp_evt_information.c +++ b/src/framework/events/vscp_evt_information.c @@ -43,9 +43,9 @@ This file is automatically generated. Don't change it manually. INCLUDES *******************************************************************************/ #include "vscp_evt_information.h" -#include "..\core\vscp_core.h" -#include "..\core\vscp_class_l1.h" -#include "..\core\vscp_type_information.h" +#include "vscp_core.h" +#include "vscp_class_l1.h" +#include "vscp_type_information.h" /******************************************************************************* COMPILER SWITCHES @@ -1332,12 +1332,12 @@ extern BOOL vscp_evt_information_sendStreamDataWithZone(uint8_t zone, uint8_t su * @param[in] zone Zone for which event applies to (0-255). 255 is all zones. * @param[in] subZone Sub-Zone for which event applies to (0-255). 255 is all sub-zones. * @param[in] sequenceNumber Sequence number. - * @param[in] class Class. - * @param[in] type Type. + * @param[in] vscpClass VSCP class. + * @param[in] vscpType VSCP type. * * @return If event is sent, it will return TRUE otherwise FALSE. */ -extern BOOL vscp_evt_information_sendConfirm(uint8_t zone, uint8_t subZone, uint8_t sequenceNumber, uint16_t class, uint16_t type) +extern BOOL vscp_evt_information_sendConfirm(uint8_t zone, uint8_t subZone, uint8_t sequenceNumber, uint16_t vscpClass, uint16_t vscpType) { vscp_TxMessage txMsg; uint8_t size = 0; @@ -1353,12 +1353,12 @@ extern BOOL vscp_evt_information_sendConfirm(uint8_t zone, uint8_t subZone, uint txMsg.data[2] = sequenceNumber; size += 1; - txMsg.data[3] = (uint8_t)((class >> 8) & 0xff); - txMsg.data[4] = (uint8_t)((class >> 0) & 0xff); + txMsg.data[3] = (uint8_t)((vscpClass >> 8) & 0xff); + txMsg.data[4] = (uint8_t)((vscpClass >> 0) & 0xff); size += 2; - txMsg.data[5] = (uint8_t)((type >> 8) & 0xff); - txMsg.data[6] = (uint8_t)((type >> 0) & 0xff); + txMsg.data[5] = (uint8_t)((vscpType >> 8) & 0xff); + txMsg.data[6] = (uint8_t)((vscpType >> 0) & 0xff); size += 2; txMsg.dataSize = size; diff --git a/src/framework/events/vscp_evt_information.h b/src/framework/events/vscp_evt_information.h index 4f0008d..e907d51 100644 --- a/src/framework/events/vscp_evt_information.h +++ b/src/framework/events/vscp_evt_information.h @@ -50,6 +50,11 @@ This file is automatically generated. Don't change it manually. #include #include "..\user\vscp_platform.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -522,12 +527,12 @@ extern BOOL vscp_evt_information_sendStreamDataWithZone(uint8_t zone, uint8_t su * @param[in] zone Zone for which event applies to (0-255). 255 is all zones. * @param[in] subZone Sub-Zone for which event applies to (0-255). 255 is all sub-zones. * @param[in] sequenceNumber Sequence number. - * @param[in] class Class. - * @param[in] type Type. + * @param[in] vscpClass VSCP class. + * @param[in] vscpType VSCP type. * * @return If event is sent, it will return TRUE otherwise FALSE. */ -extern BOOL vscp_evt_information_sendConfirm(uint8_t zone, uint8_t subZone, uint8_t sequenceNumber, uint16_t class, uint16_t type); +extern BOOL vscp_evt_information_sendConfirm(uint8_t zone, uint8_t subZone, uint8_t sequenceNumber, uint16_t vscpClass, uint16_t vscpType); /** * Level Changed @@ -1093,4 +1098,8 @@ extern BOOL vscp_evt_information_sendDecremented(uint8_t userSpecific, uint8_t z */ extern BOOL vscp_evt_information_sendProximityDetected(uint8_t userSpecific, uint8_t zone, uint8_t subzone, uint16_t const * const proximityLevel); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_INFORMATION_H__ */ diff --git a/src/framework/events/vscp_evt_ir.h b/src/framework/events/vscp_evt_ir.h index b6d3843..d7f1435 100644 --- a/src/framework/events/vscp_evt_ir.h +++ b/src/framework/events/vscp_evt_ir.h @@ -48,6 +48,11 @@ This file is automatically generated. Don't change it manually. #include #include "..\user\vscp_platform.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -142,4 +147,8 @@ extern BOOL vscp_evt_ir_sendVscpAbstractRemoteFormat(uint16_t code, uint8_t zone */ extern BOOL vscp_evt_ir_sendMapitoRemoteFormat(uint8_t repeat, uint8_t zone, uint8_t subZone, uint32_t address, uint8_t keyCode); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_IR_H__ */ diff --git a/src/framework/events/vscp_evt_log.h b/src/framework/events/vscp_evt_log.h index a83b8d2..cab13fb 100644 --- a/src/framework/events/vscp_evt_log.h +++ b/src/framework/events/vscp_evt_log.h @@ -48,6 +48,11 @@ This file is automatically generated. Don't change it manually. #include #include "..\user\vscp_platform.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -119,4 +124,8 @@ extern BOOL vscp_evt_log_sendLogStop(uint8_t id); */ extern BOOL vscp_evt_log_sendLogLevel(uint8_t level); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_LOG_H__ */ diff --git a/src/framework/events/vscp_evt_measurement.h b/src/framework/events/vscp_evt_measurement.h index f454a8a..81e7594 100644 --- a/src/framework/events/vscp_evt_measurement.h +++ b/src/framework/events/vscp_evt_measurement.h @@ -50,6 +50,11 @@ This file is automatically generated. Don't change it manually. #include #include "..\user\vscp_platform.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -841,4 +846,8 @@ extern BOOL vscp_evt_measurement_sendReactivePower(uint8_t index, uint8_t unit, */ extern BOOL vscp_evt_measurement_sendReactiveEnergy(uint8_t index, uint8_t unit, int32_t data, int8_t exp); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_MEASUREMENT_H__ */ diff --git a/src/framework/events/vscp_evt_measurement32.h b/src/framework/events/vscp_evt_measurement32.h index eeab022..5e01e30 100644 --- a/src/framework/events/vscp_evt_measurement32.h +++ b/src/framework/events/vscp_evt_measurement32.h @@ -50,6 +50,11 @@ This file is automatically generated. Don't change it manually. #include "..\user\vscp_platform.h" #include +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -652,4 +657,8 @@ extern BOOL vscp_evt_measurement32_sendReactivePower(float_t value); */ extern BOOL vscp_evt_measurement32_sendReactiveEnergy(float_t value); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_MEASUREMENT32_H__ */ diff --git a/src/framework/events/vscp_evt_measurement64.h b/src/framework/events/vscp_evt_measurement64.h index 492334d..32358cc 100644 --- a/src/framework/events/vscp_evt_measurement64.h +++ b/src/framework/events/vscp_evt_measurement64.h @@ -50,6 +50,11 @@ This file is automatically generated. Don't change it manually. #include "..\user\vscp_platform.h" #include +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -652,4 +657,8 @@ extern BOOL vscp_evt_measurement64_sendReactivePower(double_t value); */ extern BOOL vscp_evt_measurement64_sendReactiveEnergy(double_t value); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_MEASUREMENT64_H__ */ diff --git a/src/framework/events/vscp_evt_measurezone.h b/src/framework/events/vscp_evt_measurezone.h index 7846ef3..089b43a 100644 --- a/src/framework/events/vscp_evt_measurezone.h +++ b/src/framework/events/vscp_evt_measurezone.h @@ -51,6 +51,11 @@ This file is automatically generated. Don't change it manually. #include #include "..\user\vscp_platform.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -905,4 +910,8 @@ extern BOOL vscp_evt_measurezone_sendReactivePower(uint8_t index, uint8_t zone, */ extern BOOL vscp_evt_measurezone_sendReactiveEnergy(uint8_t index, uint8_t zone, uint8_t subZone, int32_t data, int8_t exp); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_MEASUREZONE_H__ */ diff --git a/src/framework/events/vscp_evt_multimedia.h b/src/framework/events/vscp_evt_multimedia.h index ee9fac2..838cca1 100644 --- a/src/framework/events/vscp_evt_multimedia.h +++ b/src/framework/events/vscp_evt_multimedia.h @@ -49,6 +49,11 @@ This file is automatically generated. Don't change it manually. #include #include "..\user\vscp_platform.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -531,4 +536,8 @@ extern BOOL vscp_evt_multimedia_sendMultimediaControl(uint8_t control, uint8_t z /* "Multimedia Control response" not supported. No frame defined. */ +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_MULTIMEDIA_H__ */ diff --git a/src/framework/events/vscp_evt_phone.h b/src/framework/events/vscp_evt_phone.h index 7c69a8d..271da74 100644 --- a/src/framework/events/vscp_evt_phone.h +++ b/src/framework/events/vscp_evt_phone.h @@ -48,6 +48,11 @@ This file is automatically generated. Don't change it manually. #include #include "..\user\vscp_platform.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -171,4 +176,8 @@ extern BOOL vscp_evt_phone_sendTransfer(uint8_t id); */ extern BOOL vscp_evt_phone_sendDatabaseInfo(uint8_t id, uint8_t index, uint8_t total, uint8_t const * const info, uint8_t infoSize); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_PHONE_H__ */ diff --git a/src/framework/events/vscp_evt_protocol.h b/src/framework/events/vscp_evt_protocol.h index 0dc5c81..9b3a8f5 100644 --- a/src/framework/events/vscp_evt_protocol.h +++ b/src/framework/events/vscp_evt_protocol.h @@ -54,6 +54,11 @@ This file is automatically generated. Don't change it manually. #include #include "..\user\vscp_platform.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -508,4 +513,8 @@ extern BOOL vscp_evt_protocol_sendBlockDataTransferAck(void); */ extern BOOL vscp_evt_protocol_sendBlockDataTransferNack(void); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_PROTOCOL_H__ */ diff --git a/src/framework/events/vscp_evt_security.h b/src/framework/events/vscp_evt_security.h index 1b9dd5f..c0bffaf 100644 --- a/src/framework/events/vscp_evt_security.h +++ b/src/framework/events/vscp_evt_security.h @@ -48,6 +48,11 @@ This file is automatically generated. Don't change it manually. #include #include "..\user\vscp_platform.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -487,4 +492,8 @@ extern BOOL vscp_evt_security_sendNotInMotion(uint8_t data0, uint8_t zone, uint8 */ extern BOOL vscp_evt_security_sendVibration(uint8_t data0, uint8_t zone, uint8_t subZone); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_SECURITY_H__ */ diff --git a/src/framework/events/vscp_evt_setvaluezone.h b/src/framework/events/vscp_evt_setvaluezone.h index 0e66fa9..3a946bc 100644 --- a/src/framework/events/vscp_evt_setvaluezone.h +++ b/src/framework/events/vscp_evt_setvaluezone.h @@ -49,6 +49,11 @@ This file is automatically generated. Don't change it manually. #include #include "..\user\vscp_platform.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -896,4 +901,8 @@ extern BOOL vscp_evt_setvaluezone_sendSoundEnergyDensity(uint8_t index, uint8_t */ extern BOOL vscp_evt_setvaluezone_sendSoundLevel(uint8_t index, uint8_t zone, uint8_t subZone, uint8_t dataCoding, uint8_t const * const data, uint8_t dataSize); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_SETVALUEZONE_H__ */ diff --git a/src/framework/events/vscp_evt_weather.h b/src/framework/events/vscp_evt_weather.h index 4abfafa..12f7c24 100644 --- a/src/framework/events/vscp_evt_weather.h +++ b/src/framework/events/vscp_evt_weather.h @@ -48,6 +48,11 @@ This file is automatically generated. Don't change it manually. #include #include "..\user\vscp_platform.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -652,4 +657,8 @@ extern BOOL vscp_evt_weather_sendArmageddon(uint8_t index, uint8_t zone, uint8_t */ extern BOOL vscp_evt_weather_sendUvIndex(uint8_t index, uint8_t zone, uint8_t subZone, uint8_t uvIndex); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_WEATHER_H__ */ diff --git a/src/framework/events/vscp_evt_weather_forecast.h b/src/framework/events/vscp_evt_weather_forecast.h index 42ffa3e..10efe44 100644 --- a/src/framework/events/vscp_evt_weather_forecast.h +++ b/src/framework/events/vscp_evt_weather_forecast.h @@ -48,6 +48,11 @@ This file is automatically generated. Don't change it manually. #include #include "..\user\vscp_platform.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -652,4 +657,8 @@ extern BOOL vscp_evt_weather_forecast_sendArmageddon(uint8_t index, uint8_t zone */ extern BOOL vscp_evt_weather_forecast_sendUvIndex(uint8_t index, uint8_t zone, uint8_t subZone, uint8_t uvIndex); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_WEATHER_FORECAST_H__ */ diff --git a/src/framework/events/vscp_evt_wireless.h b/src/framework/events/vscp_evt_wireless.h index 26a97f0..fc5ea64 100644 --- a/src/framework/events/vscp_evt_wireless.h +++ b/src/framework/events/vscp_evt_wireless.h @@ -48,6 +48,11 @@ This file is automatically generated. Don't change it manually. #include #include "..\user\vscp_platform.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* COMPILER SWITCHES *******************************************************************************/ @@ -88,4 +93,8 @@ extern BOOL vscp_evt_wireless_sendGeneralEvent(void); */ extern BOOL vscp_evt_wireless_sendGsmCell(uint32_t count); +#ifdef __cplusplus +} +#endif + #endif /* __VSCP_EVT_WIRELESS_H__ */ diff --git a/src/framework/user/vscp_tp_adapter.c b/src/framework/user/vscp_tp_adapter.c index 8b574cf..2ada56f 100644 --- a/src/framework/user/vscp_tp_adapter.c +++ b/src/framework/user/vscp_tp_adapter.c @@ -140,7 +140,7 @@ extern BOOL vscp_tp_adapter_writeMessage(vscp_TxMessage const * const msg) BOOL status = FALSE; if ((NULL != msg) && /* Message shall exists */ - (VSCP_L1_DATA_SIZE >= msg->dataNum)) /* Number of data bytes is limited */ + (VSCP_L1_DATA_SIZE >= msg->dataSize)) /* Number of data bytes is limited */ { if (NULL != vscp_tp_adapter_writeFunc) {