Joystick Management
[evk527]

Macros to manage Joystick on evk527. More...

Defines

#define Joy_init()   {DDRC &= ~0x40; PORTC |= 0x40; if(!Is_JTAG_enable()) {DDRF &= ~0xF0; PORTF |= 0xF0;}}
#define Is_joy_right()   (Is_JTAG_enable() || (PINF & (1<<PINF7)) ? FALSE : TRUE)
#define Is_joy_not_right()   ((!Is_JTAG_enable()) && (PINF & (1<<PINF7)) ? TRUE : FALSE)
#define Is_joy_select()   (Is_JTAG_enable() || (PINF & (1<<PINF6)) ? FALSE : TRUE)
#define Is_joy_not_select()   ((!Is_JTAG_enable()) && (PINF & (1<<PINF6)) ? TRUE : FALSE)
#define Is_joy_up()   (Is_JTAG_enable() || (PINF & (1<<PINF5)) ? FALSE : TRUE)
#define Is_joy_not_up()   ((!Is_JTAG_enable()) && (PINF & (1<<PINF5)) ? TRUE : FALSE)
#define Is_joy_left()   (Is_JTAG_enable() || (PINF & (1<<PINF4)) ? FALSE : TRUE)
#define Is_joy_not_left()   ((!Is_JTAG_enable()) && (PINF & (1<<PINF4)) ? TRUE : FALSE)
#define Is_joy_down()   ((PINC & (1<<PINC6)) ? FALSE : TRUE)
#define Is_joy_not_down()   ((PINC & (1<<PINC6)) ? TRUE : FALSE)
#define Switches_enable_it()
 Enable interrupts for switches (no possible).
#define Switches_disable_it()
 Disable interrupts for switches (no possible).

Detailed Description

Macros to manage Joystick on evk527.

Note:
The up,left and right joy are mapped on JTAG pins

Define Documentation

 
#define Joy_init (  )     {DDRC &= ~0x40; PORTC |= 0x40; if(!Is_JTAG_enable()) {DDRF &= ~0xF0; PORTF |= 0xF0;}}

Definition at line 104 of file evk_527.h.

Referenced by cdc_task_init().

 
#define Is_joy_right (  )     (Is_JTAG_enable() || (PINF & (1<<PINF7)) ? FALSE : TRUE)

Definition at line 105 of file evk_527.h.

Referenced by cdc_task().

 
#define Is_joy_not_right (  )     ((!Is_JTAG_enable()) && (PINF & (1<<PINF7)) ? TRUE : FALSE)

Definition at line 106 of file evk_527.h.

 
#define Is_joy_select (  )     (Is_JTAG_enable() || (PINF & (1<<PINF6)) ? FALSE : TRUE)

Definition at line 107 of file evk_527.h.

Referenced by cdc_task().

 
#define Is_joy_not_select (  )     ((!Is_JTAG_enable()) && (PINF & (1<<PINF6)) ? TRUE : FALSE)

Definition at line 108 of file evk_527.h.

 
#define Is_joy_up (  )     (Is_JTAG_enable() || (PINF & (1<<PINF5)) ? FALSE : TRUE)

Definition at line 109 of file evk_527.h.

Referenced by cdc_task().

 
#define Is_joy_not_up (  )     ((!Is_JTAG_enable()) && (PINF & (1<<PINF5)) ? TRUE : FALSE)

Definition at line 110 of file evk_527.h.

 
#define Is_joy_left (  )     (Is_JTAG_enable() || (PINF & (1<<PINF4)) ? FALSE : TRUE)

Definition at line 111 of file evk_527.h.

Referenced by cdc_task().

 
#define Is_joy_not_left (  )     ((!Is_JTAG_enable()) && (PINF & (1<<PINF4)) ? TRUE : FALSE)

Definition at line 112 of file evk_527.h.

 
#define Is_joy_down (  )     ((PINC & (1<<PINC6)) ? FALSE : TRUE)

Definition at line 113 of file evk_527.h.

Referenced by cdc_task().

 
#define Is_joy_not_down (  )     ((PINC & (1<<PINC6)) ? TRUE : FALSE)

Definition at line 114 of file evk_527.h.

 
#define Switches_enable_it (  ) 

Enable interrupts for switches (no possible).

Definition at line 117 of file evk_527.h.

 
#define Switches_disable_it (  ) 

Disable interrupts for switches (no possible).

Definition at line 120 of file evk_527.h.


Generated on Fri Sep 11 14:46:07 2009 for ATMEL by  doxygen 1.5.3