diff --git a/src/tcobsv1Decode.c b/src/tcobsv1Decode.c index 89383c98..a68db8d7 100644 --- a/src/tcobsv1Decode.c +++ b/src/tcobsv1Decode.c @@ -6,7 +6,6 @@ #include #include #include // memcpy -#include "triceConfig.h" #include "tcobs.h" #include "tcobsv1Internal.h" // clang-format on diff --git a/src/tcobsv1Encode.c b/src/tcobsv1Encode.c index 337f1b93..905ae94a 100644 --- a/src/tcobsv1Encode.c +++ b/src/tcobsv1Encode.c @@ -5,7 +5,6 @@ // clang-format off #include #include -#include "triceConfig.h" #include "tcobs.h" #include "tcobsv1Internal.h" // clang-format on diff --git a/src/trice.c b/src/trice.c index 8554c2b3..1810fcc6 100644 --- a/src/trice.c +++ b/src/trice.c @@ -7,6 +7,8 @@ #include "tcobs.h" #include "xtea.h" +#if TRICE_OFF == 0 + // check configuration: #ifndef TRICE_DATA_OFFSET @@ -825,8 +827,8 @@ unsigned TriceOutDepth(void) { return depth; } -#if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 -#else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#if TRICE_OFF == 1 || TRICE_CLEAN == 1 +#else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 //! TRICE_ASSERT writes trice data as fast as possible in a buffer. //! \param tid is a 16 bit Trice id in upper 2 bytes of a 32 bit value @@ -878,7 +880,7 @@ unsigned TriceOutDepth(void) { } } -#endif // #else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#endif // #else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #ifdef TRICE_N @@ -1007,3 +1009,5 @@ unsigned TriceOutDepth(void) { } #endif // #ifdef TRICE_N + +#endif // #if TRICE_OFF == 0 diff --git a/src/trice.h b/src/trice.h index cfb562f0..b579d005 100644 --- a/src/trice.h +++ b/src/trice.h @@ -50,7 +50,7 @@ // lint -emacro( 717, DCOPY, SCOPY ) // lint -emacro( 732, DCOPY ) -#if TRICE_OFF == 1 // Do not generate trice code for files defining TRICE_OFF to 1 before including "trice.h". +#if TRICE_OFF == 1 || TRICE_CLEAN == 1 // Do not generate trice code for files defining TRICE_OFF to 1 before including "trice.h". #define TRICE_ENTER #define TRICE_LEAVE @@ -60,7 +60,7 @@ #define TRICE_S(id, p, s) // do{ ((void)(id)); ((void)(p)); ((void)(s)); }while(0) #define TRICE_N(id, p, s, n) // do{ ((void)(id)); ((void)(p)); ((void)(s)); ((void)(n)); }while(0) -#endif // #if TRICE_OFF == 1 +#endif // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 // helper macros (the numbers are 32-bit random values) @@ -570,19 +570,19 @@ extern int TriceDataOffsetDepthMax; //! TRICE_VARIABLE_ARGUMENTS concatenates TRICE_ with the result of TRICE_COUNT_ARGUMENTS to produce something like TRICE_2 which takes a printf-format and two arguments. #define TRICE(tid, fmt, ...) TRICE_CONCAT2(TRICE_, TRICE_COUNT_ARGUMENTS(__VA_ARGS__))(tid, fmt, ##__VA_ARGS__) -#if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define TRice(fmt, ...) #define Trice(fmt, ...) #define trice(fmt, ...) -#else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define TRice(tid, fmt, ...) TRICE_CONCAT2(TRice_, TRICE_COUNT_ARGUMENTS(__VA_ARGS__))(tid, fmt, ##__VA_ARGS__) #define Trice(tid, fmt, ...) TRICE_CONCAT2(Trice_, TRICE_COUNT_ARGUMENTS(__VA_ARGS__))(tid, fmt, ##__VA_ARGS__) #define trice(tid, fmt, ...) TRICE_CONCAT2(trice_, TRICE_COUNT_ARGUMENTS(__VA_ARGS__))(tid, fmt, ##__VA_ARGS__) -#endif // #else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#endif // #else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 // /////////////////////////////////////////////////////////////////////////////// @@ -810,7 +810,7 @@ static inline uint64_t aDouble(double x) { TRICE_CNTC(0); \ TRICE_LEAVE -#if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#if TRICE_OFF == 1 || TRICE_CLEAN == 1 // clang-format off TRICE_INLINE void TRice0( const char * pFmt ){TRICE_UNUSED(pFmt)} @@ -818,7 +818,7 @@ static inline uint64_t aDouble(double x) { TRICE_INLINE void trice0( const char * pFmt ){TRICE_UNUSED(pFmt)} // clang-format on -#else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 TRICE_INLINE void TRice0(uint16_t tid, const char* pFmt) { TRice32m_0(tid); @@ -835,7 +835,7 @@ static inline uint64_t aDouble(double x) { TRICE_UNUSED(pFmt) } -#endif // #else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#endif // #else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #if TRICE_TRANSFER_ORDER_IS_NOT_MCU_ENDIAN == 1 @@ -859,7 +859,7 @@ static inline uint64_t aDouble(double x) { #endif // #else // #if TRICE_TRANSFER_ORDER_IS_NOT_MCU_ENDIAN == 1 -#if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#if TRICE_OFF == 1 || TRICE_CLEAN == 1 // clang-format off TRICE_INLINE void triceAssertTrue( int idN, char* msg, int flag ){TRICE_UNUSED(idN) TRICE_UNUSED(msg) TRICE_UNUSED(pFmt)} @@ -871,7 +871,7 @@ TRICE_INLINE void TriceAssertFalse( int idN, char* msg, int flag ){TRICE_UNUSED( TRICE_INLINE void TRiceAssertFalse( int idN, char* msg, int flag ){TRICE_UNUSED(idN) TRICE_UNUSED(msg) TRICE_UNUSED(pFmt)} // clang-format on -#else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 void triceAssertTrue(int idN, char* msg, int flag); void TriceAssertTrue(int idN, char* msg, int flag); @@ -881,7 +881,7 @@ TRICE_INLINE void TRiceAssertFalse( int idN, char* msg, int flag ){TRICE_UNUSED( void TriceAssertFalse(int idN, char* msg, int flag); void TRiceAssertFalse(int idN, char* msg, int flag); -#endif // #else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#endif // #else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 typedef void (*Write8AuxiliaryFn_t)(const uint8_t* enc, size_t encLen); extern Write8AuxiliaryFn_t UserNonBlockingDirectWrite8AuxiliaryFn; diff --git a/src/trice16.c b/src/trice16.c index 404b57ee..a0c3a5c5 100644 --- a/src/trice16.c +++ b/src/trice16.c @@ -6,7 +6,7 @@ // lint -e529 Warning 529: Symbol '_SEGGER_RTT__LockState' not subsequently referenced // lint -e701 Info 701: Shift left of signed quantity (int) -#if TRICE_16_BIT_SUPPORT == 1 +#if TRICE_16_BIT_SUPPORT == 1 && TRICE_OFF == 0 // no-stamp 16-bit values functions #ifndef ENABLE_trice16fn_0 @@ -557,4 +557,4 @@ } #endif -#endif // #if TRICE_16_BIT_SUPPORT == 1 +#endif // #if TRICE_16_BIT_SUPPORT == 1 && TRICE_OFF == 0 diff --git a/src/trice16.h b/src/trice16.h index 92475335..6d4198e7 100644 --- a/src/trice16.h +++ b/src/trice16.h @@ -4,19 +4,19 @@ #define TRICE16(tid, fmt, ...) TRICE_CONCAT2(TRICE16_, TRICE_COUNT_ARGUMENTS(__VA_ARGS__))(tid, fmt, ##__VA_ARGS__) -#if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define trice16(fmt, ...) #define Trice16(fmt, ...) #define TRice16(fmt, ...) -#else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define trice16(tid, fmt, ...) TRICE_CONCAT2(trice16_, TRICE_COUNT_ARGUMENTS(__VA_ARGS__))(tid, fmt, ##__VA_ARGS__) #define Trice16(tid, fmt, ...) TRICE_CONCAT2(Trice16_, TRICE_COUNT_ARGUMENTS(__VA_ARGS__))(tid, fmt, ##__VA_ARGS__) #define TRice16(tid, fmt, ...) TRICE_CONCAT2(TRice16_, TRICE_COUNT_ARGUMENTS(__VA_ARGS__))(tid, fmt, ##__VA_ARGS__) -#endif // #else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#endif // #else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 //! TRICE16_B expects inside pFmt only one format specifier, which is used n times by using pFmt n times. //! It is usable for showing n 16-bit values. @@ -293,7 +293,7 @@ TRICE_PUT16_12(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) \ TRICE_LEAVE -#if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define trice16_0(fmt) //!< trice16_1 is a macro calling a function to reduce code size. #define trice16_1(fmt, v0) //!< trice16_1 is a macro calling a function to reduce code size. @@ -309,7 +309,7 @@ #define trice16_11(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) //!< trice16_11 is a macro calling a function to reduce code size. #define trice16_12(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) //!< trice16_12 is a macro calling a function to reduce code size. -#else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define trice16_0(tid, fmt) trice16fn_0(tid) //!< trice16_0 is a macro calling a function to reduce code size. #define trice16_1(tid, fmt, v0) trice16fn_1(tid, (uint16_t)(v0)) //!< trice16_1 is a macro calling a function to reduce code size. @@ -339,7 +339,7 @@ void trice16fn_11(uint16_t tid, uint16_t v0, uint16_t v1, uint16_t v2, uint16_t v3, uint16_t v4, uint16_t v5, uint16_t v6, uint16_t v7, uint16_t v8, uint16_t v9, uint16_t v10); void trice16fn_12(uint16_t tid, uint16_t v0, uint16_t v1, uint16_t v2, uint16_t v3, uint16_t v4, uint16_t v5, uint16_t v6, uint16_t v7, uint16_t v8, uint16_t v9, uint16_t v10, uint16_t v11); -#endif // #else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#endif // #else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define Trice16m_0(tid) \ TRICE_ENTER \ @@ -447,7 +447,7 @@ TRICE_PUT16_12(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) \ TRICE_LEAVE -#if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define Trice16_0(fmt) //!< Trice16_1 is a macro calling a function to reduce code size. #define Trice16_1(fmt, v0) //!< Trice16_1 is a macro calling a function to reduce code size. @@ -463,7 +463,7 @@ #define Trice16_11(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) //!< Trice16_11 is a macro calling a function to reduce code size. #define Trice16_12(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) //!< Trice16_12 is a macro calling a function to reduce code size. -#else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define Trice16_0(tid, fmt) Trice16fn_0(tid) //!< Trice16_0 is a macro calling a function to reduce code size. #define Trice16_1(tid, fmt, v0) Trice16fn_1(tid, (uint16_t)(v0)) //!< Trice16_1 is a macro calling a function to reduce code size. @@ -493,7 +493,7 @@ void Trice16fn_11(uint16_t tid, uint16_t v0, uint16_t v1, uint16_t v2, uint16_t v3, uint16_t v4, uint16_t v5, uint16_t v6, uint16_t v7, uint16_t v8, uint16_t v9, uint16_t v10); void Trice16fn_12(uint16_t tid, uint16_t v0, uint16_t v1, uint16_t v2, uint16_t v3, uint16_t v4, uint16_t v5, uint16_t v6, uint16_t v7, uint16_t v8, uint16_t v9, uint16_t v10, uint16_t v11); -#endif // #else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#endif // #else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define TRice16m_0(tid) \ TRICE_ENTER \ @@ -601,7 +601,7 @@ TRICE_PUT16_12(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) \ TRICE_LEAVE -#if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define TRice16_0(fmt) //!< TRice16_1 is a macro calling a function to reduce code size. #define TRice16_1(fmt, v0) //!< TRice16_1 is a macro calling a function to reduce code size. @@ -617,7 +617,7 @@ #define TRice16_11(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) //!< TRice16_11 is a macro calling a function to reduce code size. #define TRice16_12(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) //!< TRice16_12 is a macro calling a function to reduce code size. -#else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define TRice16_0(tid, fmt) TRice16fn_0(tid) //!< TRice16_0 is a macro calling a function to reduce code size. #define TRice16_1(tid, fmt, v0) TRice16fn_1(tid, (uint16_t)(v0)) //!< TRice16_1 is a macro calling a function to reduce code size. @@ -647,7 +647,7 @@ void TRice16fn_11(uint16_t tid, uint16_t v0, uint16_t v1, uint16_t v2, uint16_t v3, uint16_t v4, uint16_t v5, uint16_t v6, uint16_t v7, uint16_t v8, uint16_t v9, uint16_t v10); void TRice16fn_12(uint16_t tid, uint16_t v0, uint16_t v1, uint16_t v2, uint16_t v3, uint16_t v4, uint16_t v5, uint16_t v6, uint16_t v7, uint16_t v8, uint16_t v9, uint16_t v10, uint16_t v11); -#endif // #else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#endif // #else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 /////////////////////////////////////////////////////////////////////////////// // diff --git a/src/trice32.c b/src/trice32.c index 5415bdff..b1d4af77 100644 --- a/src/trice32.c +++ b/src/trice32.c @@ -6,7 +6,7 @@ // lint -e529 Warning 529: Symbol '_SEGGER_RTT__LockState' not subsequently referenced // lint -e701 Info 701: Shift left of signed quantity (int) -#if TRICE_32_BIT_SUPPORT == 1 +#if TRICE_32_BIT_SUPPORT == 1 && TRICE_OFF == 0 // no-stamp 32-bit-values functions #ifndef ENABLE_trice32fn_0 @@ -557,4 +557,4 @@ } #endif -#endif // #if TRICE_32_BIT_SUPPORT == 1 +#endif // #if TRICE_32_BIT_SUPPORT == 1 && TRICE_OFF == 0 diff --git a/src/trice32.h b/src/trice32.h index 81fd993a..bbc3459b 100644 --- a/src/trice32.h +++ b/src/trice32.h @@ -4,19 +4,19 @@ #define TRICE32(tid, fmt, ...) TRICE_CONCAT2(TRICE32_, TRICE_COUNT_ARGUMENTS(__VA_ARGS__))(tid, fmt, ##__VA_ARGS__) -#if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define trice32(fmt, ...) #define Trice32(fmt, ...) #define TRice32(fmt, ...) -#else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define trice32(tid, fmt, ...) TRICE_CONCAT2(trice32_, TRICE_COUNT_ARGUMENTS(__VA_ARGS__))(tid, fmt, ##__VA_ARGS__) #define Trice32(tid, fmt, ...) TRICE_CONCAT2(Trice32_, TRICE_COUNT_ARGUMENTS(__VA_ARGS__))(tid, fmt, ##__VA_ARGS__) #define TRice32(tid, fmt, ...) TRICE_CONCAT2(TRice32_, TRICE_COUNT_ARGUMENTS(__VA_ARGS__))(tid, fmt, ##__VA_ARGS__) -#endif // #else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#endif // #else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 //! TRICE32_B expects inside pFmt only one format specifier, which is used n times by using pFmt n times. //! It is usable for showing n 32-bit values. @@ -330,7 +330,7 @@ TRICE_PUT32_12(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) \ TRICE_LEAVE -#if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define trice32_0(fmt) //!< trice32_1 is a macro calling a function to reduce code size. #define trice32_1(fmt, v0) //!< trice32_1 is a macro calling a function to reduce code size. @@ -346,7 +346,7 @@ #define trice32_11(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) //!< trice32_11 is a macro calling a function to reduce code size. #define trice32_12(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) //!< trice32_12 is a macro calling a function to reduce code size. -#else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define trice32_0(tid, fmt) trice32fn_0(tid) //!< trice32_0 is a macro calling a function to reduce code size. #define trice32_1(tid, fmt, v0) trice32fn_1(tid, (uint32_t)(v0)) //!< trice32_1 is a macro calling a function to reduce code size. @@ -376,7 +376,7 @@ void trice32fn_11(uint16_t tid, uint32_t v0, uint32_t v1, uint32_t v2, uint32_t v3, uint32_t v4, uint32_t v5, uint32_t v6, uint32_t v7, uint32_t v8, uint32_t v9, uint32_t v10); void trice32fn_12(uint16_t tid, uint32_t v0, uint32_t v1, uint32_t v2, uint32_t v3, uint32_t v4, uint32_t v5, uint32_t v6, uint32_t v7, uint32_t v8, uint32_t v9, uint32_t v10, uint32_t v11); -#endif // #else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#endif // #else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define Trice32m_0(tid) \ TRICE_ENTER \ @@ -484,7 +484,7 @@ TRICE_PUT32_12(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) \ TRICE_LEAVE -#if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define Trice32_0(fmt) //!< Trice32_1 is a macro calling a function to reduce code size. #define Trice32_1(fmt, v0) //!< Trice32_1 is a macro calling a function to reduce code size. @@ -500,7 +500,7 @@ #define Trice32_11(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) //!< Trice32_11 is a macro calling a function to reduce code size. #define Trice32_12(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) //!< Trice32_12 is a macro calling a function to reduce code size. -#else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define Trice32_0(tid, fmt) Trice32fn_0(tid) //!< Trice32_0 is a macro calling a function to reduce code size. #define Trice32_1(tid, fmt, v0) Trice32fn_1(tid, (uint32_t)(v0)) //!< Trice32_1 is a macro calling a function to reduce code size. @@ -530,7 +530,7 @@ void Trice32fn_11(uint16_t tid, uint32_t v0, uint32_t v1, uint32_t v2, uint32_t v3, uint32_t v4, uint32_t v5, uint32_t v6, uint32_t v7, uint32_t v8, uint32_t v9, uint32_t v10); void Trice32fn_12(uint16_t tid, uint32_t v0, uint32_t v1, uint32_t v2, uint32_t v3, uint32_t v4, uint32_t v5, uint32_t v6, uint32_t v7, uint32_t v8, uint32_t v9, uint32_t v10, uint32_t v11); -#endif // #else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#endif // #else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define TRice32m_0(tid) \ TRICE_ENTER \ @@ -638,7 +638,7 @@ TRICE_PUT32_12(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) \ TRICE_LEAVE -#if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define TRice32_0(fmt) //!< TRice32_1 is a macro calling a function to reduce code size. #define TRice32_1(fmt, v0) //!< TRice32_1 is a macro calling a function to reduce code size. @@ -654,7 +654,7 @@ #define TRice32_11(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) //!< TRice32_11 is a macro calling a function to reduce code size. #define TRice32_12(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) //!< TRice32_12 is a macro calling a function to reduce code size. -#else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define TRice32_0(tid, fmt) TRice32fn_0(tid) //!< TRice32_1 is a macro calling a function to reduce code size. #define TRice32_1(tid, fmt, v0) TRice32fn_1(tid, (uint32_t)(v0)) //!< TRice32_1 is a macro calling a function to reduce code size. @@ -684,7 +684,7 @@ void TRice32fn_11(uint16_t tid, uint32_t v0, uint32_t v1, uint32_t v2, uint32_t v3, uint32_t v4, uint32_t v5, uint32_t v6, uint32_t v7, uint32_t v8, uint32_t v9, uint32_t v10); void TRice32fn_12(uint16_t tid, uint32_t v0, uint32_t v1, uint32_t v2, uint32_t v3, uint32_t v4, uint32_t v5, uint32_t v6, uint32_t v7, uint32_t v8, uint32_t v9, uint32_t v10, uint32_t v11); -#endif // #else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#endif // #else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 /////////////////////////////////////////////////////////////////////////////// // diff --git a/src/trice64.c b/src/trice64.c index ebb17c8a..7053beae 100644 --- a/src/trice64.c +++ b/src/trice64.c @@ -7,7 +7,7 @@ // lint -e701 Info 701: Shift left of signed quantity (int) // lint -e712 Info 712: Loss of precision (assignment) (unsigned long long to unsigned int) -#if TRICE_64_BIT_SUPPORT == 1 +#if TRICE_64_BIT_SUPPORT == 1 && TRICE_OFF == 0 // no-stamp 64-bit-values functions #ifndef ENABLE_trice64fn_0 @@ -558,4 +558,4 @@ } #endif -#endif // #if TRICE_64_BIT_SUPPORT == 1 +#endif // #if TRICE_64_BIT_SUPPORT == 1 && TRICE_OFF == 0 diff --git a/src/trice64.h b/src/trice64.h index ac8841f5..2b94c9af 100644 --- a/src/trice64.h +++ b/src/trice64.h @@ -4,19 +4,19 @@ #define TRICE64(tid, fmt, ...) TRICE_CONCAT2(TRICE64_, TRICE_COUNT_ARGUMENTS(__VA_ARGS__))(tid, fmt, ##__VA_ARGS__) -#if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define trice64(fmt, ...) #define Trice64(fmt, ...) #define TRice64(fmt, ...) -#else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define trice64(tid, fmt, ...) TRICE_CONCAT2(trice64_, TRICE_COUNT_ARGUMENTS(__VA_ARGS__))(tid, fmt, ##__VA_ARGS__) #define Trice64(tid, fmt, ...) TRICE_CONCAT2(Trice64_, TRICE_COUNT_ARGUMENTS(__VA_ARGS__))(tid, fmt, ##__VA_ARGS__) #define TRice64(tid, fmt, ...) TRICE_CONCAT2(TRice64_, TRICE_COUNT_ARGUMENTS(__VA_ARGS__))(tid, fmt, ##__VA_ARGS__) -#endif // #else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#endif // #else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 //! TRICE64_B expects inside pFmt only one format specifier, which is used n times by using pFmt n times. //! It is usable for showing n 64-bit values. @@ -330,7 +330,7 @@ TRICE_PUT64_12(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) \ TRICE_LEAVE -#if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define trice64_0(fmt) //!< trice64_1 is a macro calling a function to reduce code size. #define trice64_1(fmt, v0) //!< trice64_1 is a macro calling a function to reduce code size. @@ -346,7 +346,7 @@ #define trice64_11(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) //!< trice64_11 is a macro calling a function to reduce code size. #define trice64_12(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) //!< trice64_12 is a macro calling a function to reduce code size. -#else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define trice64_0(tid, fmt) trice64fn_0(tid) //!< trice64_1 is a macro calling a function to reduce code size. #define trice64_1(tid, fmt, v0) trice64fn_1(tid, (uint64_t)(v0)) //!< trice64_1 is a macro calling a function to reduce code size. @@ -376,7 +376,7 @@ void trice64fn_11(uint16_t tid, uint64_t v0, uint64_t v1, uint64_t v2, uint64_t v3, uint64_t v4, uint64_t v5, uint64_t v6, uint64_t v7, uint64_t v8, uint64_t v9, uint64_t v10); void trice64fn_12(uint16_t tid, uint64_t v0, uint64_t v1, uint64_t v2, uint64_t v3, uint64_t v4, uint64_t v5, uint64_t v6, uint64_t v7, uint64_t v8, uint64_t v9, uint64_t v10, uint64_t v11); -#endif // #else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#endif // #else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define Trice64m_0(tid) \ TRICE_ENTER \ @@ -484,7 +484,7 @@ TRICE_PUT64_12(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) \ TRICE_LEAVE -#if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define Trice64_0(fmt) //!< Trice64_1 is a macro calling a function to reduce code size. #define Trice64_1(fmt, v0) //!< Trice64_1 is a macro calling a function to reduce code size. @@ -500,7 +500,7 @@ #define Trice64_11(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) //!< Trice64_11 is a macro calling a function to reduce code size. #define Trice64_12(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) //!< Trice64_12 is a macro calling a function to reduce code size. -#else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define Trice64_0(tid, fmt) Trice64fn_0(tid) //!< Trice64_0 is a macro calling a function to reduce code size. #define Trice64_1(tid, fmt, v0) Trice64fn_1(tid, (uint64_t)(v0)) //!< Trice64_1 is a macro calling a function to reduce code size. @@ -530,7 +530,7 @@ void Trice64fn_11(uint16_t tid, uint64_t v0, uint64_t v1, uint64_t v2, uint64_t v3, uint64_t v4, uint64_t v5, uint64_t v6, uint64_t v7, uint64_t v8, uint64_t v9, uint64_t v10); void Trice64fn_12(uint16_t tid, uint64_t v0, uint64_t v1, uint64_t v2, uint64_t v3, uint64_t v4, uint64_t v5, uint64_t v6, uint64_t v7, uint64_t v8, uint64_t v9, uint64_t v10, uint64_t v11); -#endif // #else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#endif // #else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 //! TRice64m_0 writes trice data as fast as possible in a buffer. //! \param tid is a 14 bit Trice id in upper 2 bytes of a 32 bit value @@ -640,7 +640,7 @@ TRICE_PUT64_12(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) \ TRICE_LEAVE -#if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define TRice64_0(fmt) //!< TRice64_1 is a macro calling a function to reduce code size. #define TRice64_1(fmt, v0) //!< TRice64_1 is a macro calling a function to reduce code size. @@ -656,7 +656,7 @@ #define TRice64_11(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) //!< TRice64_11 is a macro calling a function to reduce code size. #define TRice64_12(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) //!< TRice64_12 is a macro calling a function to reduce code size. -#else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define TRice64_0(tid, fmt) TRice64fn_0(tid) //!< TRice64_0 is a macro calling a function to reduce code size. #define TRice64_1(tid, fmt, v0) TRice64fn_1(tid, (uint64_t)(v0)) //!< TRice64_1 is a macro calling a function to reduce code size. @@ -686,7 +686,7 @@ void TRice64fn_11(uint16_t tid, uint64_t v0, uint64_t v1, uint64_t v2, uint64_t v3, uint64_t v4, uint64_t v5, uint64_t v6, uint64_t v7, uint64_t v8, uint64_t v9, uint64_t v10); void TRice64fn_12(uint16_t tid, uint64_t v0, uint64_t v1, uint64_t v2, uint64_t v3, uint64_t v4, uint64_t v5, uint64_t v6, uint64_t v7, uint64_t v8, uint64_t v9, uint64_t v10, uint64_t v11); -#endif // #else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#endif // #else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 /////////////////////////////////////////////////////////////////////////////// // diff --git a/src/trice8.c b/src/trice8.c index 965270a1..b4e33104 100644 --- a/src/trice8.c +++ b/src/trice8.c @@ -6,7 +6,7 @@ // lint -e529 Warning 529: Symbol '_SEGGER_RTT__LockState' not subsequently referenced // lint -e701 Info 701: Shift left of signed quantity (int) -#if TRICE_8_BIT_SUPPORT == 1 +#if TRICE_8_BIT_SUPPORT == 1 && TRICE_OFF == 0 // without stamp 8-bit values functions #ifndef ENABLE_trice8fn_0 @@ -557,4 +557,4 @@ } #endif -#endif // #if TRICE_8_BIT_SUPPORT == 1 +#endif // #if TRICE_8_BIT_SUPPORT == 1 && TRICE_OFF == 0 diff --git a/src/trice8.h b/src/trice8.h index c02f6be6..9975d7b2 100644 --- a/src/trice8.h +++ b/src/trice8.h @@ -4,19 +4,19 @@ #define TRICE8(tid, fmt, ...) TRICE_CONCAT2(TRICE8_, TRICE_COUNT_ARGUMENTS(__VA_ARGS__))(tid, fmt, ##__VA_ARGS__) -#if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define trice8(fmt, ...) #define Trice8(fmt, ...) #define TRice8(fmt, ...) -#else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define trice8(tid, fmt, ...) TRICE_CONCAT2(trice8_, TRICE_COUNT_ARGUMENTS(__VA_ARGS__))(tid, fmt, ##__VA_ARGS__) #define Trice8(tid, fmt, ...) TRICE_CONCAT2(Trice8_, TRICE_COUNT_ARGUMENTS(__VA_ARGS__))(tid, fmt, ##__VA_ARGS__) #define TRice8(tid, fmt, ...) TRICE_CONCAT2(TRice8_, TRICE_COUNT_ARGUMENTS(__VA_ARGS__))(tid, fmt, ##__VA_ARGS__) -#endif // #else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#endif // #else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 //! TRICE8_B expects inside pFmt only one format specifier, which is used n times by using pFmt n times. //! It is usable for showing n 8-bit values. @@ -273,7 +273,7 @@ TRICE_PUT8_12(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) \ TRICE_LEAVE -#if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define trice8_0(fmt) //!< trice8_1 is a macro calling a function to reduce code size. #define trice8_1(fmt, v0) //!< trice8_1 is a macro calling a function to reduce code size. @@ -289,7 +289,7 @@ #define trice8_11(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) //!< trice8_11 is a macro calling a function to reduce code size. #define trice8_12(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) //!< trice8_12 is a macro calling a function to reduce code size. -#else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define trice8_0(tid, fmt) trice8fn_0(tid) //!< trice8_0 is a macro calling a function to reduce code size, this way avoiding code inlining. #define trice8_1(tid, fmt, v0) trice8fn_1(tid, (uint8_t)(v0)) //!< trice8_1 is a macro calling a function to reduce code size, this way avoiding code inlining. @@ -319,7 +319,7 @@ void trice8fn_11(uint16_t tid, uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, uint8_t v8, uint8_t v9, uint8_t v10); void trice8fn_12(uint16_t tid, uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11); -#endif // #else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#endif // #else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 //! Trice8m_0 writes trice data as fast as possible in a buffer. //! This macro is used internally and not intended for user applications. @@ -431,7 +431,7 @@ TRICE_PUT8_12(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) \ TRICE_LEAVE -#if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define Trice8_0(fmt) //!< Trice8_1 is a macro calling a function to reduce code size. #define Trice8_1(fmt, v0) //!< Trice8_1 is a macro calling a function to reduce code size. @@ -447,7 +447,7 @@ #define Trice8_11(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) //!< Trice8_11 is a macro calling a function to reduce code size. #define Trice8_12(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) //!< Trice8_12 is a macro calling a function to reduce code size. -#else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define Trice8_0(tid, fmt) Trice8fn_0(tid) //!< Trice8_1 ia macro calling a function to reduce code size, this way avoiding code inlining. #define Trice8_1(tid, fmt, v0) Trice8fn_1(tid, (uint8_t)(v0)) //!< Trice8_1 ia macro calling a function to reduce code size, this way avoiding code inlining. @@ -477,7 +477,7 @@ void Trice8fn_11(uint16_t tid, uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, uint8_t v8, uint8_t v9, uint8_t v10); void Trice8fn_12(uint16_t tid, uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11); -#endif // #else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#endif // #else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 //! TRice8m_0 writes trice data as fast as possible in a buffer. //! \param tid is a 14 bit Trice id in upper 2 bytes of a 32 bit value @@ -587,7 +587,7 @@ TRICE_PUT8_12(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) \ TRICE_LEAVE -#if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define TRice8_0(fmt) //!< TRice8_1 is a macro calling a function to reduce code size. #define TRice8_1(fmt, v0) //!< TRice8_1 is a macro calling a function to reduce code size. @@ -603,7 +603,7 @@ #define TRice8_11(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) //!< TRice8_11 is a macro calling a function to reduce code size. #define TRice8_12(fmt, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) //!< TRice8_12 is a macro calling a function to reduce code size. -#else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 #define TRice8_0(tid, fmt) TRice8fn_0(tid) //!< TRice8_0 ia macro calling a function to reduce code size, this way avoiding code inlining. #define TRice8_1(tid, fmt, v0) TRice8fn_1(tid, (uint8_t)(v0)) //!< TRice8_1 ia macro calling a function to reduce code size, this way avoiding code inlining. @@ -633,7 +633,7 @@ void TRice8fn_11(uint16_t tid, uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, uint8_t v8, uint8_t v9, uint8_t v10); void TRice8fn_12(uint16_t tid, uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11); -#endif // #else // #if defined(TRICE_CLEAN) && TRICE_CLEAN == 1 +#endif // #else // #if TRICE_OFF == 1 || TRICE_CLEAN == 1 /////////////////////////////////////////////////////////////////////////////// // diff --git a/src/triceAuxiliary.c b/src/triceAuxiliary.c index 0aa5e22a..9bc0f9f4 100644 --- a/src/triceAuxiliary.c +++ b/src/triceAuxiliary.c @@ -5,7 +5,7 @@ #include #include -#if TRICE_DIRECT_AUXILIARY8 == 1 +#if TRICE_DIRECT_AUXILIARY8 == 1 && TRICE_OFF == 0 //! UserNonBlockingDirectWrite8AuxiliaryFn can get a user function address for writing to an auxiliary interface. Write8AuxiliaryFn_t UserNonBlockingDirectWrite8AuxiliaryFn = (void*)0; @@ -75,4 +75,4 @@ void TriceNonBlockingDeferredWrite32Auxiliary(const uint32_t* enc, unsigned coun #endif } -#endif // #if TRICE_DEFERRED_AUXILIARY32 == 1 +#endif // #if TRICE_DEFERRED_AUXILIARY32 == 1 && TRICE_OFF == 0 diff --git a/src/triceDefaultConfig.h b/src/triceDefaultConfig.h index 29ac185c..ff12801f 100644 --- a/src/triceDefaultConfig.h +++ b/src/triceDefaultConfig.h @@ -9,6 +9,14 @@ extern "C" { #endif +#ifndef TRICE_CLEAN + #define TRICE_CLEAN 0 +#endif + +#ifndef TRICE_OFF + #define TRICE_OFF 0 +#endif + #ifndef TRICE_UARTA_MIN_ID #define TRICE_UARTA_MIN_ID 0 //!< TRICE_UARTA_MIN_ID, if > 0, is the smalles ID routed to UARTA. #endif diff --git a/src/triceDoubleBuffer.c b/src/triceDoubleBuffer.c index caa44344..8c2ffa03 100644 --- a/src/triceDoubleBuffer.c +++ b/src/triceDoubleBuffer.c @@ -5,7 +5,7 @@ #include "tcobs.h" #include "trice.h" -#if TRICE_BUFFER == TRICE_DOUBLE_BUFFER +#if TRICE_BUFFER == TRICE_DOUBLE_BUFFER && TRICE_OFF == 0 static void TriceOut(uint32_t* tb, size_t tLen); @@ -321,4 +321,4 @@ static void TriceOut(uint32_t* tb, size_t tLen) { TRICE_LEAVE_CRITICAL_SECTION } -#endif // #if TRICE_BUFFER == TRICE_DOUBLE_BUFFER +#endif // #if TRICE_BUFFER == TRICE_DOUBLE_BUFFER && TRICE_OFF == 0 diff --git a/src/triceRingBuffer.c b/src/triceRingBuffer.c index 0888c6a7..038d96d6 100644 --- a/src/triceRingBuffer.c +++ b/src/triceRingBuffer.c @@ -9,7 +9,7 @@ // lint -e528 Warning 528: Symbol 'Trice0(unsigned short, const char *)' not referenced // lint -e438 Warning 438: Last value assigned to variable 'singleTricesRingCount' not used. -#if TRICE_BUFFER == TRICE_RING_BUFFER +#if TRICE_BUFFER == TRICE_RING_BUFFER && TRICE_OFF == 0 static int TriceSingleDeferredOut(uint32_t* addr); @@ -287,4 +287,4 @@ void WatchRingBufferMargins(void) { #endif // #if TRICE_RING_BUFFER_OVERFLOW_WATCH == 1 -#endif // #if TRICE_BUFFER == TRICE_RING_BUFFER +#endif // #if TRICE_BUFFER == TRICE_RING_BUFFER && TRICE_OFF == 0 diff --git a/src/triceStackBuffer.c b/src/triceStackBuffer.c index d05d9b37..a182c10e 100644 --- a/src/triceStackBuffer.c +++ b/src/triceStackBuffer.c @@ -3,8 +3,8 @@ //! ////////////////////////////////////////////////////////////////////////// #include "trice.h" -#if TRICE_BUFFER == TRICE_STACK_BUFFER +#if TRICE_BUFFER == TRICE_STACK_BUFFER && TRICE_OFF == 0 void TriceTransfer(void) {} -#endif // #if TRICE_BUFFER == TRICE_STACK_BUFFER +#endif // #if TRICE_BUFFER == TRICE_STACK_BUFFER && TRICE_OFF == 0 diff --git a/src/triceStaticBuffer.c b/src/triceStaticBuffer.c index 323828c9..78d1f4f8 100644 --- a/src/triceStaticBuffer.c +++ b/src/triceStaticBuffer.c @@ -3,7 +3,7 @@ //! ////////////////////////////////////////////////////////////////////////// #include "trice.h" -#if TRICE_BUFFER == TRICE_STATIC_BUFFER +#if TRICE_BUFFER == TRICE_STATIC_BUFFER && TRICE_OFF == 0 //! triceSingleBuffer holds a single trice during direct trice macro execution. uint32_t triceSingleBuffer[TRICE_BUFFER_SIZE >> 2]; @@ -13,4 +13,4 @@ uint32_t* const triceSingleBufferStartWritePosition = &triceSingleBuffer[TRICE_D void TriceTransfer(void) {} -#endif // #if TRICE_BUFFER == TRICE_STATIC_BUFFER +#endif // #if TRICE_BUFFER == TRICE_STATIC_BUFFER && TRICE_OFF == 0 diff --git a/src/triceUart.c b/src/triceUart.c index 731edc59..3d04c8ee 100644 --- a/src/triceUart.c +++ b/src/triceUart.c @@ -5,7 +5,7 @@ #include #include -#if TRICE_DEFERRED_UARTA == 1 +#if TRICE_DEFERRED_UARTA == 1 && TRICE_OFF == 0 #include "triceUart.h" // User has to provide this hardeware specific file, see examples folders. @@ -133,4 +133,4 @@ void triceTriggerTransmitUartB(void) { } } -#endif // #if TRICE_DEFERRED_UARTB == 1 +#endif // #if TRICE_DEFERRED_UARTB == 1 && TRICE_OFF == 0 diff --git a/src/xtea.c b/src/xtea.c index 358ad2bc..305966c7 100644 --- a/src/xtea.c +++ b/src/xtea.c @@ -5,7 +5,7 @@ #include "xtea.h" #include "trice.h" -#if (TRICE_DIRECT_XTEA_ENCRYPT == 1) || (TRICE_DEFERRED_XTEA_ENCRYPT == 1) +#if ((TRICE_DIRECT_XTEA_ENCRYPT == 1) || (TRICE_DEFERRED_XTEA_ENCRYPT == 1)) && TRICE_OFF == 0 //! golang XTEA works with 64 rounds static const unsigned int numRounds = 64; @@ -86,4 +86,4 @@ void XTEAEncrypt(uint32_t* p, unsigned count) { } } -#endif // #if (TRICE_DIRECT_XTEA_ENCRYPT == 1) || (TRICE_DEFERRED_XTEA_ENCRYPT == 1) +#endif // #if ((TRICE_DIRECT_XTEA_ENCRYPT == 1) || (TRICE_DEFERRED_XTEA_ENCRYPT == 1)) && TRICE_OFF == 0