📄 misc.c
字号:
// Miscellaneous microcontroller functions#include "misc.h"#include "machine.h"#include <ctype.h>#include <string.h>// This code will be placed in the fixed memory area//#pragma SECTION program fixed_program// Delays for (aproximately) the specified number of microseconds// Input: d - delay time in usvoid delay( u16 d ) { u16 i; for ( i = 0; i < d; i ++ ) { nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); }}// Transform a string to lower case// Input: pstr - the stringvoid strlower( char *pstr ){ u16 i; for( i = 0; i < strlen( pstr ); i ++ ) pstr[ i ] = tolower( pstr[ i ] );}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -