Files
cdba/cdba.h
Bjorn Andersson 4cabc1c827 Support device "description"
Add a new keyword "description" to the config file, add the necessary
wire protocol to acquire this string for a given device and introduce
the "-i" option to cdba to trigger its retrieval.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-06-29 01:02:57 -07:00

36 lines
553 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,
MSG_BOARD_INFO,
};
#endif