This commit is contained in:
rusefi 2019-06-23 09:23:20 -04:00
parent ffb2429608
commit 83c0ee7a12
1 changed files with 3 additions and 2 deletions

View File

@ -24,9 +24,10 @@ public:
int getAdcValueByIndex(int internalIndex) const;
void invalidateSamplesCache();
// This must be aligned on a 32-byte boundary, and be a multiple of 32 bytes long.
// on F7 this must be aligned on a 32-byte boundary, and be a multiple of 32 bytes long.
// When we invalidate the cache line(s) for ADC samples, we don't want to nuke any
// adjacent data
// adjacent data.
// F4 does not care
__ALIGNED(32) adcsample_t samples[ADC_MAX_CHANNELS_COUNT * MAX_ADC_GRP_BUF_DEPTH];
// Assert multiple of 32 bytes long so we don't stomp on the data after the buffer
static_assert(sizeof(samples) % 32 == 0);