fix(ghost): do not memcpy MSP frames into the module buffer (#7608)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
4822400fe2
commit
36a36c52e7
@@ -201,7 +201,12 @@ static void ghostSendPulses(void* ctx, uint8_t* buffer, int16_t* channels, uint8
|
||||
*p_data++ = getGhostModuleAddr();
|
||||
// and length
|
||||
*p_data++ = 12;
|
||||
memcpy(p_data, f_data, 12);
|
||||
// byte-wise: this buffer is non-cacheable memory on some targets, where
|
||||
// the unaligned wide accesses memcpy emits at this offset are faulting
|
||||
volatile uint8_t* dst = p_data;
|
||||
for (uint8_t i = 0; i < 12; i++) {
|
||||
*dst++ = f_data[i];
|
||||
}
|
||||
p_data += 12; f_data += 12;
|
||||
len -= 12;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user