libgloss.c

来自「这里有很多我自己做的凌阳单片机源程序」· C语言 代码 · 共 51 行

C
51
字号
/* printf in "CLib" will call printf_hook.   _SemiPrintf makes IDE can hook "printf" action.   User don't want to hook "printf" when __OPTIMIZE__.   function prototype:     void printf_hook (unsigned long lptr, unsigned int size); */#ifndef __OPTIMIZE__asm (".code.public _SemiPrintf.public _printf_hook_printf_hook: .proc_SemiPrintf:  retf  .endp");#elseasm (".code.public _printf_hook_printf_hook: .proc  retf  .endp");#endif/* Be compatible with old project, user can remove them in new project. */void printf_init (int x){	return;}void printf_end (void){	return;}/* printf in "CLib" will call putchar.   user can implement this function -- send a char to UART? */int putchar (int c){	return c;}/* malloc in "LibMem" will call malloc_lock/malloc_unlock.   if user's project has multitask, they should be implemented. */void _malloc_lock (void){	return;}void  _malloc_unlock (void){	return;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?