mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-01 00:28:18 +00:00
segger-rtt: fix compile for arm-none-eabi-gcc
This commit is contained in:
parent
7dc86dfd35
commit
dd13ed293d
12
3rd-party/segger-rtt/SEGGER_RTT_Syscalls_GCC.c
vendored
12
3rd-party/segger-rtt/SEGGER_RTT_Syscalls_GCC.c
vendored
@ -59,12 +59,16 @@ Purpose : Low-level functions for using printf() via RTT in GCC.
|
||||
Revision: $Rev: 4351 $
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "btstack_config.h"
|
||||
|
||||
#ifdef ENABLE_SEGGER_RTT
|
||||
|
||||
#if (defined __GNUC__) && !(defined __SES_ARM) && !(defined __CROSSWORKS_ARM)
|
||||
|
||||
#include <reent.h> // required for _write_r
|
||||
#include "SEGGER_RTT.h"
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
* Types
|
||||
@ -84,7 +88,7 @@ struct _reent;
|
||||
**********************************************************************
|
||||
*/
|
||||
int _write(int file, char *ptr, int len);
|
||||
int _write_r(struct _reent *r, int file, const void *ptr, int len);
|
||||
_ssize_t _write_r(struct _reent *r, int file, const void *ptr, size_t len);
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
@ -119,12 +123,14 @@ int _write(int file, char *ptr, int len) {
|
||||
* including stdout.
|
||||
* Write data via RTT.
|
||||
*/
|
||||
int _write_r(struct _reent *r, int file, const void *ptr, int len) {
|
||||
_ssize_t _write_r(struct _reent *r, int file, const void *ptr, size_t len) {
|
||||
(void) file; /* Not used, avoid warning */
|
||||
(void) r; /* Not used, avoid warning */
|
||||
SEGGER_RTT_Write(0, ptr, len);
|
||||
return len;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/****** End Of File *************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user