#include "type.h"
Go to the source code of this file.
Data Structures | |
struct | keyStateType |
Defines | |
#define | ADC_CHANNEL_ONE 1 |
#define | WM_KEY_NOT 0x00 |
#define | WM_KEY_DOWN 0x01 |
#define | WM_KEY_UP 0x02 |
#define | VK_0_NONE 0x00 |
#define | VK_1 0x01 |
#define | VK_2 0x02 |
#define | VK_3 0x03 |
#define | VK_4 0x04 |
#define | VK_5 0x05 |
Functions | |
void | ADC_Init (UINT8 iChannel) |
void | InitKeyState (keyStateType *ks) |
UINT8 | ProcessKeyPress (keyStateType *ks) |
UINT8 | ConvertADValueToVKValue (UINT16 adValue) |
UINT16 | DoADConv (int port) |
#define ADC_CHANNEL_ONE 1 |
Referenced by main().
#define VK_0_NONE 0x00 |
Referenced by ConvertADValueToVKValue(), InitKeyState(), and ProcessKeyPress().
#define VK_1 0x01 |
Referenced by ConvertADValueToVKValue().
#define VK_2 0x02 |
Referenced by ConvertADValueToVKValue(), Idle(), and MoveSelWithKey().
#define VK_3 0x03 |
Referenced by ConvertADValueToVKValue(), Idle(), and MoveSelWithKey().
#define VK_4 0x04 |
Referenced by ConvertADValueToVKValue(), and MoveSelWithKey().
#define VK_5 0x05 |
Referenced by ConvertADValueToVKValue(), and MoveSelWithKey().
#define WM_KEY_DOWN 0x01 |
Referenced by ProcessKeyPress().
#define WM_KEY_NOT 0x00 |
Referenced by InitKeyState().
#define WM_KEY_UP 0x02 |
Referenced by Idle(), and ProcessKeyPress().
void ADC_Init | ( | UINT8 | iChannel | ) |
References _VIC_ADDR, _VIC_CNTL, AD0_VIC_SLOT, AD0CR, adcISR0(), PINSEL1, VIC_AD0, VIC_BIT, VIC_ENABLE, VICIntEnable, and VICIntSelect.
Referenced by main().
UINT16 DoADConv | ( | int | port | ) |
void InitKeyState | ( | keyStateType * | ks | ) |
References keyStateType::countOnMin, keyStateType::currentVKey, keyStateType::lastKeyAction, keyStateType::minSample, keyStateType::newKeyAction, VK_0_NONE, and WM_KEY_NOT.
Referenced by main().
UINT8 ProcessKeyPress | ( | keyStateType * | ks | ) |
References ConvertADValueToVKValue(), keyStateType::countOnMin, keyStateType::currentVKey, g_adValue, keyStateType::minSample, keyStateType::newKeyAction, TRACE2, VK_0_NONE, WM_KEY_DOWN, and WM_KEY_UP.
Referenced by Idle().