- Main Page
- Modules
- Data Structures
- Files
- Related Pages

- File List
- Globals

# stk_526.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Defines
#define | VBUS_SENSE_PORT PORTC
#define | VBUS_SENSE_PIN PINC
#define | VBUS_SENSE_DDR DDRC
#define | VBUS_SENSE_IO 4
#define | Leds_init() (DDRD |= 0x33, PORTD &= ~0x33)
#define | Led0_on() (PORTD |= 0x01)
#define | Led0_off() (PORTD &= ~0x01)
#define | Led0_toggle() (PORTD ^= 0x01)
#define | Led1_on() (PORTD |= 0x02)
#define | Led1_off() (PORTD &= ~0x02)
#define | Led1_toggle() (PORTD ^= 0x02)
#define | Led2_on() (PORTD |= 0x10)
#define | Led2_off() (PORTD &= ~0x10)
#define | Led2_toggle() (PORTD ^= 0x10)
#define | Led3_on() (PORTD |= 0x20)
#define | Led3_off() (PORTD &= ~0x20)
#define | Led3_toggle() (PORTD ^= 0x20)
#define | Leds_set_val(c) (Leds_off(),PORTD |= (c&0x03)+((c&0x0C)<<2))
#define | Leds_get_val() ((PORTD&0x30)>>2+(PORTD&0x03))
#define | Leds_off() (PORTD &= ~0x33)
#define | Joy_init() (DDRB &= ~0xF1, PORTB |= 0xF1)
#define | Push_button_init() Joy_init()
#define | Is_joy_left() (((PINB&0x10) == 0) ? TRUE : FALSE)
#define | Is_joy_not_left() (((PINB&0x10) == 0) ? FALSE : TRUE)
#define | Is_button_left() Is_joy_left()
#define | Is_button_not_left() Is_joy_not_left()
#define | Is_joy_middle() (((PINB&0x01) == 0) ? TRUE : FALSE)
#define | Is_joy_not_middle() (((PINB&0x01) == 0) ? FALSE : TRUE)
#define | Is_joy_select() Is_joy_middle()
#define | Is_joy_not_select() Is_joy_not_middle()
#define | Is_button_middle() Is_joy_middle()
#define | Is_button_not_middle() Is_joy_not_middle()
#define | Is_joy_right() (((PINB&0x40) == 0) ? TRUE : FALSE)
#define | Is_joy_not_right() (((PINB&0x40) == 0) ? FALSE : TRUE)
#define | Is_button_right() Is_joy_right()
#define | Is_button_not_right() Is_joy_not_right()
#define | Is_joy_down() (((PINB&0x80) == 0) ? TRUE : FALSE)
#define | Is_joy_not_down() (((PINB&0x80) == 0) ? FALSE : TRUE)
#define | Is_button_down() Is_joy_down()
#define | Is_button_not_down() Is_joy_not_down()
#define | Is_joy_up() (((PINB&0x20) == 0) ? TRUE : FALSE)
#define | Is_joy_not_up() (((PINB&0x20) == 0) ? FALSE : TRUE)
#define | Is_button_up() Is_joy_up()
#define | Is_button_not_up() Is_joy_not_up()
#define | Hwb_button_init() (DDRD &= ~0x80)
#define | Is_hwb() (((PIND&0x80) == 0) ? TRUE : FALSE)
#define | DF_8_MB
| Macros to init the environnement for DF on Philips Wired mouse board.
#define | DF_SELECT_MEM 0
#define | DF_UNSELECT_MEM 1
#define | DF_NB_MEM 1
#define | Init_df_stk526() (DDRC_Bit2=1,PORTC_Bit2=1,DDRB_Bit0=1)
#define | DF_CS_PIN PORTC_Bit2
#define | DF_CS0 DF_CS_PIN
#define | DF_CS1 DF_CS0
#define | DF_CS2 DF_CS0
#define | DF_CS3 DF_CS0
#define | Df_select_df(i, val) (DF_CS##i = val)
#define | Df_desel_all() (DF_CS0=DF_UNSELECT_MEM)
#define | df_init_spi() Init_df_stk526()

