OSDN Git Service
(root)
/
kozos-expbrd
/
kozos_expbrd.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
ce6993787cd5b0045afc5f29d3bd89ba654d065c
[kozos-expbrd/kozos_expbrd.git]
/
firm
/
sample
/
simple_mp3_player
/
os
/
sw.c
1
2
#include "sw.h"
3
#include "portconf.h"
4
5
int sw_init(void)
6
{
7
return 0;
8
}
9
10
uint8 sw_read(sw_target_t target)
11
{
12
uint8 c = 0;
13
switch (target) {
14
case Sw1:
15
c = (*PORTCONF_P7DR & PORTCONF_P7BIT_SW1) ? 0 : 1;
16
break;
17
case Sw2:
18
c = (*PORTCONF_P7DR & PORTCONF_P7BIT_SW2) ? 0 : 1;
19
break;
20
case SwRe:
21
c = (*PORTCONF_PADR & PORTCONF_PABIT_SWRE) ? 0 : 1;
22
break;
23
}
24
return c;
25
}
26