a18e4b2e6b13bd4d55c04a62301f4e43f8f3197d
[uccvend-snackrom.git] / ROM2 / motors.h
1 #ifndef _MOTORS_H_
2 #define _MOTORS_H_
3
4 #include "vend.h"
5
6 /* error codes for dispense_motor */
7 #define MOTOR_SUCCESS   0
8 #define MOTOR_NOSLOT    1
9 #define MOTOR_HOME_FAIL 2
10 #define MOTOR_CURRENT_FAIL 3
11 #define MOTOR_VOLTAGE_FAIL 4
12
13 const u8 motor_lookup[80] =
14 { 1,12,23,34,46,57,68,79,
15  11,22,33,44,56,67,78,89,
16  21,32,43,54,66,77,88,99,
17  31,42,53,64,76,87,98,
18   9,41,52,63,74,86,97,
19   8,19,51,62,73,84,96,
20   7,18,29,61,72,83,94,
21   6,17,28,39,71,82,93,
22   4,16,27,38,49,81,92,
23   3,14,26,37,48,59,91,
24   2,13,24,36,47,58,69,
25 };
26
27 bool is_motor(u8 slot);
28 u8 dispense_motor(u8 slot);
29
30 #endif /* _MOTORS_H_ */

UCC git Repository :: git.ucc.asn.au