#include "HardwareInfo.c"
#include "JMLib.c"
#include <SetLCDBack.h>
#include <GetPS2All.h>
#include <SetLCD3Char.h>

// define global var
unsigned char m_Btn1 = 0;
unsigned char m_Btn2 = 0;
unsigned char m_joy1_X = 0;
unsigned char m_joy1_Y = 0;
unsigned char m_joy2_X = 0;
unsigned char m_joy2_Y = 0;

int main(void)
{
    X2RCU_Init();
    SetLCDBack(1);
    while (1)
    {
        GetPS2All(_PS2_1_);
        SetLCD3Char(8, 0, m_Btn1, YELLOW, BLACK);
        SetLCD3Char(48, 0, m_Btn2, YELLOW, BLACK);
        SetLCD3Char(8, 16, m_joy1_X, YELLOW, BLACK);
        SetLCD3Char(40, 16, m_joy1_Y, YELLOW, BLACK);
        SetLCD3Char(8, 32, m_joy2_X, YELLOW, BLACK);
        SetLCD3Char(40, 32, m_joy2_Y, YELLOW, BLACK);
    }
    return 1;
}

