mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-22 23:28:06 +08:00
eaef5bd133
This reverts commit 1a17e17c462bdd4e1d26d8742f8b7087273e04c2. PUBLISHED_FROM=80028de308c9a021955d1425d2bfee8feb85f193
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 *************************************************/
|