123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 |
- #define CMD_GET_INFO 0
- #define CMD_UPDATE 1
- #define CMD_SEEK 2
- #define CMD_HEAD 3
- #define CMD_SET_PARAMS 4
- #define CMD_GET_PARAMS 5
- #define CMD_MOTOR 6
- #define CMD_READ_FLUX 7
- #define CMD_WRITE_FLUX 8
- #define CMD_GET_FLUX_STATUS 9
- #define CMD_SWITCH_FW_MODE 11
- #define CMD_SELECT 12
- #define CMD_DESELECT 13
- #define CMD_SET_BUS_TYPE 14
- #define CMD_SET_PIN 15
- #define CMD_RESET 16
- #define CMD_ERASE_FLUX 17
- #define CMD_SOURCE_BYTES 18
- #define CMD_SINK_BYTES 19
- #define CMD_MAX 19
- #define BUS_NONE 0
- #define BUS_IBMPC 1
- #define BUS_SHUGART 2
- #define ACK_OKAY 0
- #define ACK_BAD_COMMAND 1
- #define ACK_NO_INDEX 2
- #define ACK_NO_TRK0 3
- #define ACK_FLUX_OVERFLOW 4
- #define ACK_FLUX_UNDERFLOW 5
- #define ACK_WRPROT 6
- #define ACK_NO_UNIT 7
- #define ACK_NO_BUS 8
- #define ACK_BAD_UNIT 9
- #define ACK_BAD_PIN 10
- #define ACK_BAD_CYLINDER 11
- #define BAUD_NORMAL 9600
- #define BAUD_CLEAR_COMMS 10000
- #define FLUXOP_INDEX 1
- #define FLUXOP_SPACE 2
- #define FLUXOP_ASTABLE 3
- #define GETINFO_FIRMWARE 0
- struct packed gw_info {
- uint8_t fw_major;
- uint8_t fw_minor;
- uint8_t is_main_firmware;
- uint8_t max_cmd;
- uint32_t sample_freq;
- uint8_t hw_model, hw_submodel;
- uint8_t usb_speed;
- };
- extern struct gw_info gw_info;
- #define GETINFO_BW_STATS 1
- struct packed gw_bw_stats {
- struct packed {
- uint32_t bytes;
- uint32_t usecs;
- } min_bw, max_bw;
- };
- struct packed gw_read_flux {
-
- uint32_t ticks;
-
- uint16_t max_index;
- };
- struct packed gw_write_flux {
-
- uint8_t cue_at_index;
-
- uint8_t terminate_at_index;
- };
- struct packed gw_erase_flux {
- uint32_t ticks;
- };
- struct packed gw_sink_source_bytes {
- uint32_t nr_bytes;
- };
- #define PARAMS_DELAYS 0
- struct packed gw_delay {
- uint16_t select_delay;
- uint16_t step_delay;
- uint16_t seek_settle;
- uint16_t motor_delay;
- uint16_t auto_off;
- };
- #define FW_MODE_BOOTLOADER 0
- #define FW_MODE_NORMAL 1
|