mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-23 19:20:51 +00:00
segger-rtt: add SEGGER_RTT_GetAvailWriteSpace function
This commit is contained in:
parent
779af47be2
commit
a20be900c9
17
3rd-party/segger-rtt/SEGGER_RTT.c
vendored
17
3rd-party/segger-rtt/SEGGER_RTT.c
vendored
@ -1696,5 +1696,22 @@ int SEGGER_RTT_TerminalOut (unsigned char TerminalId, const char* s) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
* SEGGER_RTT_GetAvailWriteSpace
|
||||
* Returns the number of bytes that can be written to the ring
|
||||
* buffer without blocking.
|
||||
*
|
||||
* Parameters
|
||||
* BufferIndex Index of the buffer.
|
||||
*
|
||||
* Return value
|
||||
* Number of bytes that are free in the buffer.
|
||||
*/
|
||||
|
||||
unsigned SEGGER_RTT_GetAvailWriteSpace (unsigned BufferIndex){
|
||||
return _GetAvailWriteSpace(&_SEGGER_RTT.aUp[BufferIndex]);
|
||||
}
|
||||
|
||||
|
||||
/*************************** End of file ****************************/
|
||||
|
5
3rd-party/segger-rtt/SEGGER_RTT.h
vendored
5
3rd-party/segger-rtt/SEGGER_RTT.h
vendored
@ -219,6 +219,11 @@ void SEGGER_RTT_WriteWithOverwriteNoLock(unsigned BufferIndex, const voi
|
||||
unsigned SEGGER_RTT_PutChar (unsigned BufferIndex, char c);
|
||||
unsigned SEGGER_RTT_PutCharSkip (unsigned BufferIndex, char c);
|
||||
unsigned SEGGER_RTT_PutCharSkipNoLock (unsigned BufferIndex, char c);
|
||||
|
||||
// BK addition
|
||||
unsigned SEGGER_RTT_GetAvailWriteSpace (unsigned BufferIndex);
|
||||
|
||||
|
||||
//
|
||||
// Function macro for performance optimization
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user