Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .clang-format-ignore for SEGGER files #491

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src/SEGGER_RTT.c
src/SEGGER_RTT.h
17 changes: 8 additions & 9 deletions src/SEGGER_RTT.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// clang-format off
/*********************************************************************
* SEGGER Microcontroller GmbH *
* The Embedded Experts *
Expand Down Expand Up @@ -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


Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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) {
Expand Down Expand Up @@ -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
Expand All @@ -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) {
Expand Down Expand Up @@ -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 <Down> 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
Expand Down Expand Up @@ -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) {
Expand Down
10 changes: 4 additions & 6 deletions src/SEGGER_RTT.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

// clang-format off
/*********************************************************************
* SEGGER Microcontroller GmbH *
* The Embedded Experts *
Expand Down Expand Up @@ -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"

/*********************************************************************
*
Expand Down Expand Up @@ -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)

/*********************************************************************
*
Expand Down
Loading