Files
cdba/cdb_assist.h
Bjorn Andersson c43466a98f device: Invoke device->close on exit
Allow the control device to implement things such as flushing the
command buffer as part of the close operation. This used to be done to
ensure that any lingering power/usb off requests really where sent to
the device as we closed the control tty.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2021-01-25 18:48:04 -06:00

24 lines
701 B
C

#ifndef __CDB_ASSIST_H__
#define __CDB_ASSIST_H__
#include <stdbool.h>
#include "device.h"
struct cdb_assist;
void *cdb_assist_open(struct device *dev);
void cdb_assist_close(struct device *dev);
int cdb_assist_power(struct device *dev, bool on);
void cdb_assist_usb(struct device *dev, bool on);
void cdb_assist_key(struct device *dev, int key, bool asserted);
void cdb_gpio(struct cdb_assist *cdb, int gpio, bool on);
int cdb_target_write(struct device *dev, const void *buf, size_t len);
void cdb_send_break(struct device *dev);
unsigned int cdb_vref(struct cdb_assist *cdb);
void cdb_assist_print_status(struct device *dev);
void cdb_set_voltage(struct cdb_assist *cdb, unsigned mV);
#endif