Skip to content

Commit cecca85

Browse files
committed
Transferring trices one by one for TRICE_SINGLE_PACK_MODE in double buffer
1 parent 421b75a commit cecca85

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/triceDoubleBuffer.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,11 @@ static void TriceOut(uint32_t* tb, size_t tLen) {
262262
memmove(packed, triceNettoStart, triceNettoLen); // This action removes all padding bytes of the trices, compacting their sequence this way
263263
encLen += triceNettoLen;
264264
#endif // #elif TRICE_DEFERRED_TRANSFER_MODE == TRICE_MULTI_PACK_MODE
265+
#if TRICE_DEFERRED_TRANSFER_MODE == TRICE_SINGLE_PACK_MODE
266+
TRICE_ENTER_CRITICAL_SECTION
267+
TriceNonBlockingDeferredRoute8(triceID, dst, len);
268+
TRICE_LEAVE_CRITICAL_SECTION
269+
#endif // TRICE_DEFERRED_TRANSFER_MODE == TRICE_SINGLE_PACK_MODE
265270
#if (TRICE_PROTECT == 1) || (TRICE_DIAGNOSTICS == 1)
266271
dst = enc + encLen; // When several Trices in the double buffer, with each encoding the new dst could drift a bit closer towards triceNettoStart.
267272
int triceDataOffsetSpaceRemained = nxt - dst; // THe begin of unprocessed data MINUS next dst must not be negative.
@@ -319,7 +324,6 @@ static void TriceOut(uint32_t* tb, size_t tLen) {
319324
TriceDataOffsetDepthMax = triceDataOffsetDepth < TriceDataOffsetDepthMax ? TriceDataOffsetDepthMax : triceDataOffsetDepth;
320325
#endif
321326
encLen = eLen;
322-
#endif
323327

324328
// Reaching here means all trice data in the current half buffer are encoded
325329
// into a single continuous buffer having 0-delimiters between them or not but at the ent is a 0-delimiter.
@@ -328,6 +332,7 @@ static void TriceOut(uint32_t* tb, size_t tLen) {
328332
TRICE_ENTER_CRITICAL_SECTION
329333
TriceNonBlockingDeferredWrite8(triceID, enc, encLen); // lint !e771 Info 771: Symbol 'triceID' conceivably not initialized. Comment: tLen is always > 0.
330334
TRICE_LEAVE_CRITICAL_SECTION
335+
#endif // TRICE_DEFERRED_TRANSFER_MODE == TRICE_MULTI_PACK_MODE
331336
}
332337

333338
#endif // #if TRICE_BUFFER == TRICE_DOUBLE_BUFFER && TRICE_OFF == 0

0 commit comments

Comments
 (0)