MCPcopy Create free account
hub / github.com/kiibohd/controller / usb_init

Function usb_init

Bootloader/usb.c:715–732  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

713
714
715void usb_init(const struct usbd_device *identity)
716{
717 // Set the device serial number to the reserved iSerial string memory
718#if defined(_kinetis_)
719 uint32ToHex16( SIM_UIDH, &(dfu_device_str_desc[3]->bString[8]) );
720 uint32ToHex16( SIM_UIDMH, &(dfu_device_str_desc[3]->bString[16]) );
721 uint32ToHex16( SIM_UIDML, &(dfu_device_str_desc[3]->bString[24]) );
722 uint32ToHex16( SIM_UIDL, &(dfu_device_str_desc[3]->bString[32]) );
723
724 usb.identity = identity;
725 usb_enable();
726
727#elif defined(_sam_)
728 Chip_serial_number_setup();
729
730 init_usb_bootloader(0);
731#endif
732}
733

Callers 1

dfu_usb_initFunction · 0.70

Calls 4

uint32ToHex16Function · 0.85
usb_enableFunction · 0.85
Chip_serial_number_setupFunction · 0.85
init_usb_bootloaderFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…