mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-24 00:07:49 +08:00
f061dcf8b6
By making dir hierarchy replicate that of examples provided with the nRF IoT SDK. Also, example for Keil uVision IDE is added. PUBLISHED_FROM=1a3d9a54d15eb1acfb1b5d162138576a387ed21c
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 *************************************************/ |