usbd_gs_can: remove unused USBD_GS_CAN_HandleTypeDef::host_config

The GS_USB_BREQ_HOST_FORMAT has never been supported by the
candleLight firmware, and since Linux v5.10 the gs_usb driver works on
Big Endian Linux systems, too.

So remove host_config handling from the firmware. This saves some
bytes:

| add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-16 (-16)
| Function                                     old     new   delta
| USBD_GS_CAN_EP0_RxReady                      640     624     -16
| Total: Before=17382, After=17366, chg -0.09%
This commit is contained in:
Marc Kleine-Budde 2022-09-18 19:51:39 +02:00 committed by fenugrec
parent 17a7fe8445
commit bbe39cad2e

View File

@ -50,7 +50,6 @@ typedef struct {
USBD_SetupReqTypedef last_setup_request;
struct gs_host_config host_config;
queue_t *q_frame_pool;
queue_t *q_from_host;
@ -379,8 +378,15 @@ static uint8_t USBD_GS_CAN_EP0_RxReady(USBD_HandleTypeDef *pdev) {
switch (req->bRequest) {
case GS_USB_BREQ_HOST_FORMAT:
// TODO process host data (expect 0x0000beef in byte_order)
memcpy(&hcan->host_config, hcan->ep0_buf, sizeof(hcan->host_config));
/* The firmware on the original USB2CAN by Geschwister Schneider
* Technologie Entwicklungs- und Vertriebs UG exchanges all data
* between the host and the device in host byte order. This is done
* with the struct gs_host_config::byte_order member, which is sent
* first to indicate the desired byte order.
*
* The widely used open source firmware candleLight doesn't support
* this feature and exchanges the data in little endian byte order.
*/
break;
case GS_USB_BREQ_IDENTIFY: