Root/tools/lib/atusb-common.h

Source at commit 1f003f1c2100f7f3670106fd13df0eaec7a0e4e1 created 4 years 2 months ago.
By Werner Almesberger, atusb/atusb.kicad_pcb: grow RF feed trace to 1.9 mm, for 1.0 mm PCB
1/*
2 * lib/atusb-common.h - ATUSB access functions shared by all ATUSB drivers
3 *
4 * Written 2010-2011, 2013 by Werner Almesberger
5 * Copyright 2010-2011, 2013 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 ATUSB_COMMON_H
15#define ATUSB_COMMON_H
16
17
18#define FROM_DEV ATUSB_FROM_DEV(0)
19#define TO_DEV ATUSB_TO_DEV(0)
20
21
22struct atusb_dsc {
23    usb_dev_handle *dev;
24    int error;
25};
26
27
28int atusb_error(void *handle);
29int atusb_clear_error(void *handle);
30void *atusb_open(const char *arg);
31void atusb_close(void *handle);
32void atusb_reset(void *handle);
33void atusb_reset_rf(void *handle);
34void atusb_test_mode(void *handle);
35void atusb_slp_tr(void *handle, int on, int pulse);
36int atusb_interrupt_wait(void *handle, int timeout_ms);
37void atusb_rx_mode(void *handle, int on);
38int atusb_rx(void *handle, void *buf, int size, int timeout_ms, uint8_t *lqi);
39void atusb_tx(void *handle, const void *buf, int size);
40
41int atusb_set_clkm(void *handle, int mhz);
42
43#endif /* !ATUSB_COMMON_H */
44

Archive Download this file



interactive