returns true if it looks like a drive is attached */
| 237 | |
| 238 | /* returns true if it looks like a drive is attached */ |
| 239 | static bool home(void) |
| 240 | { |
| 241 | for (int i=0; i<100; i++) |
| 242 | { |
| 243 | /* Don't keep stepping forever, because if a drive's |
| 244 | * not connected bad things happen. */ |
| 245 | if (TRACK0_REG_Read()) |
| 246 | return true; |
| 247 | step(STEP_TOWARDS0); |
| 248 | } |
| 249 | |
| 250 | return false; |
| 251 | } |
| 252 | |
| 253 | static void seek_to(int track) |
| 254 | { |
no test coverage detected