Root/tools/lib/driver.h

Source at commit e2b2df2e315c6b0338aed53dffd1dce9cae8196e created 9 years 9 days ago.
By Werner Almesberger, Made the libatspi API driver-agnostic.
1/*
2 * lib/driver.h - ATSPI driver API
3 *
4 * Written 2010 by Werner Almesberger
5 * Copyright 2010 Werner Almesberger
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13
14#ifndef DRIVER_H
15#define DRIVER_H
16
17#include <stdint.h>
18
19
20struct atspi_driver {
21    const char *name;
22    void *(*open)(void);
23    void (*close)(void *dsc);
24    void (*reset)(void *dsc);
25    void (*reset_rf)(void *dsc);
26    void (*reg_write)(void *dsc, uint8_t reg, uint8_t value);
27    uint8_t (*reg_read)(void *dsc, uint8_t reg);
28    void (*buf_write)(void *dsc, const void *buf, int size);
29    int (*buf_read)(void *dsc, void *buf, int size);
30};
31
32#endif /* !DRIVER_H */
33

Archive Download this file



interactive