correctly calculate tooth logger buffer count to avoid overrun

This commit is contained in:
Matthew Kennedy 2024-01-06 22:59:36 -05:00 committed by rusefillc
parent 9d32148971
commit c20e59cea7
1 changed files with 2 additions and 2 deletions

View File

@ -67,8 +67,8 @@ void DisableToothLogger() {
#else // not EFI_UNIT_TEST
static constexpr size_t TOTAL_ENTRY_COUNT = BIG_BUFFER_SIZE / sizeof(composite_logger_s);
static constexpr size_t BUFFER_COUNT = TOTAL_ENTRY_COUNT / toothLoggerEntriesPerBuffer;
static constexpr size_t BUFFER_COUNT = BIG_BUFFER_SIZE / sizeof(CompositeBuffer);
static_assert(BUFFER_COUNT >= 2);
static CompositeBuffer* buffers = nullptr;
static chibios_rt::Mailbox<CompositeBuffer*, BUFFER_COUNT> freeBuffers CCM_OPTIONAL;