|
@@ -1,4 +1,4 @@
|
|
|
-#include <nbus_slave.h>
|
|
|
|
|
|
|
+#include "nbus_slave.h"
|
|
|
|
|
|
|
|
#if MODULE_SLAVE == 1
|
|
#if MODULE_SLAVE == 1
|
|
|
|
|
|
|
@@ -91,10 +91,17 @@ void nbus_slave_unicastToModuleGet(nBus_TypeDef *nbus)
|
|
|
nbus->tx_length += 3;
|
|
nbus->tx_length += 3;
|
|
|
break;
|
|
break;
|
|
|
case INFO_MODULE_UUID:
|
|
case INFO_MODULE_UUID:
|
|
|
- // Reference manual: Unique device ID registers
|
|
|
|
|
- uint32_t(*unique_id_3) = (uint32_t *)(0x1FF80064); // BASE address + 0x14 0ffset
|
|
|
|
|
- *(nbus->tx_buffer) = (uint32_t)unique_id_3;
|
|
|
|
|
- nbus->tx_length += 4;
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ // Reference manual: Unique device ID registers
|
|
|
|
|
+ #if defined(STM32)
|
|
|
|
|
+ uint32_t(*unique_id_3) = (uint32_t *)(0x1FF80064); // BASE address + 0x14 0ffset
|
|
|
|
|
+ #elif defined(ESP32)
|
|
|
|
|
+ uint32_t unique_id_3[3] = {1, 2, 3};
|
|
|
|
|
+ #endif
|
|
|
|
|
+
|
|
|
|
|
+ *(nbus->tx_buffer) = (uint32_t)unique_id_3;
|
|
|
|
|
+ nbus->tx_length += 4;
|
|
|
|
|
+ }
|
|
|
break;
|
|
break;
|
|
|
case INFO_MODULE_FW:
|
|
case INFO_MODULE_FW:
|
|
|
nbus->tx_buffer[4] = VERSION_FW[0];
|
|
nbus->tx_buffer[4] = VERSION_FW[0];
|