mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 09:58:28 -04:00
AP_HAL_ChibiOS: add echo safe debug flag bouncebuffer
This commit is contained in:
parent
3b3cc0b194
commit
263fbbbdb0
@ -38,6 +38,9 @@
|
||||
#define IS_DMA_SAFE(addr) ((((uint32_t)(addr)) & 0xF0000001) == 0x20000000)
|
||||
#endif
|
||||
|
||||
// Enable when trying to check if you are not just listening yourself
|
||||
#define ENABLE_ECHO_SAFE 0
|
||||
|
||||
/*
|
||||
initialise a bouncebuffer
|
||||
*/
|
||||
@ -79,6 +82,9 @@ bool bouncebuffer_setup_read(struct bouncebuffer_t *bouncebuffer, uint8_t **buf,
|
||||
bouncebuffer->size = size;
|
||||
}
|
||||
*buf = bouncebuffer->dma_buf;
|
||||
#if ENABLE_ECHO_SAFE
|
||||
memset(bouncebuffer->dma_buf, 0xBB, bouncebuffer->size);
|
||||
#endif
|
||||
#if defined(STM32H7)
|
||||
osalDbgAssert((((uint32_t)*buf)&31) == 0, "bouncebuffer read align");
|
||||
stm32_cacheBufferInvalidate(*buf, (size+31)&~31);
|
||||
|
Loading…
Reference in New Issue
Block a user