📄 ui.h
字号:
//*****************************************************************************//// ui.h - Prototypes for the simple serial port user interface.//// Copyright (c) 2005,2006 Luminary Micro, Inc. All rights reserved.//// Software License Agreement//// Luminary Micro, Inc. (LMI) is supplying this software for use solely and// exclusively on LMI's microcontroller products.//// The software is owned by LMI and/or its suppliers, and is protected under// applicable copyright laws. All rights are reserved. Any use in violation// of the foregoing restrictions may subject the user to criminal sanctions// under applicable laws, as well as to civil liability for the breach of the// terms and conditions of this license.//// THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.// LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR// CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.//// This is part of revision 196 of an01238.////*****************************************************************************#ifndef __UI_H__#define __UI_H__//*****************************************************************************////! Describes a single UI command.//!//! This structure describes a single command that is recognized by the UI.//! Two types of commands are recognized; a simple command and a command that//! takes an integer argument. Simple commands are for toggling things or//! changing modes (such as start/stop). Integer argument commands are for//! things that can take on many values (such as the requested speed).////*****************************************************************************typedef struct{ // // The character that corresponds to this command. // char cCmd; // // The type of this command. If 0, it is simply a command that takes no // argument. If 1, it is a command that takes an integer argument. // char cType; // // The name of the command. This is only used when the type is one. // char *pcName; // // A pointer to the routine that is called when this command is received. // This function is called during an interrupt handler. // void (*pfnHandler)(unsigned long ulValue);}tUICommandList;//*****************************************************************************////! Describes the UI.//!//! This structure describes the user interface. A pointer to the string//! containing the current display, along with the list of recognized commands,//! is contained in this structure.////*****************************************************************************typedef struct{ // // A pointer to the string that is the current display for the UI. // const char *pcDisplay; // // The number of commands characters recognized. // unsigned long ulCommandCount; // // A pointer to an array of command character definitions. // const tUICommandList *psCommands;}tUIDescription;//*****************************************************************************//// Prototypes for the APIs.////*****************************************************************************extern void UIRxCallback(void);extern long UIInitialize(const tUIDescription *pUIInfo);extern void UIDisplay(char *pcString);extern void UIUpdate(void);#endif // __UI_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -