Subversion Repositories pentevo

Rev

Rev 220 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed | ?url?

  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. }
  26.