1 1.1 brad /* $NetBSD: responses.h,v 1.1 2021/12/07 17:39:55 brad Exp $ */ 2 1.1 brad 3 1.1 brad /* 4 1.1 brad * Copyright (c) 2021 Brad Spencer <brad (at) anduin.eldar.org> 5 1.1 brad * 6 1.1 brad * Permission to use, copy, modify, and distribute this software for any 7 1.1 brad * purpose with or without fee is hereby granted, provided that the above 8 1.1 brad * copyright notice and this permission notice appear in all copies. 9 1.1 brad * 10 1.1 brad * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 1.1 brad * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 1.1 brad * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 1.1 brad * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 1.1 brad * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 1.1 brad * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 1.1 brad * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 1.1 brad */ 18 1.1 brad 19 1.1 brad #include <stdint.h> 20 1.1 brad 21 1.1 brad #ifndef _RESPONSES_H_ 22 1.1 brad #define _RESPONSES_H_ 23 1.1 brad 24 1.1 brad struct scmd_identify_response { 25 1.1 brad uint8_t fwversion; 26 1.1 brad uint8_t id; 27 1.1 brad uint8_t slv_i2c_address; 28 1.1 brad uint8_t config_bits; 29 1.1 brad }; 30 1.1 brad 31 1.1 brad struct scmd_diag_response { 32 1.1 brad uint8_t diags[14]; 33 1.1 brad }; 34 1.1 brad 35 1.1 brad struct scmd_motor_response { 36 1.1 brad uint8_t driver; 37 1.1 brad int motorlevels[34]; 38 1.1 brad bool invert[34]; 39 1.1 brad bool bridge[17]; 40 1.1 brad }; 41 1.1 brad 42 1.1 brad #endif /* _RESPONSES_H_ */ 43