902aa402b3830b9c9aa26758390b6eb93b42a0f5
Stefan Schuermans added file headers

Stefan Schuermans authored 12 years ago

1) /* MIPS I system
Stefan Schuermans replace email address in he...

Stefan Schuermans authored 12 years ago

2)  * Copyright 2011-2012 Stefan Schuermans <stefan@blinkenarea.org>
Stefan Schuermans added file headers

Stefan Schuermans authored 12 years ago

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)