Stefan Schuermans authored 12 years ago
1) #include "switches.h" 2) 3) static volatile unsigned int *const switches_ptr = 4) (volatile unsigned int *)0x80000200; 5) 6) /** 7) * @brief get state of switch 8) * @param[in] sw swich identifier 9) * @return switch state 10) */ 11) int switches_get_state(t_switch sw) 12) { 13) return switches_ptr[0] >> sw & 1; 14) } 15)