linux/drivers/net/ieee802154/atusb.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * atusb.h - Definitions shared between kernel and ATUSB firmware
 *
 * Written 2013 by Werner Almesberger <[email protected]>
 *
 * (at your option) any later version.
 *
 * This file should be identical for kernel and firmware.
 * Kernel: drivers/net/ieee802154/atusb.h
 * Firmware: ben-wpan/atusb/fw/include/atusb/atusb.h
 */

#ifndef	_ATUSB_H
#define _ATUSB_H

#define ATUSB_VENDOR_ID
#define ATUSB_PRODUCT_ID
				/*     -- -         - */

#define ATUSB_BUILD_SIZE

/* Commands to our device. Make sure this is synced with the firmware */
enum atusb_requests {};

enum {};

/*
 * Direction	bRequest		wValue		wIndex	wLength
 *
 * ->host	ATUSB_ID		-		-	3
 * ->host	ATUSB_BUILD		-		-	#bytes
 * host->	ATUSB_RESET		-		-	0
 *
 * host->	ATUSB_RF_RESET		-		-	0
 * ->host	ATUSB_POLL_INT		-		-	1
 * host->	ATUSB_TEST		-		-	0
 * ->host	ATUSB_TIMER		-		-	#bytes (6)
 * ->host	ATUSB_GPIO		dir+data	mask+p#	3
 * host->	ATUSB_SLP_TR		-		-	0
 * host->	ATUSB_GPIO_CLEANUP	-		-	0
 *
 * host->	ATUSB_REG_WRITE		value		addr	0
 * ->host	ATUSB_REG_READ		-		addr	1
 * host->	ATUSB_BUF_WRITE		-		-	#bytes
 * ->host	ATUSB_BUF_READ		-		-	#bytes
 * host->	ATUSB_SRAM_WRITE	-		addr	#bytes
 * ->host	ATUSB_SRAM_READ		-		addr	#bytes
 *
 * host->	ATUSB_SPI_WRITE		byte0		byte1	#bytes
 * ->host	ATUSB_SPI_READ1		byte0		-	#bytes
 * ->host	ATUSB_SPI_READ2		byte0		byte1	#bytes
 * ->host	ATUSB_SPI_WRITE2_SYNC	byte0		byte1	0/1
 *
 * host->	ATUSB_RX_MODE		on		-	0
 * host->	ATUSB_TX		flags		ack_seq	#bytes
 * host->	ATUSB_EUI64_WRITE	-		-	#bytes (8)
 * ->host	ATUSB_EUI64_READ	-		-	#bytes (8)
 */

#define ATUSB_REQ_FROM_DEV
#define ATUSB_REQ_TO_DEV

#endif /* !_ATUSB_H */