00001 #ifndef _MOUSE_TASK_H_
00002 #define _MOUSE_TASK_H_
00003
00004 #include "config.h"
00005
00006 #define Hid_mouse_report_up() (g_hid_mouse_report[2]-=MOUSE_SPEED)
00007 #define Hid_mouse_report_down() (g_hid_mouse_report[2]+=MOUSE_SPEED)
00008 #define Hid_mouse_report_left() (g_hid_mouse_report[1]-=MOUSE_SPEED)
00009 #define Hid_mouse_report_right() (g_hid_mouse_report[1]+=MOUSE_SPEED)
00010
00011 #define Hid_mouse_report_reset() (g_hid_mouse_report[1]=0,g_hid_mouse_report[2]=0)
00012
00013 #define Is_mouse_left_event() ((PINB & (1<<PINB6)) ? FALSE : TRUE)
00014 #define Is_mouse_right_event() ((PINE & (1<<PINE4)) ? FALSE : TRUE)
00015 #define Is_mouse_up_event() ((PINB & (1<<PINB7)) ? FALSE : TRUE)
00016 #define Is_mouse_down_event() ((PINE & (1<<PINE5)) ? FALSE : TRUE)
00017
00018 #define Joy_init() (DDRB &= ~((1<<PINB7)|(1<<PINB6)), PORTB |= ((1<<PINB7)|(1<<PINB6)), DDRE &= ~((1<<PINE5)|(1<<PINE4)), PORTE |= ((1<<PINE5)|(1<<PINE4)))
00019
00020
00022 U8 g_hid_mouse_report[4];
00023
00024 void Mouse_Inicializar (void);
00025
00026 bit is_mouse_event(void);
00027
00028 #endif
00029