123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- #define CMD_GET_INFO 0
- #define CMD_SEEK 1
- #define CMD_SIDE 2
- #define CMD_SET_PARAMS 3
- #define CMD_GET_PARAMS 4
- #define CMD_MOTOR 5
- #define CMD_READ_FLUX 6
- #define CMD_WRITE_FLUX 7
- #define CMD_GET_FLUX_STATUS 8
- #define CMD_GET_INDEX_TIMES 9
- #define CMD_SELECT 10
- #define CMD_UPDATE 1
- #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 BAUD_NORMAL 9600
- #define BAUD_CLEAR_COMMS 10000
- struct packed gw_info {
- uint8_t fw_major;
- uint8_t fw_minor;
- uint8_t max_index;
- uint8_t max_cmd;
- uint32_t sample_freq;
- };
- struct packed gw_read_flux {
- uint8_t nr_idx;
- };
- struct packed gw_write_flux {
- uint32_t index_delay_ticks;
- uint8_t terminate_at_index;
- };
- #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;
- };
|