2 * Copyright (C) 2007 Anton Blad
3 * Copyright (C) 2007 Fredrik Kuivinen
4 * Copyright (C) 2007 Jakob Rosén
6 * This file is licensed under GPL v2.
14 #define MOTOR_TIMEOUT_MASK 0x07ff
15 #define MOTOR_STATUS_MASK 0x8000
16 #define MOTOR_TRANSITION_MASK 0x4000
18 extern uint16_t motor_status
;
19 extern uint16_t motor_latency_ms
;
21 static inline void motor_init() { }
23 static inline uint8_t motor_ison()
25 return (motor_status
& MOTOR_STATUS_MASK
) != 0;
28 static inline uint8_t motor_isoff()
30 return (motor_status
& MOTOR_STATUS_MASK
) == 0;
33 static inline uint16_t motor_latency()
35 return motor_latency_ms
;
38 static inline void motor_setlatency(uint16_t t
)