summaryrefslogtreecommitdiff
path: root/floppyMusic/floppy.c
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2017-06-16 00:22:47 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2017-06-16 00:22:47 +0200
commitf9357256249657af2374e3c334b9180e63dc5a30 (patch)
tree32b4b0990d77467a17eb77a52186060460b82fdd /floppyMusic/floppy.c
parenta5ae30562fc5adbabaf46763b8826ac4d843c26e (diff)
downloadavrFloppy-f9357256249657af2374e3c334b9180e63dc5a30.tar.gz
Split in different files
Diffstat (limited to 'floppyMusic/floppy.c')
-rw-r--r--floppyMusic/floppy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/floppyMusic/floppy.c b/floppyMusic/floppy.c
index 9d6bd54..6a12af6 100644
--- a/floppyMusic/floppy.c
+++ b/floppyMusic/floppy.c
@@ -13,7 +13,7 @@ ISR(TIMER0_OVF_vect)
timer_overflow_counter ++;
- *fPORT = 0xff;
+ *fPORT = 0xff; //Deactivate all previously activated pins
for(uint8_t i = 0; i < 8; i++)
{
@@ -35,6 +35,7 @@ void floppy_setup(char *_pulse_port, char *_pulse_ddr, char *_direction_port, ch
dPORT = _direction_port;
dDDR = _direction_ddr;
+ //Floppy inputs are active low so they are initialized high
*fDDR = 0xff;
*fPORT = 0xff;
*dDDR = 0xff;
@@ -51,14 +52,13 @@ void floppy_setup(char *_pulse_port, char *_pulse_ddr, char *_direction_port, ch
}
//Return all FDDs to track 0
-
for(uint8_t i = 0; i < 200; i++)
{
_delay_ms(5);
*fPORT ^= 0xff;
}
- *dPORT = 0x00;
+ *dPORT = 0x00; //Head needs to be reversed
*fPORT = 0xff;
//Setup Timer