Statistics
| Branch: | Tag: | Revision:

mongoose / examples / nRF52 / http / rtt / Syscalls / RTT_Syscalls_IAR.c @ eaef5bd1

History | View | Annotate | Download (1.99 KB)

1
/* clang-format off */
2
/*********************************************************************
3
*               SEGGER MICROCONTROLLER GmbH & Co KG                  *
4
*       Solutions for real time microcontroller applications         *
5
**********************************************************************
6
*                                                                    *
7
*       (c) 2014  SEGGER Microcontroller GmbH & Co KG                *
8
*                                                                    *
9
*       www.segger.com     Support: support@segger.com               *
10
*                                                                    *
11
**********************************************************************
12

13
----------------------------------------------------------------------
14
File    : RTT_Syscalls.c
15
Purpose : Low-level functions for using printf() via RTT in IAR
16
--------  END-OF-HEADER  ---------------------------------------------
17
*/
18
#include <yfuns.h>
19
#include "SEGGER_RTT.h"
20
#pragma module_name = "?__write"
21

    
22
/*********************************************************************
23
*
24
*       Function prototypes
25
*
26
**********************************************************************
27
*/
28
size_t __write(int handle, const unsigned char * buffer, size_t size);
29

    
30
/*********************************************************************
31
*
32
*       Global functions
33
*
34
**********************************************************************
35
*/
36
/*********************************************************************
37
*
38
*       __write()
39
*
40
* Function description
41
*   Low-level write function.
42
*   libc subroutines will use this system routine for output to all files,
43
*   including stdout.
44
*   Write data via RTT.
45
*/
46
size_t __write(int handle, const unsigned char * buffer, size_t size) {
47
  (void) handle;  /* Not used, avoid warning */
48
  SEGGER_RTT_Write(0, buffer, size);
49
  return size;
50
}
51

    
52
/****** End Of File *************************************************/