BlinkenArea - GitList
Repositories
Blog
Wiki
mips_sys
Code
Commits
Branches
Tags
Search
Tree:
4e6cf8e
Branches
Tags
master
mips_sys
fw
switches.c
implemented displaying rotary counter (octal)
Stefan Schuermans
commited
4e6cf8e
at 2012-02-12 21:51:32
switches.c
Blame
History
Raw
#include "switches.h" static volatile unsigned int *const switches_ptr = (volatile unsigned int *)0x80000200; /** * @brief get state of switch * @param[in] sw swich identifier * @return switch state */ int switches_get_state(t_switch sw) { return switches_ptr[0] >> sw & 1; } /** * @brief get rotation counter of rotary switch * @return rotation counter */ unsigned int switches_get_rot_cnt(void) { return switches_ptr[1]; }