using System;
using System.Collections.Generic;
using System.Text;

namespace ShowforAW60ByCharp.Data
{
    ///----------------------------------------------------------------------------------
    /// <summary>
    /// 本工程中用到的变量或数据类型或常量定义区
    /// </summary>
    ///----------------------------------------------------------------------------------
    class DefinedTypeData
    {
        /* 命令类常量 */
        public static readonly byte CODE_FAILED                   = 0xFF;                //用于失败码或者前标志标识
        public static readonly byte CODE_SUCCESSED                = 0x00;                //用于成功码或者后标志标识
        public static readonly byte CODE_STOP                     = 0xFE;                //停止一个具体的演示实例，即过程

        public static readonly byte CODE_START_PC_SHOW            = 0x01;                //向高端PC机发送的演示启动命令
        public static readonly byte CODE_STOP_PC_SHOW             = 0x02;                //向高端PC机发送的演示停止命令，暂时保留未用



        public static readonly byte CODE_LIGHT_CONTROL            = 0x20;                //小灯控制
        public static readonly byte CODE_LIGHT_OPEN               = 0x21;                //打开小灯
        public static readonly byte CODE_LIGHT_SHUTDOWN           = 0x22;                //关闭小灯
        public static readonly byte CODE_LIGHT_CHANGE             = 0x23;                //小灯闪烁

        public static readonly byte CODE_LCD_CONTROL              = 0x25;
        public static readonly byte CODE_LCD_SHOW_STR             = 0x26;                //在LCD上显示从pc机发送过来的数据
        public static readonly byte CODE_LCD_CLEAR                = 0x27;                //LCD液晶屏幕重新初始化，清屏

        public static readonly byte CODE_LED_CONTROL              = 0x30;
        public static readonly byte CODE_LED_COUNT_TO_NUM         = 0x31;                //在LED上从0000计数到NUM

        public static readonly byte CODE_PWM_CONTROL              = 0x35;
        public static readonly byte CODE_PWM_CONTROL_LIGHT        = 0x36;                //通过PWM占空比的变化，控制小灯亮暗
        public static readonly byte CODE_PWM_CONTROL_LIGHT_INIT   = 0x37;                //pwm控制小灯，之小灯初始化
        public static readonly byte CODE_PWM_CONTROL_LIGHT_CLOSE  = 0x38;                //pwm控制小灯，之关闭小灯


        public static readonly byte CODE_TIMER_CONTROL            = 0x40;
        public static readonly byte CODE_TIMER_COUNT              = 0x41;                //定时器计数开始
        public static readonly byte CODE_TIMER_COUNT_CLOSE        = 0x42;                //定时器计数关闭
        public static readonly byte CODE_TIMER__                  = 0x43;                //用于标识，说明是一个数，产生的一个计数，属于状态码 *** ***


        public static readonly byte CODE_AD_CONTROL               = 0x45;
        public static readonly byte CODE_AD_MCU_TEMPERATURE       = 0x46;                //获取内置温度传感器的温度


        public static readonly byte CODE_FLASH_CONTROL            = 0x50;
        public static readonly byte CODE_FLASH_PIC_SAVE           = 0x51;                //向flash中保存图片
        public static readonly byte CODE_FLASH_PIC_READ           = 0x52;                //从flash中读出图片

        public static readonly byte CODE_KEYBOARD_CONTROL         = 0x55;
        public static readonly byte CODE_KEYBOARD_RECOGNIZE       = 0x56;                //打开键盘中断
        public static readonly byte CODE_KEYBOARD_RECOGNIZE_CLOSE = 0x57;                //关闭键盘中断,即不进行键盘的识别操作

        public static readonly byte CODE_IRQ_CONTROL              = 0x60;


        /* SCI通讯类常量 */
        public static readonly int  BaudRate                      = 38400;               //用于设置串口通讯波特率
    }
}



/* ***  2010/09/26 截止  苏州大学嵌入式仿真研究所 *** */
