Files
cdba/cdba.h
Bjorn Andersson d094208e7c cdba: Add support for listing boards
Add a new argument '-l' which in combination with '-h' will connect to
said server and list the attached devices, then exit.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-06-28 23:47:56 -07:00

35 lines
536 B
C

#ifndef __CDBA_H__
#define __CDBA_H__
#include <stdint.h>
#define __packed __attribute__((packed))
#define MIN(x, y) ((x) < (y) ? (x) : (y))
#define MAX(x, y) ((x) > (y) ? (x) : (y))
struct msg {
uint8_t type;
uint16_t len;
uint8_t data[];
} __packed;
enum {
MSG_SELECT_BOARD = 1,
MSG_CONSOLE,
MSG_HARDRESET,
MSG_POWER_ON,
MSG_POWER_OFF,
MSG_FASTBOOT_PRESENT,
MSG_FASTBOOT_DOWNLOAD,
MSG_FASTBOOT_BOOT,
MSG_STATUS_UPDATE,
MSG_VBUS_ON,
MSG_VBUS_OFF,
MSG_FASTBOOT_REBOOT,
MSG_SEND_BREAK,
MSG_LIST_DEVICES,
};
#endif