mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-21 13:42:15 +08:00
8d72c2a7b2
PUBLISHED_FROM=d9d979057d5269ac32d16545dd2489485bda642a
51 lines
2.0 KiB
C
51 lines
2.0 KiB
C
/*********************************************************************
|
|
* 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 *************************************************/ |