IEEE 802.15.4 subsystem
Sign in or create your account | Project List | Help
IEEE 802.15.4 subsystem Git Source Tree
Root/
| Source at commit 624caeb00652f6118dc64698b7dad6fa3e5bdcc2 created 6 years 9 months ago. By Werner Almesberger, atusb/: use VR, POWERED, and LED from kicad-libs | |
|---|---|
| 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 | |
| 22 | struct atusb_dsc { |
| 23 | usb_dev_handle *dev; |
| 24 | int error; |
| 25 | }; |
| 26 | |
| 27 | |
| 28 | int atusb_error(void *handle); |
| 29 | int atusb_clear_error(void *handle); |
| 30 | void *atusb_open(const char *arg); |
| 31 | void atusb_close(void *handle); |
| 32 | void atusb_reset(void *handle); |
| 33 | void atusb_reset_rf(void *handle); |
| 34 | void atusb_test_mode(void *handle); |
| 35 | void atusb_slp_tr(void *handle, int on, int pulse); |
| 36 | int atusb_interrupt_wait(void *handle, int timeout_ms); |
| 37 | void atusb_rx_mode(void *handle, int on); |
| 38 | int atusb_rx(void *handle, void *buf, int size, int timeout_ms, uint8_t *lqi); |
| 39 | void atusb_tx(void *handle, const void *buf, int size); |
| 40 | |
| 41 | int atusb_set_clkm(void *handle, int mhz); |
| 42 | |
| 43 | #endif /* !ATUSB_COMMON_H */ |
| 44 | |
