1 /********************************************************************* 2 * SEGGER Microcontroller GmbH * 3 * Solutions for real time microcontroller applications * 4 ********************************************************************** 5 * * 6 * (c) 1995 - 2018 SEGGER Microcontroller GmbH * 7 * * 8 * www.segger.com Support: support@segger.com * 9 * * 10 ********************************************************************** 11 12 --------- END-OF-HEADER -------------------------------------------- 13 File : Main_RTT_MenuApp.c 14 Purpose : Sample application to demonstrate RTT bi-directional functionality 15 */ 16 17 #define MAIN_C 18 19 #include <stdio.h> 20 21 #include "SEGGER_RTT.h" 22 23 volatile int _Cnt; 24 volatile int _Delay; 25 26 static char r; 27 28 /********************************************************************* 29 * 30 * main 31 */ main(void)32void main(void) { 33 34 SEGGER_RTT_WriteString(0, "SEGGER Real-Time-Terminal Sample\r\n"); 35 SEGGER_RTT_ConfigUpBuffer(0, NULL, NULL, 0, SEGGER_RTT_MODE_NO_BLOCK_SKIP); 36 do { 37 r = SEGGER_RTT_WaitKey(); 38 SEGGER_RTT_Write(0, &r, 1); 39 r++; 40 } while (1); 41 } 42 43 /*************************** End of file ****************************/ 44