📄 semihosting.h.svn-base
字号:
/***************************************************************************
文件名称:semihosting.h
版本号: 1.0
日期: 2005-12-15
说明: 在C中使用semihosting功能的调用函数,具体每种调用的功能参考
ADS1.2 Debugger Target Guide
调用列表:--
修改历史:--
*****************************************************************************/
#define SemiSWI 0x123456 //the SWI number of the semihosting in ARM instruction
__swi(SemiSWI) int Semihosting(unsigned op, void *c); //op determine the type of the semihosting SWI, c point the parameter will be used
#define Sem_Open(c) Semihosting(0x1, c) //open a file on the host
#define Sem_Close(c) Semihosting(0x2, c) //close a file on the host
#define Sem_WriteC(c) Semihosting(0x3, c) //write a character to the console
#define Sem_Write0(c) Semihosting(0x4, c) //write a null-terminated string to the console
#define Sem_Write(c) Semihosting(0x5, c) //write to a file on the host
#define Sem_Read(c) Semihosting(0x6, c) //read the contents of a file into the buffer
#define Sem_ReadC(c) Semihosting(0x7, c) //read a byte from the console
#define Sem_Iserror(c) Semihosting(0x8, c) //determine if a return code is an error
#define Sem_Istty(c) Semihosting(0x9, c) //check whether a file is connected to an interactive device
#define Sem_Seek(c) Semihosting(0xa, c) //seek to a position in a file
#define Sem_Flen(c) Semihosting(0xc, c) //return the length of a file
#define Sem_Tmpnam(c) Semihosting(0xd, c) //return a temporary name of a file
#define Sem_Remove(c) Semihosting(0xe, c) //remove a file from the host
#define Sem_Rename(c) Semihosting(0xf, c) //rename a file on the host
#define Sem_Clock(c) Semihosting(0x10, c) //number of centiseconds since execution started
#define Sem_Time(c) Semihosting(0x11, c) //number of seconds since January 1,1970
#define Sem_System(c) Semihosting(0x12, c) //pass a command to the host command-line interpreter
#define Sem_Errno(c) Semihosting(0x13, c) //get the value of C library errno variable
#define Sem_GetCmdline(c) Semihosting(0x15, c) //get the command line use to call the executable
#define Sem_Heapinfo(c) Semihosting(0x16, c) //get the system heap parameters
#define Sem_Elapsed(c) Semihosting(0x30, c) //get the number of target ticks since execution started
#define Sem_Tickfreq(c) Semihosting(0x31, c) //determine the tick frequency
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -