c2b040193a777c09bdc595c95492b57a2521db87
Stefan Schuermans added file headers

Stefan Schuermans authored 12 years ago

1) /* MIPS I system
2)  * Copyright 2011-2012 Stefan Schuermans <stefan@schuermans.info>
3)  * Copyleft GNU public license V2 or later
4)  *          http://www.gnu.org/copyleft/gpl.html
5)  */
6) 
Stefan Schuermans implemented switches

Stefan Schuermans authored 12 years ago

7) #include "switches.h"
8) 
9) static volatile unsigned int *const switches_ptr =
10)   (volatile unsigned int *)0x80000200;
11) 
12) /**
13)  * @brief get state of switch
14)  * @param[in] sw swich identifier
15)  * @return switch state
16)  */
17) int switches_get_state(t_switch sw)
18) {
19)   return switches_ptr[0] >> sw & 1;
20) }
21)