mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
LPC11: Fixed unique ID reading
This commit is contained in:
parent
0a07f5c713
commit
1702ec05d0
@ -154,10 +154,10 @@ __attribute__((optimize(0))) // Optimization must be disabled lest it hardfa
|
||||
#endif
|
||||
void readUniqueID(std::uint8_t out_uid[UniqueIDSize])
|
||||
{
|
||||
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
|
||||
unsigned iap_command = 58;
|
||||
reinterpret_cast<void(*)(void*, void*)>(0x1FFF1FF1)(&iap_command, aligned_array);
|
||||
std::memcpy(out_uid, aligned_array, 16);
|
||||
std::memcpy(out_uid, &aligned_array[1], 16);
|
||||
}
|
||||
|
||||
void setStatusLed(bool state)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user