mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-05 11:13:09 +02:00
688df9771d
- lib/driver.h: rename "struct atspi_driver" to "struct atrf_driver" - lib/atrf.c, lib/atusb.c, lib/atusd.c: track above change
37 lines
938 B
C
37 lines
938 B
C
/*
|
|
* lib/driver.h - ATRF driver API
|
|
*
|
|
* Written 2010 by Werner Almesberger
|
|
* Copyright 2010 Werner Almesberger
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*/
|
|
|
|
|
|
#ifndef DRIVER_H
|
|
#define DRIVER_H
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
struct atrf_driver {
|
|
const char *name;
|
|
void *(*open)(void);
|
|
void (*close)(void *dsc);
|
|
int (*error)(void *dsc);
|
|
int (*clear_error)(void *dsc);
|
|
void (*reset)(void *dsc);
|
|
void (*reset_rf)(void *dsc);
|
|
void (*test_mode)(void *dsc);
|
|
void (*reg_write)(void *dsc, uint8_t reg, uint8_t value);
|
|
uint8_t (*reg_read)(void *dsc, uint8_t reg);
|
|
void (*buf_write)(void *dsc, const void *buf, int size);
|
|
int (*buf_read)(void *dsc, void *buf, int size);
|
|
int (*interrupt)(void *dsc);
|
|
};
|
|
|
|
#endif /* !DRIVER_H */
|