📄 ppsmmsg.h
字号:
#ifndef PPSMMSG_H
#define PPSMMSG_H
/*
* Interrupt Constant Message Type
*/
#define IRPT_BEGINMSG 0x0030 /* the beginning of ppsm msg*/
#define IRPT_ERROR 0xFFFF /* general error */
#define IRPT_NONE (0x0000 + IRPT_BEGINMSG)/* no activity */
#define IRPT_PEN (0x0001 + IRPT_BEGINMSG) /* pen message */
#define IRPT_ICON (0x0002 + IRPT_BEGINMSG) /* icon message */
#define IRPT_KEY (0x0003 + IRPT_BEGINMSG) /* soft keyboard */
#define IRPT_PAGER (0x0004 + IRPT_BEGINMSG) /* pager message, system doesn't use this, it can be used by users */
#define IRPT_RTC (0x0005 + IRPT_BEGINMSG) /* RTC message */
#define IRPT_TIMER (0x0006 + IRPT_BEGINMSG) /* timer message */
#define IRPT_INPUT (0x0007 + IRPT_BEGINMSG) /* input pad message */
#define IRPT_HWR (0x0008 + IRPT_BEGINMSG) /* hand writing recognition */
#define IRPT_INPUT_STATUS (0x0009 + IRPT_BEGINMSG) /* input status message */
#define IRPT_AUDIO (0x000A + IRPT_BEGINMSG) /* Audio status message */
#define IRPT_SPIM (0x0020 + IRPT_BEGINMSG) /* SPI master message */
#define IRPT_SPIS (0x0021 + IRPT_BEGINMSG) /* SPI Slave message */
#define IRPT_IRQ1 (0x0022 + IRPT_BEGINMSG) /* IRQ1 message */
#define IRPT_IRQ2 (0x0023 + IRPT_BEGINMSG) /* IRQ2 message */
#define IRPT_IRQ3 (0x0024 + IRPT_BEGINMSG) /* IRQ3 message */
#define IRPT_IRQ6 (0x0025 + IRPT_BEGINMSG) /* IRQ6 message */
#define IRPT_INT (0x0026 + IRPT_BEGINMSG) /* INT message */
#define IRPT_WDOG (0x0027 + IRPT_BEGINMSG) /* WatchDog message */
#define IRPT_PWM (0x0028 + IRPT_BEGINMSG) /* PWM message */
#define IRPT_UART (0x0029 + IRPT_BEGINMSG) /* UART data */
#define IRPT_USER (0x003F + IRPT_BEGINMSG)
/* (0x0100 - 0x200 reserved for VTech) */
/*
* Interrupt message types for pen
*/
#define PPSM_NONE 0x0000
#define PPSM_ICON_TOUCH 0x0001
#define PPSM_ICON_DRAG 0x0002
#define PPSM_ICON_PEN_UP 0x0003
#define PPSM_ICON_DRAG_UP 0x0004
#define PPSM_INPUT_TOUCH 0x0010
#define PPSM_INPUT_DRAG 0x0020
#define PPSM_INPUT_PEN_UP 0x0030
#define PPSM_INPUT_DRAG_UP 0x0040
/* KEY MSG ??????????????????*/
/* ????????????????*/
/* Error Code */
#define PPSM_OK 0x0000
#define PPSM_ERROR 0x0001
#define PPSM_ERR_NO_MEMORY 0x4001
#define PPSM_ERR_AREA_CODE 0x0205
#define PPSM_ERR_AREA_ID 0x0206
#define PPSM_ERR_ICON_TYPE 0x0207
#define PPSM_ERR_ACTIVE_PUSH 0x0208
#define PPSM_ERR_ACTIVE_POP 0x0209
#define PPSM_ERR_COORDINATE 0x0220
#define PPSM_ERR_INPUT_PAD_OPENED 0x0221
#define PPSM_ERR_INPUT_PAD_CLOSED 0x0222
#define PPSM_ERR_TASK_ID 0x0225
/*
Message passing ...
messageType :
Currently, there are only one type of message :
Interrupt message, MESSAGE_IRPT.
In future, new message types can be added.
message :
This is the message to send. Eg, for MESSAGE_IRPT, the
value for this could be IRPT_PEN, IRPT_HWR, IRPT_INPUT ...
data:
Data that associated with the message ... if any. Eg, for
IRPT_HWR, the data will be the recognised characters.
*/
#define MESSAGE_NONE 0x0000 /* nothing ? */
#define MESSAGE_IRPT 0x0001 /* bit 0 */
#define NO_SWAP_TASK 0
#define SWAP_TASK_LATER 1
#define SWAP_TASK_BACK_LATER 2
#define SWAP_TASK 3
#define SWAP_TO_BACKGROUND 0
#define SWAP_TO_FOREGROUND 1
#endif /* PPSMMSG_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -