📄 skyeye_stdio.c
字号:
/* * skyeye_stdio.c * this file defines standard input/output on AT91X40 in SkyEye * for Atmel AT91 input/output * * Bugs report: li ming ( lmcs00@mails.tsinghua.edu.cn ) * Last modified: 2003-02-02 * */#include "skyeye_stdio.h"#include "string.h"/* this file is to be used in ucosII on Skyeyey like <stdio.c> in linux */#include "..\UHAL\UHAL.h"void skyeye_putc( char ch ){ Uart_SendByte( ch ); return; }char skyeye_getc(void){ char ret; ret=Uart_Getch(); return ret;}void skyeye_puts( char * s ){ Uart_SendString( s ); return;}char * skyeye_gets( char * s ){ char c; char * src = s; int count = 0; while(1) { c = skyeye_getc(); if ( c == '\n' ) { *src = '\0'; skyeye_putc( c ); break; } if ( c == '\b' ) { if ( count <= 0 ) continue; count--; src--; skyeye_putc( '\b' ); skyeye_putc( ' ' ); skyeye_putc( '\b' ); continue; } count++; *src++ = c; skyeye_putc( c ); } return s;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -