1*1da177e4SLinus Torvalds #ifndef CYPRESS_M8_H 2*1da177e4SLinus Torvalds #define CYPRESS_M8_H 3*1da177e4SLinus Torvalds 4*1da177e4SLinus Torvalds /* definitions and function prototypes used for the cypress USB to Serial controller */ 5*1da177e4SLinus Torvalds 6*1da177e4SLinus Torvalds /* For sending our feature buffer - controlling serial communication states */ 7*1da177e4SLinus Torvalds /* Linux HID has no support for serial devices so we do this through the driver */ 8*1da177e4SLinus Torvalds #define HID_REQ_GET_REPORT 0x01 9*1da177e4SLinus Torvalds #define HID_REQ_SET_REPORT 0x09 10*1da177e4SLinus Torvalds 11*1da177e4SLinus Torvalds /* List other cypress USB to Serial devices here, and add them to the id_table */ 12*1da177e4SLinus Torvalds 13*1da177e4SLinus Torvalds /* DeLorme Earthmate USB - a GPS device */ 14*1da177e4SLinus Torvalds #define VENDOR_ID_DELORME 0x1163 15*1da177e4SLinus Torvalds #define PRODUCT_ID_EARTHMATEUSB 0x0100 16*1da177e4SLinus Torvalds 17*1da177e4SLinus Torvalds /* Cypress HID->COM RS232 Adapter */ 18*1da177e4SLinus Torvalds #define VENDOR_ID_CYPRESS 0x04b4 19*1da177e4SLinus Torvalds #define PRODUCT_ID_CYPHIDCOM 0x5500 20*1da177e4SLinus Torvalds /* End of device listing */ 21*1da177e4SLinus Torvalds 22*1da177e4SLinus Torvalds /* Used for setting / requesting serial line settings */ 23*1da177e4SLinus Torvalds #define CYPRESS_SET_CONFIG 0x01 24*1da177e4SLinus Torvalds #define CYPRESS_GET_CONFIG 0x02 25*1da177e4SLinus Torvalds 26*1da177e4SLinus Torvalds /* Used for throttle control */ 27*1da177e4SLinus Torvalds #define THROTTLED 0x1 28*1da177e4SLinus Torvalds #define ACTUALLY_THROTTLED 0x2 29*1da177e4SLinus Torvalds 30*1da177e4SLinus Torvalds /* chiptypes - used in case firmware differs from the generic form ... offering 31*1da177e4SLinus Torvalds * different baud speeds/etc. 32*1da177e4SLinus Torvalds */ 33*1da177e4SLinus Torvalds 34*1da177e4SLinus Torvalds #define CT_EARTHMATE 0x01 35*1da177e4SLinus Torvalds #define CT_CYPHIDCOM 0x02 36*1da177e4SLinus Torvalds #define CT_GENERIC 0x0F 37*1da177e4SLinus Torvalds /* End of chiptype definitions */ 38*1da177e4SLinus Torvalds 39*1da177e4SLinus Torvalds /* RS-232 serial data communication protocol definitions */ 40*1da177e4SLinus Torvalds /* these are sent / read at byte 0 of the input/output hid reports */ 41*1da177e4SLinus Torvalds /* You can find these values defined in the CY4601 USB to Serial design notes */ 42*1da177e4SLinus Torvalds 43*1da177e4SLinus Torvalds #define CONTROL_DTR 0x20 /* data terminal ready - flow control - host to device */ 44*1da177e4SLinus Torvalds #define UART_DSR 0x20 /* data set ready - flow control - device to host */ 45*1da177e4SLinus Torvalds #define CONTROL_RTS 0x10 /* request to send - flow control - host to device */ 46*1da177e4SLinus Torvalds #define UART_CTS 0x10 /* clear to send - flow control - device to host */ 47*1da177e4SLinus Torvalds #define UART_RI 0x10 /* ring indicator - modem - device to host */ 48*1da177e4SLinus Torvalds #define UART_CD 0x40 /* carrier detect - modem - device to host */ 49*1da177e4SLinus Torvalds #define CYP_ERROR 0x08 /* received from input report - device to host */ 50*1da177e4SLinus Torvalds /* Note - the below has nothing to to with the "feature report" reset */ 51*1da177e4SLinus Torvalds #define CONTROL_RESET 0x08 /* sent with output report - host to device */ 52*1da177e4SLinus Torvalds 53*1da177e4SLinus Torvalds /* End of RS-232 protocol definitions */ 54*1da177e4SLinus Torvalds 55*1da177e4SLinus Torvalds #endif /* CYPRESS_M8_H */ 56