usb descriptor

This commit is contained in:
Matthew Kennedy 2023-02-26 12:05:41 -08:00
parent 4c6515a1ae
commit 62ffcef1a9
4 changed files with 13 additions and 14 deletions

View File

@ -16,7 +16,7 @@ jobs:
# folder: config/boards/f407-discovery # folder: config/boards/f407-discovery
# config-name: all # config-name: all
# openocd-script: ../.github/workflows/openocd_ci_f4_discovery.cfg # openocd-script: ../.github/workflows/openocd_ci_f4_discovery.cfg
# serial-device: /dev/serial/by-id/usb-rusEFI_LLC_rusEFI_Engine_Management_ECU_2B003B000A51343033393930-if01 # serial-device: /dev/serial/by-id/usb-FOME_FOME_Engine_Management_ECU_2B003B000A51343033393930-if01
- build-target: f407-discovery - build-target: f407-discovery
script: hardware_ci_f4_discovery script: hardware_ci_f4_discovery
@ -25,7 +25,7 @@ jobs:
folder: config/boards/f407-discovery folder: config/boards/f407-discovery
config-name: all config-name: all
openocd-script: ../.github/workflows/openocd_ci_f4_discovery_2.cfg openocd-script: ../.github/workflows/openocd_ci_f4_discovery_2.cfg
serial-device: /dev/serial/by-id/usb-rusEFI_LLC_rusEFI_Engine_Management_ECU_1E0032000851353238333131-if01 serial-device: /dev/serial/by-id/usb-FOME_FOME_Engine_Management_ECU_1E0032000851353238333131-if01
# - build-target: proteus_f4 # - build-target: proteus_f4
# script: hardware_ci_proteus # script: hardware_ci_proteus
@ -34,7 +34,7 @@ jobs:
# folder: config/boards/proteus # folder: config/boards/proteus
# config-name: proteus_f4 # config-name: proteus_f4
# openocd-script: ../.github/workflows/openocd_ci_proteus.cfg # openocd-script: ../.github/workflows/openocd_ci_proteus.cfg
# serial-device: /dev/serial/by-id/usb-rusEFI_LLC_rusEFI_Engine_Management_ECU_41003D000451383037343335-if01 # serial-device: /dev/serial/by-id/usb-FOME_FOME_Engine_Management_ECU_41003D000451383037343335-if01
runs-on: ${{matrix.runs-on}} runs-on: ${{matrix.runs-on}}

View File

@ -78,7 +78,7 @@ static void sayHello() {
int flashSize = TM_ID_GetFlashSize(); int flashSize = TM_ID_GetFlashSize();
if (flashSize < MIN_FLASH_SIZE) { if (flashSize < MIN_FLASH_SIZE) {
firmwareError(OBD_PCM_Processor_Fault, "rusEFI expected at least %dK of flash", MIN_FLASH_SIZE); firmwareError(OBD_PCM_Processor_Fault, "Expected at least %dK of flash but found %dK", MIN_FLASH_SIZE, flashSize);
} }
// todo: bug, at the moment we report 1MB on dual-bank F7 // todo: bug, at the moment we report 1MB on dual-bank F7

View File

@ -53,7 +53,7 @@ static const scsi_inquiry_response_t iniDriveInquiry = {
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
"rusEFI", "FOME",
"INI Drive", "INI Drive",
{'v',CH_KERNEL_MAJOR+'0','.',CH_KERNEL_MINOR+'0'} {'v',CH_KERNEL_MAJOR+'0','.',CH_KERNEL_MINOR+'0'}
}; };
@ -67,7 +67,7 @@ static const scsi_inquiry_response_t sdCardInquiry = {
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
"rusEFI", "FOME",
"SD Card", "SD Card",
{'v',CH_KERNEL_MAJOR+'0','.',CH_KERNEL_MINOR+'0'} {'v',CH_KERNEL_MAJOR+'0','.',CH_KERNEL_MINOR+'0'}
}; };

View File

@ -203,22 +203,21 @@ static const uint8_t vcom_string0[] = {
* Vendor string. * Vendor string.
*/ */
static const uint8_t vcom_string1[] = { static const uint8_t vcom_string1[] = {
USB_DESC_BYTE(22), /* bLength. */ USB_DESC_BYTE(8), /* bLength. */
USB_DESC_BYTE(USB_DESCRIPTOR_STRING), /* bDescriptorType. */ USB_DESC_BYTE(USB_DESCRIPTOR_STRING), /* bDescriptorType. */
'r', 0, 'u', 0, 's', 0, 'E', 0, 'F', 0, 'I', 0, ' ', 0, 'L', 0, 'F', 0, 'O', 0, 'M', 0, 'E', 0
'L', 0, 'C', 0
}; };
/* /*
* Device Description string. * Device Description string.
*/ */
static const uint8_t vcom_string2[] = { static const uint8_t vcom_string2[] = {
USB_DESC_BYTE(58), /* bLength. */ USB_DESC_BYTE(54), /* bLength. */
USB_DESC_BYTE(USB_DESCRIPTOR_STRING), /* bDescriptorType. */ USB_DESC_BYTE(USB_DESCRIPTOR_STRING), /* bDescriptorType. */
'r', 0, 'u', 0, 's', 0, 'E', 0, 'F', 0, 'I', 0, ' ', 0, 'E', 0, 'F', 0, 'O', 0, 'M', 0, 'E', 0, ' ', 0, 'E', 0, 'n', 0, 'g', 0,
'n', 0, 'g', 0, 'i', 0, 'n', 0, 'e', 0, ' ', 0, 'M', 0, 'a', 0, 'i', 0, 'n', 0, 'e', 0, ' ', 0, 'M', 0, 'a', 0, 'n', 0, 'a', 0,
'n', 0, 'a', 0, 'g', 0, 'e', 0, 'm', 0, 'e', 0, 'n', 0, 't', 0, 'g', 0, 'e', 0, 'm', 0, 'e', 0, 'n', 0, 't', 0, ' ', 0, 'E', 0,
' ', 0, 'E', 0, 'C', 0, 'U', 0 'C', 0, 'U', 0
}; };
/* /*