?? usmart_config.c
字號:
#include "usmart.h"
#include "usmart_str.h"
//////////////////////////////////////////////////////////////////////////////////
//本程序只供學習使用,未經作者許可,不得用于其它任何用途
//ALIENTEK STM32開發板
//正點原子@ALIENTEK
//技術論壇:www.openedv.com
//修改日期:2011/6/13
//版本:V2.0
//版權所有,盜版必究。
//Copyright(C) 正點原子 2011-2021
//All rights reserved
//********************************************************************************
//升級說明
//V1.4
//增加了對參數為string類型的函數的支持.適用范圍大大提高.
//優化了內存占用,靜態內存占用為79個字節@10個參數.動態適應數字及字符串長度
//V2.0,
//1,修改了list指令,打印函數的完整表達式.
//2,增加了id指令,打印每個函數的入口地址.
//3,修改了參數匹配,支持函數參數的調用(輸入入口地址).
//4,增加了函數名長度宏定義.
/////////////////////////////////////////////////////////////////////////////////////
////////////////////////////用戶配置區///////////////////////////////////////////////
//這下面要包含所用到的函數所申明的頭文件(用戶自己添加)
#include "delay.h"
#include "usart.h"
#include "sys.h"
#include "lcd.h"
extern void led_set(u8 sta);
extern void test_fun(void(*ledset)(u8),u8 sta);
//函數名列表初始化(用戶自己添加)
//用戶直接在這里輸入要執行的函數名及其查找串
struct _m_usmart_nametab usmart_nametab[]=
{
(void*)delay_ms,"void delay_ms(u16 nms)",
(void*)delay_us,"void delay_us(u32 nus)",
(void*)LCD_Clear,"void LCD_Clear(u16 Color)",
(void*)LCD_Fill,"void LCD_Fill(u16 xsta,u16 ysta,u16 xend,u16 yend,u16 color)",
(void*)LCD_DrawLine,"void LCD_DrawLine(u16 x1, u16 y1, u16 x2, u16 y2)",
(void*)LCD_DrawRectangle,"void LCD_DrawRectangle(u16 x1, u16 y1, u16 x2, u16 y2)",
(void*)Draw_Circle,"void Draw_Circle(u16 x0,u16 y0,u8 r)",
(void*)LCD_ShowNum,"void LCD_ShowNum(u16 x,u16 y,u32 num,u8 len,u8 size)",
(void*)LCD_ShowString,"void LCD_ShowString(u16 x,u16 y,const u8 *p)",
(void*)led_set,"void led_set(u8 sta)",
(void*)test_fun,"void test_fun(void(*ledset)(u8),u8 sta)",
};
///////////////////////////////////END///////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
//函數控制管理器初始化
//得到各個受控函數的名字
//得到函數總數量
struct _m_usmart_dev usmart_dev=
{
usmart_nametab,
usmart_init,
usmart_cmd_rec,
usmart_exe,
usmart_scan,
sizeof(usmart_nametab)/sizeof(struct _m_usmart_nametab),//函數數量
0, //參數數量
0, //函數ID
0, //默認為數據,1時為字符串
0, //參數長度表
0, //函數參數表
};
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -