blob: f8b1c268bade3b0dca67a2d16eb477ba0c0d623f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/*
* floppy.h
*
* Created: 29.04.2017 17:06:28
* Author: Jonas
*/
#ifndef FLOPPY_H_
#define FLOPPY_H_
#ifndef F_CPU
#define F_CPU 16000000UL
#endif
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
uint8_t timer_overflow_counter;
uint8_t floppy_frequencies[8];
uint8_t floppy_nextrun[8];
uint8_t floppy_head_return_counter[8];
char *fPORT, *fDDR, *dPORT, *dDDR; //Ports for floppy and Direction of Heads
void floppy_setup(char *_pulse_port, char *_pulse_ddr, char *_direction_port, char *_direction_ddr);
void floppy_set_frequency(uint8_t _floppy_id, uint8_t _freq);
void floppy_pulse(uint8_t _floppy_id);
int floppy_calc_freq(uint32_t _f_hz);
#endif /* FLOPPY_H_ */
|