## Define Documentation

#define VBUS_SENSE_PORT PORTC

Definition at line 11 of file stk_526.h.

#define VBUS_SENSE_PIN PINC

Definition at line 12 of file stk_526.h.

#define VBUS_SENSE_DDR DDRC

Definition at line 13 of file stk_526.h.

#define VBUS_SENSE_IO 4

Definition at line 14 of file stk_526.h.

#define Leds_init | ( |  | ) | (DDRD |= 0x33, PORTD &= ~0x33)

Definition at line 19 of file stk_526.h.

Referenced by mouse_task_init(), and storage_task_init().

#define Led0_on | ( |  | ) | (PORTD |= 0x01)

Definition at line 21 of file stk_526.h.

#define Led0_off | ( |  | ) | (PORTD &= ~0x01)

Definition at line 22 of file stk_526.h.

#define Led0_toggle | ( |  | ) | (PORTD ^= 0x01)

Definition at line 23 of file stk_526.h.

#define Led1_on | ( |  | ) | (PORTD |= 0x02)

Definition at line 24 of file stk_526.h.

#define Led1_off | ( |  | ) | (PORTD &= ~0x02)

Definition at line 25 of file stk_526.h.

#define Led1_toggle | ( |  | ) | (PORTD ^= 0x02)

Definition at line 26 of file stk_526.h.

#define Led2_on | ( |  | ) | (PORTD |= 0x10)

Definition at line 27 of file stk_526.h.

#define Led2_off | ( |  | ) | (PORTD &= ~0x10)

Definition at line 28 of file stk_526.h.

#define Led2_toggle | ( |  | ) | (PORTD ^= 0x10)

Definition at line 29 of file stk_526.h.

#define Led3_on | ( |  | ) | (PORTD |= 0x20)

Definition at line 30 of file stk_526.h.

#define Led3_off | ( |  | ) | (PORTD &= ~0x20)

Definition at line 31 of file stk_526.h.

#define Led3_toggle | ( |  | ) | (PORTD ^= 0x20)

Definition at line 32 of file stk_526.h.

#define Leds_set_val | ( | c |  | ) | (Leds_off(),PORTD |= (c&0x03)+((c&0x0C)<<2))

Definition at line 34 of file stk_526.h.

#define Leds_get_val | ( |  | ) | ((PORTD&0x30)>>2+(PORTD&0x03))

Definition at line 35 of file stk_526.h.

#define Leds_off | ( |  | ) | (PORTD &= ~0x33)

Definition at line 36 of file stk_526.h.

#define Joy_init | ( |  | ) | (DDRB &= ~0xF1, PORTB |= 0xF1)

Definition at line 41 of file stk_526.h.

Referenced by mouse_task_init().

#define Push_button_init | ( |  | ) | Joy_init()

Definition at line 42 of file stk_526.h.

#define Is_joy_left | ( |  | ) | (((PINB&0x10) == 0) ? TRUE : FALSE)

Definition at line 44 of file stk_526.h.

#define Is_joy_not_left | ( |  | ) | (((PINB&0x10) == 0) ? FALSE : TRUE)

Definition at line 45 of file stk_526.h.

#define Is_button_left | ( |  | ) | Is_joy_left()

Definition at line 46 of file stk_526.h.

#define Is_button_not_left | ( |  | ) | Is_joy_not_left()

Definition at line 47 of file stk_526.h.

#define Is_joy_middle | ( |  | ) | (((PINB&0x01) == 0) ? TRUE : FALSE)

Definition at line 49 of file stk_526.h.

#define Is_joy_not_middle | ( |  | ) | (((PINB&0x01) == 0) ? FALSE : TRUE)

Definition at line 50 of file stk_526.h.

#define Is_joy_select | ( |  | ) | Is_joy_middle()

Definition at line 51 of file stk_526.h.

#define Is_joy_not_select | ( |  | ) | Is_joy_not_middle()

Definition at line 52 of file stk_526.h.

#define Is_button_middle | ( |  | ) | Is_joy_middle()

