mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
d/opengloves: Communication api change
This commit is contained in:
parent
0bed585018
commit
74f14f2414
|
@ -41,7 +41,7 @@ opengloves_bt_read(struct opengloves_communication_device *ocdev, char *data, si
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
opengloves_bt_write(struct opengloves_communication_device *ocdev, const uint8_t *data, size_t length)
|
opengloves_bt_write(struct opengloves_communication_device *ocdev, const char *data, size_t length)
|
||||||
{
|
{
|
||||||
struct opengloves_bt_device *obdev = (struct opengloves_bt_device *)ocdev;
|
struct opengloves_bt_device *obdev = (struct opengloves_bt_device *)ocdev;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ struct opengloves_communication_device
|
||||||
{
|
{
|
||||||
int (*read)(struct opengloves_communication_device *comm_dev, char *data, size_t size);
|
int (*read)(struct opengloves_communication_device *comm_dev, char *data, size_t size);
|
||||||
|
|
||||||
int (*write)(struct opengloves_communication_device *comm_dev, const uint8_t *data, size_t size);
|
int (*write)(struct opengloves_communication_device *comm_dev, const char *data, size_t size);
|
||||||
|
|
||||||
void (*destroy)(struct opengloves_communication_device *comm_dev);
|
void (*destroy)(struct opengloves_communication_device *comm_dev);
|
||||||
};
|
};
|
||||||
|
@ -38,9 +38,7 @@ opengloves_communication_device_read(struct opengloves_communication_device *com
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
opengloves_communication_device_write(struct opengloves_communication_device *comm_dev,
|
opengloves_communication_device_write(struct opengloves_communication_device *comm_dev, const char *data, size_t size)
|
||||||
const uint8_t *data,
|
|
||||||
size_t size)
|
|
||||||
{
|
{
|
||||||
return comm_dev->write(comm_dev, data, size);
|
return comm_dev->write(comm_dev, data, size);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ opengloves_serial_read(struct opengloves_communication_device *ocdev, char *data
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
opengloves_serial_write(struct opengloves_communication_device *ocdev, const uint8_t *data, size_t length)
|
opengloves_serial_write(struct opengloves_communication_device *ocdev, const char *data, size_t length)
|
||||||
{
|
{
|
||||||
struct opengloves_serial_device *osdev = (struct opengloves_serial_device *)ocdev;
|
struct opengloves_serial_device *osdev = (struct opengloves_serial_device *)ocdev;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue