We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a07f5c commit 1702ec0Copy full SHA for 1702ec0
libuavcan_drivers/lpc11c24/test_olimex_lpc_p11c24/src/sys/board.cpp
@@ -154,10 +154,10 @@ __attribute__((optimize(0))) // Optimization must be disabled lest it hardfa
154
#endif
155
void readUniqueID(std::uint8_t out_uid[UniqueIDSize])
156
{
157
- unsigned aligned_array[4] = {}; // out_uid may be unaligned, so we need to use temp array
+ unsigned aligned_array[5] = {}; // out_uid may be unaligned, so we need to use temp array
158
unsigned iap_command = 58;
159
reinterpret_cast<void(*)(void*, void*)>(0x1FFF1FF1)(&iap_command, aligned_array);
160
- std::memcpy(out_uid, aligned_array, 16);
+ std::memcpy(out_uid, &aligned_array[1], 16);
161
}
162
163
void setStatusLed(bool state)
0 commit comments