Defines | |
| #define | Switches_init() (DDRB &= ~0xFF, PORTB |= 0xFF) |
| #define | Is_switch_7() ((PINB & (1<<PINB7)) ? FALSE : TRUE) |
| #define | Is_switch_6() ((PINB & (1<<PINB6)) ? FALSE : TRUE) |
| #define | Is_switch_5() ((PINB & (1<<PINB5)) ? FALSE : TRUE) |
| #define | Is_switch_4() ((PINB & (1<<PINB4)) ? FALSE : TRUE) |
| #define | Is_switch_3() ((PINB & (1<<PINB3)) ? FALSE : TRUE) |
| #define | Is_switch_2() ((PINB & (1<<PINB2)) ? FALSE : TRUE) |
| #define | Is_switch_1() ((PINB & (1<<PINB1)) ? FALSE : TRUE) |
| #define | Is_switch_0() ((PINB & (1<<PINB0)) ? FALSE : TRUE) |
| #define | Is_not_switch_7() ((PINB & (1<<PINB7)) ? TRUE : FALSE) |
| #define | Is_not_switch_6() ((PINB & (1<<PINB6)) ? TRUE : FALSE) |
| #define | Is_not_switch_5() ((PINB & (1<<PINB5)) ? TRUE : FALSE) |
| #define | Is_not_switch_4() ((PINB & (1<<PINB4)) ? TRUE : FALSE) |
| #define | Is_not_switch_3() ((PINB & (1<<PINB3)) ? TRUE : FALSE) |
| #define | Is_not_switch_2() ((PINB & (1<<PINB2)) ? TRUE : FALSE) |
| #define | Is_not_switch_1() ((PINB & (1<<PINB1)) ? TRUE : FALSE) |
| #define | Is_not_switch_0() ((PINB & (1<<PINB0)) ? TRUE : FALSE) |
| #define | Switches_enable_it() |
Enable interrupts for switches (PINB0 to PINB7)
| |
| #define | Switches_disable_it() |
Disable interrupts for switches (PINB0 to PINB7)
| |
| #define Switches_init | ( | ) | (DDRB &= ~0xFF, PORTB |= 0xFF) |
| #define Is_switch_7 | ( | ) | ((PINB & (1<<PINB7)) ? FALSE : TRUE) |
| #define Is_switch_6 | ( | ) | ((PINB & (1<<PINB6)) ? FALSE : TRUE) |
| #define Is_switch_5 | ( | ) | ((PINB & (1<<PINB5)) ? FALSE : TRUE) |
| #define Is_switch_4 | ( | ) | ((PINB & (1<<PINB4)) ? FALSE : TRUE) |
| #define Is_switch_3 | ( | ) | ((PINB & (1<<PINB3)) ? FALSE : TRUE) |
| #define Is_switch_2 | ( | ) | ((PINB & (1<<PINB2)) ? FALSE : TRUE) |
| #define Is_switch_1 | ( | ) | ((PINB & (1<<PINB1)) ? FALSE : TRUE) |
| #define Is_switch_0 | ( | ) | ((PINB & (1<<PINB0)) ? FALSE : TRUE) |
| #define Is_not_switch_7 | ( | ) | ((PINB & (1<<PINB7)) ? TRUE : FALSE) |
| #define Is_not_switch_6 | ( | ) | ((PINB & (1<<PINB6)) ? TRUE : FALSE) |
| #define Is_not_switch_5 | ( | ) | ((PINB & (1<<PINB5)) ? TRUE : FALSE) |
| #define Is_not_switch_4 | ( | ) | ((PINB & (1<<PINB4)) ? TRUE : FALSE) |
| #define Is_not_switch_3 | ( | ) | ((PINB & (1<<PINB3)) ? TRUE : FALSE) |
| #define Is_not_switch_2 | ( | ) | ((PINB & (1<<PINB2)) ? TRUE : FALSE) |
| #define Is_not_switch_1 | ( | ) | ((PINB & (1<<PINB1)) ? TRUE : FALSE) |
| #define Is_not_switch_0 | ( | ) | ((PINB & (1<<PINB0)) ? TRUE : FALSE) |
| #define Switches_enable_it | ( | ) |
Value:
{ \
PCMSK0 |= (1<<PCINT0)|(1<<PCINT1)|(1<<PCINT2)|(1<<PCINT3)|(1<<PCINT4)|(1<<PCINT5)|(1<<PCINT6)|(1<<PCINT7);\
PCIFR |= (1<<PCIF0); \
PCICR |= (1<<PCIE0);}
Definition at line 121 of file stk_600.h.
Referenced by suspend_action().
| #define Switches_disable_it | ( | ) |
Value:
{ \
PCICR &= ~(1<<PCIE0); \
PCIFR |= (1<<PCIF0); \
PCMSK0 &= ~((1<<PCINT0)|(1<<PCINT1)|(1<<PCINT2)|(1<<PCINT3)|(1<<PCINT4)|(1<<PCINT5)|(1<<PCINT6)|(1<<PCINT7));}
Definition at line 130 of file stk_600.h.
Referenced by switch_event_int().
1.5.3