From db634484577c3e3fab95eaf67443df7794b1d511 Mon Sep 17 00:00:00 2001 From: lilian Date: Fri, 30 Aug 2024 14:58:18 +0200 Subject: [PATCH] Add .clang-format-ignore for SEGGER files --- .clang-format-ignore | 2 ++ src/SEGGER_RTT.c | 17 ++++++++--------- src/SEGGER_RTT.h | 10 ++++------ 3 files changed, 14 insertions(+), 15 deletions(-) create mode 100644 .clang-format-ignore diff --git a/.clang-format-ignore b/.clang-format-ignore new file mode 100644 index 000000000..2b2eed929 --- /dev/null +++ b/.clang-format-ignore @@ -0,0 +1,2 @@ +src/SEGGER_RTT.c +src/SEGGER_RTT.h diff --git a/src/SEGGER_RTT.c b/src/SEGGER_RTT.c index a2a053a0a..9059d3812 100644 --- a/src/SEGGER_RTT.c +++ b/src/SEGGER_RTT.c @@ -1,4 +1,3 @@ -// clang-format off /********************************************************************* * SEGGER Microcontroller GmbH * * The Embedded Experts * @@ -68,7 +67,7 @@ Additional information: WrOff == (RdOff - 1): Buffer is full WrOff > RdOff: Free space includes wrap-around WrOff < RdOff: Used space includes wrap-around - (WrOff == (SizeOfBuffer - 1)) && (RdOff == 0): + (WrOff == (SizeOfBuffer - 1)) && (RdOff == 0): Buffer full and wrap-around after next byte @@ -555,7 +554,7 @@ static unsigned _GetAvailWriteSpace(SEGGER_RTT_BUFFER_UP* pRing) { * Reads characters from SEGGER real-time-terminal control block * which have been previously stored by the application. * Do not lock against interrupts and multiple access. -* Used to do the same operation that J-Link does, to transfer +* Used to do the same operation that J-Link does, to transfer * RTT data via other channels, such as TCP/IP or UART. * * Parameters @@ -740,7 +739,7 @@ unsigned SEGGER_RTT_ReadNoLock(unsigned BufferIndex, void* pData, unsigned Buffe * Function description * Reads characters from SEGGER real-time-terminal control block * which have been previously stored by the application. -* Used to do the same operation that J-Link does, to transfer +* Used to do the same operation that J-Link does, to transfer * RTT data via other channels, such as TCP/IP or UART. * * Parameters @@ -755,7 +754,7 @@ unsigned SEGGER_RTT_ReadNoLock(unsigned BufferIndex, void* pData, unsigned Buffe * This function must not be called when J-Link might also do RTT. * This function locks against all other RTT operations. I.e. during * the read operation, writing is also locked. -* If only one consumer reads from the up buffer, +* If only one consumer reads from the up buffer, * call sEGGER_RTT_ReadUpBufferNoLock() instead. */ unsigned SEGGER_RTT_ReadUpBuffer(unsigned BufferIndex, void* pBuffer, unsigned BufferSize) { @@ -813,7 +812,7 @@ unsigned SEGGER_RTT_Read(unsigned BufferIndex, void* pBuffer, unsigned BufferSiz * Function description * Stores a specified number of characters in SEGGER RTT * control block. -* SEGGER_RTT_WriteWithOverwriteNoLock does not lock the application +* SEGGER_RTT_WriteWithOverwriteNoLock does not lock the application * and overwrites data if the data does not fit into the buffer. * * Parameters @@ -826,7 +825,7 @@ unsigned SEGGER_RTT_Read(unsigned BufferIndex, void* pBuffer, unsigned BufferSiz * (2) For performance reasons this function does not call Init() * and may only be called after RTT has been initialized. * Either by calling SEGGER_RTT_Init() or calling another RTT API function first. -* (3) Do not use SEGGER_RTT_WriteWithOverwriteNoLock if a J-Link +* (3) Do not use SEGGER_RTT_WriteWithOverwriteNoLock if a J-Link * connection reads RTT data. */ void SEGGER_RTT_WriteWithOverwriteNoLock(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes) { @@ -1000,7 +999,7 @@ unsigned SEGGER_RTT_WriteSkipNoLock(unsigned BufferIndex, const void* pBuffer, u * Stores a specified number of characters in SEGGER RTT * control block inside a buffer. * SEGGER_RTT_WriteDownBufferNoLock does not lock the application. -* Used to do the same operation that J-Link does, to transfer +* Used to do the same operation that J-Link does, to transfer * RTT data from other channels, such as TCP/IP or UART. * * Parameters @@ -1168,7 +1167,7 @@ unsigned SEGGER_RTT_WriteNoLock(unsigned BufferIndex, const void* pBuffer, unsig * This function must not be called when J-Link might also do RTT. * This function locks against all other RTT operations. I.e. during * the write operation, writing from the application is also locked. -* If only one consumer writes to the down buffer, +* If only one consumer writes to the down buffer, * call SEGGER_RTT_WriteDownBufferNoLock() instead. */ unsigned SEGGER_RTT_WriteDownBuffer(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes) { diff --git a/src/SEGGER_RTT.h b/src/SEGGER_RTT.h index fbeb93532..5cb1d8548 100644 --- a/src/SEGGER_RTT.h +++ b/src/SEGGER_RTT.h @@ -1,5 +1,3 @@ - -// clang-format off /********************************************************************* * SEGGER Microcontroller GmbH * * The Embedded Experts * @@ -51,16 +49,16 @@ ---------------------------END-OF-HEADER------------------------------ File : SEGGER_RTT.h Purpose : Implementation of SEGGER real-time transfer which allows - real-time communication on targets which support debugger + real-time communication on targets which support debugger memory accesses while the CPU is running. Revision: $Rev: 24346 $ ---------------------------------------------------------------------- */ #ifndef SEGGER_RTT_H - #define SEGGER_RTT_H +#define SEGGER_RTT_H - #include "SEGGER_RTT_Conf.h" +#include "SEGGER_RTT_Conf.h" /********************************************************************* * @@ -429,7 +427,7 @@ int SEGGER_RTT_vprintf(unsigned BufferIndex, const char * sFormat, va_list * pPa } #endif - #endif // ifndef(SEGGER_RTT_ASM) +#endif // ifndef(SEGGER_RTT_ASM) /********************************************************************* *