linux/drivers/net/can/usb/peak_usb/pcan_usb_pro.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * CAN driver for PEAK System PCAN-USB Pro adapter
 * Derived from the PCAN project file driver/src/pcan_usbpro_fw.h
 *
 * Copyright (C) 2003-2011 PEAK System-Technik GmbH
 * Copyright (C) 2011-2012 Stephane Grosjean <[email protected]>
 */
#ifndef PCAN_USB_PRO_H
#define PCAN_USB_PRO_H

/*
 * USB Vendor request data types
 */
#define PCAN_USBPRO_REQ_INFO
#define PCAN_USBPRO_REQ_FCT

/* Vendor Request value for XXX_INFO */
#define PCAN_USBPRO_INFO_BL
#define PCAN_USBPRO_INFO_FW

/* PCAN-USB Pro (FD) Endpoints */
#define PCAN_USBPRO_EP_CMDOUT
#define PCAN_USBPRO_EP_CMDIN
#define PCAN_USBPRO_EP_MSGOUT_0
#define PCAN_USBPRO_EP_MSGIN
#define PCAN_USBPRO_EP_MSGOUT_1
#define PCAN_USBPRO_EP_UNUSED

/* Vendor Request value for XXX_FCT */
#define PCAN_USBPRO_FCT_DRVLD
#define PCAN_USBPRO_FCT_DRVLD_REQ_LEN

/* PCAN_USBPRO_INFO_BL vendor request record type */
struct __packed pcan_usb_pro_blinfo {};

/* PCAN_USBPRO_INFO_FW vendor request record type */
struct __packed pcan_usb_pro_fwinfo {};

/*
 * USB Command record types
 */
#define PCAN_USBPRO_SETBTR
#define PCAN_USBPRO_SETBUSACT
#define PCAN_USBPRO_SETSILENT
#define PCAN_USBPRO_SETDEVID
#define PCAN_USBPRO_SETFILTR
#define PCAN_USBPRO_SETTS
#define PCAN_USBPRO_GETDEVID
#define PCAN_USBPRO_SETLED
#define PCAN_USBPRO_RXMSG8
#define PCAN_USBPRO_RXMSG4
#define PCAN_USBPRO_RXMSG0
#define PCAN_USBPRO_RXRTR
#define PCAN_USBPRO_RXSTATUS
#define PCAN_USBPRO_RXTS
#define PCAN_USBPRO_TXMSG8
#define PCAN_USBPRO_TXMSG4
#define PCAN_USBPRO_TXMSG0

/* record structures */
struct __packed pcan_usb_pro_btr {};

struct __packed pcan_usb_pro_busact {};

struct __packed pcan_usb_pro_silent {};

struct __packed pcan_usb_pro_filter {};

struct __packed pcan_usb_pro_setts {};

struct __packed pcan_usb_pro_devid {};

#define PCAN_USBPRO_LED_DEVICE
#define PCAN_USBPRO_LED_BLINK_FAST
#define PCAN_USBPRO_LED_BLINK_SLOW
#define PCAN_USBPRO_LED_ON
#define PCAN_USBPRO_LED_OFF

struct __packed pcan_usb_pro_setled {};

struct __packed pcan_usb_pro_rxmsg {};

#define PCAN_USBPRO_STATUS_ERROR
#define PCAN_USBPRO_STATUS_BUS
#define PCAN_USBPRO_STATUS_OVERRUN
#define PCAN_USBPRO_STATUS_QOVERRUN

struct __packed pcan_usb_pro_rxstatus {};

struct __packed pcan_usb_pro_rxts {};

struct __packed pcan_usb_pro_txmsg {};

pcan_usb_pro_rec;

int pcan_usb_pro_probe(struct usb_interface *intf);
int pcan_usb_pro_send_req(struct peak_usb_device *dev, int req_id,
			  int req_value, void *req_addr, int req_size);
void pcan_usb_pro_restart_complete(struct urb *urb);

#endif