linux/drivers/usb/serial/whiteheat.h

/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * USB ConnectTech WhiteHEAT driver
 *
 *      Copyright (C) 2002
 *          Connect Tech Inc.
 *
 *      Copyright (C) 1999, 2000
 *          Greg Kroah-Hartman ([email protected])
 *
 * See Documentation/usb/usb-serial.rst for more information on using this
 * driver
 *
 */

#ifndef __LINUX_USB_SERIAL_WHITEHEAT_H
#define __LINUX_USB_SERIAL_WHITEHEAT_H


/* WhiteHEAT commands */
#define WHITEHEAT_OPEN
#define WHITEHEAT_CLOSE
#define WHITEHEAT_SETUP_PORT
#define WHITEHEAT_SET_RTS
#define WHITEHEAT_SET_DTR
#define WHITEHEAT_SET_BREAK
#define WHITEHEAT_DUMP
#define WHITEHEAT_STATUS
#define WHITEHEAT_PURGE
#define WHITEHEAT_GET_DTR_RTS
#define WHITEHEAT_GET_HW_INFO
#define WHITEHEAT_REPORT_TX_DONE
#define WHITEHEAT_EVENT
#define WHITEHEAT_ECHO
#define WHITEHEAT_DO_TEST
#define WHITEHEAT_CMD_COMPLETE
#define WHITEHEAT_CMD_FAILURE


/*
 * Commands to the firmware
 */


/*
 * WHITEHEAT_OPEN
 * WHITEHEAT_CLOSE
 * WHITEHEAT_STATUS
 * WHITEHEAT_GET_DTR_RTS
 * WHITEHEAT_REPORT_TX_DONE
*/
struct whiteheat_simple {};


/*
 * WHITEHEAT_SETUP_PORT
 */
#define WHITEHEAT_PAR_NONE
#define WHITEHEAT_PAR_EVEN
#define WHITEHEAT_PAR_ODD
#define WHITEHEAT_PAR_SPACE
#define WHITEHEAT_PAR_MARK

#define WHITEHEAT_SFLOW_NONE
#define WHITEHEAT_SFLOW_RX
#define WHITEHEAT_SFLOW_TX
#define WHITEHEAT_SFLOW_RXTX

#define WHITEHEAT_HFLOW_NONE
#define WHITEHEAT_HFLOW_RTS_TOGGLE
#define WHITEHEAT_HFLOW_DTR
#define WHITEHEAT_HFLOW_CTS
#define WHITEHEAT_HFLOW_DSR
#define WHITEHEAT_HFLOW_RTS

struct whiteheat_port_settings {} __attribute__ ((packed));


/*
 * WHITEHEAT_SET_RTS
 * WHITEHEAT_SET_DTR
 * WHITEHEAT_SET_BREAK
 */
#define WHITEHEAT_RTS_OFF
#define WHITEHEAT_RTS_ON
#define WHITEHEAT_DTR_OFF
#define WHITEHEAT_DTR_ON
#define WHITEHEAT_BREAK_OFF
#define WHITEHEAT_BREAK_ON

struct whiteheat_set_rdb {};


/*
 * WHITEHEAT_DUMP
 */
#define WHITEHEAT_DUMP_MEM_DATA
#define WHITEHEAT_DUMP_MEM_IDATA
#define WHITEHEAT_DUMP_MEM_BDATA
#define WHITEHEAT_DUMP_MEM_XDATA

/*
 * Allowable address ranges (firmware checks address):
 * Type DATA:  0x00 - 0xff
 * Type IDATA: 0x80 - 0xff
 * Type BDATA: 0x20 - 0x2f
 * Type XDATA: 0x0000 - 0xffff
 *
 * B/I/DATA all read the local memory space
 * XDATA reads the external memory space
 * BDATA returns bits as bytes
 *
 * NOTE: 0x80 - 0xff (local space) are the Special Function Registers
 *       of the 8051, and some have on-read side-effects.
 */

struct whiteheat_dump {};


/*
 * WHITEHEAT_PURGE
 */
#define WHITEHEAT_PURGE_RX
#define WHITEHEAT_PURGE_TX

struct whiteheat_purge {};


/*
 * WHITEHEAT_ECHO
 */
struct whiteheat_echo {};


/*
 * WHITEHEAT_DO_TEST
 */
#define WHITEHEAT_TEST_UART_RW
#define WHITEHEAT_TEST_UART_INTR
#define WHITEHEAT_TEST_SETUP_CONT
#define WHITEHEAT_TEST_PORT_CONT
#define WHITEHEAT_TEST_PORT_DISCONT
#define WHITEHEAT_TEST_UART_CLK_START
#define WHITEHEAT_TEST_UART_CLK_STOP
#define WHITEHEAT_TEST_MODEM_FT
#define WHITEHEAT_TEST_ERASE_EEPROM
#define WHITEHEAT_TEST_READ_EEPROM
#define WHITEHEAT_TEST_PROGRAM_EEPROM

struct whiteheat_test {};


/*
 * Replies from the firmware
 */


/*
 * WHITEHEAT_STATUS
 */
#define WHITEHEAT_EVENT_MODEM
#define WHITEHEAT_EVENT_ERROR
#define WHITEHEAT_EVENT_FLOW
#define WHITEHEAT_EVENT_CONNECT

#define WHITEHEAT_FLOW_NONE
#define WHITEHEAT_FLOW_HARD_OUT
#define WHITEHEAT_FLOW_HARD_IN
#define WHITEHEAT_FLOW_SOFT_OUT
#define WHITEHEAT_FLOW_SOFT_IN
#define WHITEHEAT_FLOW_TX_DONE

struct whiteheat_status_info {};


/*
 * WHITEHEAT_GET_DTR_RTS
 */
struct whiteheat_dr_info {};


/*
 * WHITEHEAT_GET_HW_INFO
 */
struct whiteheat_hw_info {};


/*
 * WHITEHEAT_EVENT
 */
struct whiteheat_event_info {};


/*
 * WHITEHEAT_DO_TEST
 */
#define WHITEHEAT_TEST_FAIL
#define WHITEHEAT_TEST_UNKNOWN
#define WHITEHEAT_TEST_PASS

struct whiteheat_test_info {};


#endif