mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-27 10:37:49 +08:00
6ff49dc196
Now it works in hardware. PUBLISHED_FROM=f223bde2d2bebe97513ce073eb887552bc3d93af
53 lines
2.0 KiB
C
53 lines
2.0 KiB
C
/* clang-format off */
|
|
/*********************************************************************
|
|
* SEGGER MICROCONTROLLER GmbH & Co KG *
|
|
* Solutions for real time microcontroller applications *
|
|
**********************************************************************
|
|
* *
|
|
* (c) 2014 SEGGER Microcontroller GmbH & Co KG *
|
|
* *
|
|
* www.segger.com Support: support@segger.com *
|
|
* *
|
|
**********************************************************************
|
|
|
|
----------------------------------------------------------------------
|
|
File : RTT_Syscalls.c
|
|
Purpose : Low-level functions for using printf() via RTT in IAR
|
|
-------- END-OF-HEADER ---------------------------------------------
|
|
*/
|
|
#include <yfuns.h>
|
|
#include "SEGGER_RTT.h"
|
|
#pragma module_name = "?__write"
|
|
|
|
/*********************************************************************
|
|
*
|
|
* Function prototypes
|
|
*
|
|
**********************************************************************
|
|
*/
|
|
size_t __write(int handle, const unsigned char * buffer, size_t size);
|
|
|
|
/*********************************************************************
|
|
*
|
|
* Global functions
|
|
*
|
|
**********************************************************************
|
|
*/
|
|
/*********************************************************************
|
|
*
|
|
* __write()
|
|
*
|
|
* Function description
|
|
* Low-level write function.
|
|
* libc subroutines will use this system routine for output to all files,
|
|
* including stdout.
|
|
* Write data via RTT.
|
|
*/
|
|
size_t __write(int handle, const unsigned char * buffer, size_t size) {
|
|
(void) handle; /* Not used, avoid warning */
|
|
SEGGER_RTT_Write(0, buffer, size);
|
|
return size;
|
|
}
|
|
|
|
/****** End Of File *************************************************/
|