1 | int min_stell(void) |
2 | {
|
3 | int temp; |
4 | if (flags.wecker_stellen==1) //wecker wird gestellt |
5 | {
|
6 | temp=w_min; |
7 | }
|
8 | else //uhrzeit... |
9 | {
|
10 | temp=min; |
11 | }
|
12 | _delay_ms(100); |
13 | |
14 | if (bit_is_set(PINC,0)) |
15 | {
|
16 | temp++; |
17 | if (temp==60) |
18 | {
|
19 | temp=0; |
20 | }
|
21 | }
|
22 | loop_until_bit_is_clear(PINC,0); |
23 | _delay_ms(100); |
24 | |
25 | if (flags.wecker_stellen==1) //wecker wird gestellt |
26 | {
|
27 | w_min=temp; |
28 | }
|
29 | else //uhrzeit... |
30 | {
|
31 | min=temp; |
32 | }
|
33 | }
|