Rev 220 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
220 | chrv | 1 | #include <avr/io.h> |
2 | |||
3 | #include "pins.h" |
||
4 | #include "mytypes.h" |
||
5 | |||
6 | #include "main.h" |
||
7 | #include "zx.h" |
||
8 | #include "tape.h" |
||
9 | |||
10 | void tape_task(void) |
||
11 | { |
||
12 | UBYTE temp = ( TAPEIN_PIN & (1<<TAPEIN) )? FLAG_LAST_TAPE_VALUE:0; |
||
13 | if ( (flags_register&FLAG_LAST_TAPE_VALUE)^temp ) |
||
14 | { |
||
15 | zx_set_config( (temp)?SPI_TAPE_FLAG:0 ); |
||
16 | if ( temp ) |
||
17 | { |
||
18 | flags_register |= FLAG_LAST_TAPE_VALUE; |
||
19 | } |
||
20 | else |
||
21 | { |
||
22 | flags_register &= ~FLAG_LAST_TAPE_VALUE; |
||
23 | } |
||
24 | } |
||
25 | } |