kh_hand_t (int) enum { KH_CMD_OK=0, KH_CMD_ERR=1 } kh_res_t; /* réponses */ { kh_res_t res; ...; } : union ? /* open/close */ kh_hand_t kh_open(char *dev, int speed); kh_close(kh_hand_t hand); /* Ops */ char* kh_raw(kh_hand_t hand, char *cmd); => Vérifier qu'on a bien la lettre en minuscule : signifie que l'action est ok. => Timeout sur le read => Autres codes liés à read() / write() (sans ret) : <= kh_res_t ? A (configure) C (reach pos) D (set speed) F (config PID controller) G (set position counter) J (speed profile controller) L (Led state) P (set PWM) W (write byte on ext bus) (avec ret) : <= (kh_res_t, ...) B (read soft ver) : 2 | Struct ver E (read speed) : 2 | Struct Motors (commun?) H (read pos) : 2 | Struct Motors (commun?) I (Read A/D input) : 1 | 10 bits K (read motion contr) : 6 | Struct motion ctrl N (read prox sensors) : 8 | Struct Sensors (commun) O (read amb light sensors) : 8 | Struct Sensors (commun) R (read byte on ext bus) : 1 | byte T (send mes on ext turret) : 1