160,13 → 160,13 |
barrier(); |
if (!timer_expired) { |
#ifdef SERVO_DEBUG |
kern_printf("(SERVO WRITE p = %d b = %02X)",port,b); |
kern_printf("(SERVO WRITE p = %d b = %02x)",port,b); |
#endif |
com_write(port,THR,b); |
return 0; |
} else { |
#ifdef SERVO_DEBUG |
kern_printf("(SERVO TIMEOUT)"); |
kern_printf("(WRITE TIMEOUT)"); |
#endif |
return -1; |
} |
181,12 → 181,12 |
if (!timer_expired) { |
b = (int)(com_read(port,RBR)); |
#ifdef SERVO_DEBUG |
kern_printf("(SERVO READ p = %d b = %02X)",port,b); |
kern_printf("(SERVO READ p = %d b = %02x)",port,b); |
#endif |
return b; |
} else { |
#ifdef SERVO_DEBUG |
kern_printf("(SERVO TIMEOUT)"); |
kern_printf("(READ TIMEOUT)"); |
#endif |
return -1; |
} |
215,6 → 215,7 |
com_write(port,MCR,0x0C); |
|
return 0; |
|
} |
|
int com_close(unsigned port) |