Definition at line 53 of file stk_526.h.

#define Is_button_not_middle | ( |  | ) | Is_joy_not_middle()

Definition at line 54 of file stk_526.h.

#define Is_joy_right | ( |  | ) | (((PINB&0x40) == 0) ? TRUE : FALSE)

Definition at line 56 of file stk_526.h.

#define Is_joy_not_right | ( |  | ) | (((PINB&0x40) == 0) ? FALSE : TRUE)

Definition at line 57 of file stk_526.h.

#define Is_button_right | ( |  | ) | Is_joy_right()

Definition at line 58 of file stk_526.h.

#define Is_button_not_right | ( |  | ) | Is_joy_not_right()

Definition at line 59 of file stk_526.h.

#define Is_joy_down | ( |  | ) | (((PINB&0x80) == 0) ? TRUE : FALSE)

Definition at line 61 of file stk_526.h.

#define Is_joy_not_down | ( |  | ) | (((PINB&0x80) == 0) ? FALSE : TRUE)

Definition at line 62 of file stk_526.h.

#define Is_button_down | ( |  | ) | Is_joy_down()

Definition at line 63 of file stk_526.h.

#define Is_button_not_down | ( |  | ) | Is_joy_not_down()

Definition at line 64 of file stk_526.h.

#define Is_joy_up | ( |  | ) | (((PINB&0x20) == 0) ? TRUE : FALSE)

Definition at line 66 of file stk_526.h.

#define Is_joy_not_up | ( |  | ) | (((PINB&0x20) == 0) ? FALSE : TRUE)

Definition at line 67 of file stk_526.h.

#define Is_button_up | ( |  | ) | Is_joy_up()

Definition at line 68 of file stk_526.h.

#define Is_button_not_up | ( |  | ) | Is_joy_not_up()

Definition at line 69 of file stk_526.h.

#define Hwb_button_init | ( |  | ) | (DDRD &= ~0x80)

Definition at line 72 of file stk_526.h.

Referenced by mouse_task_init().

#define Is_hwb | ( |  | ) | (((PIND&0x80) == 0) ? TRUE : FALSE)

Definition at line 73 of file stk_526.h.

#define DF_8_MB

Macros to init the environnement for DF on Philips Wired mouse board.

Definition at line 79 of file stk_526.h.

#define DF_SELECT_MEM 0

Definition at line 82 of file stk_526.h.

Referenced by df_chipselect_current().

#define DF_UNSELECT_MEM 1

Definition at line 83 of file stk_526.h.

#define DF_NB_MEM 1

Definition at line 84 of file stk_526.h.

Referenced by df_mem_check().

#define Init_df_stk526 | ( |  | ) | (DDRC_Bit2=1,PORTC_Bit2=1,DDRB_Bit0=1)

Definition at line 95 of file stk_526.h.

#define DF_CS_PIN PORTC_Bit2

Definition at line 96 of file stk_526.h.

#define DF_CS0 DF_CS_PIN

Definition at line 97 of file stk_526.h.

Referenced by df_chipselect_current().

#define DF_CS1 DF_CS0

Definition at line 98 of file stk_526.h.

Referenced by df_chipselect_current().

#define DF_CS2 DF_CS0

Definition at line 99 of file stk_526.h.

Referenced by df_chipselect_current().

#define DF_CS3 DF_CS0

Definition at line 100 of file stk_526.h.

Referenced by df_chipselect_current().

#define Df_select_df | ( | i,
|  | val |  | ) | (DF_CS##i = val)

Definition at line 101 of file stk_526.h.

Referenced by df_chipselect_current().

#define Df_desel_all | ( |  | ) | (DF_CS0=DF_UNSELECT_MEM)

Definition at line 102 of file stk_526.h.

Referenced by df_chipselect_current(), df_mem_check(), df_read_close(), df_read_sector(), df_wait_busy(), df_write_close(), df_write_open(), and df_write_sector().

#define df_init_spi | ( |  | ) | Init_df_stk526()

Definition at line 112 of file stk_526.h.

Referenced by storage_task_init().