}
motor_shift_send(1 << (row-1)); /* rows from 1..8 here */
bclr((void*)&_io_ports[M6811_PORTA], PORTA_MOTOR_CLOCK);
}
motor_shift_send(1 << (row-1)); /* rows from 1..8 here */
bclr((void*)&_io_ports[M6811_PORTA], PORTA_MOTOR_CLOCK);
bset((void*)&_io_ports[M6811_PORTA], PORTA_MOTOR_COL_DISABLE);
bclr_misc_output(A3800_MOTOR_COL8_ENABLE | A3800_MOTOR_COL9_ENABLE);
}
bool motor_here(u8 slot) {
u8 i, c = 0;
bset((void*)&_io_ports[M6811_PORTA], PORTA_MOTOR_COL_DISABLE);
bclr_misc_output(A3800_MOTOR_COL8_ENABLE | A3800_MOTOR_COL9_ENABLE);
}
bool motor_here(u8 slot) {
u8 i, c = 0;
- //if (!is_motor(slot)) return MOTOR_NOSLOT;
-
- motor_on(slot);
- delay(1000);
- motors_off();
- return MOTOR_SUCCESS;
-
- if (!left_home(slot)) {
- motors_off();
- return MOTOR_HOME_FAIL;
- }
+ if (!is_motor(slot)) return MOTOR_NOSLOT;
+ if (!start_motor(slot)) return MOTOR_HOME_FAIL;
+ delay(100);