File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,10 +6,10 @@ edition = "2018"
66publish = false
77
88[dependencies ]
9- cortex-m-rt = " 0.7.0 "
9+ cortex-m-rt = " 0.7.3 "
1010panic-semihosting = " 0.6.0"
1111usb-device = " 0.3.2"
12- usbd-serial = " 0.1.0 "
12+ usbd-serial = " 0.2.1 "
1313
1414[dependencies .nrf52840-hal ]
1515path = " ../../nrf52840-hal"
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ use cortex_m_rt::entry;
77use nrf52840_hal:: clocks:: Clocks ;
88use nrf52840_hal:: usbd:: { UsbPeripheral , Usbd } ;
99use usb_device:: class_prelude:: UsbBusAllocator ;
10- use usb_device:: device:: { UsbDeviceBuilder , UsbVidPid } ;
10+ use usb_device:: device:: { StringDescriptors , UsbDeviceBuilder , UsbVidPid } ;
1111use usbd_serial:: { SerialPort , USB_CLASS_CDC } ;
1212
1313#[ entry]
@@ -20,11 +20,14 @@ fn main() -> ! {
2020 let mut serial = SerialPort :: new ( & usb_bus) ;
2121
2222 let mut usb_dev = UsbDeviceBuilder :: new ( & usb_bus, UsbVidPid ( 0x16c0 , 0x27dd ) )
23- . manufacturer ( "Fake company" )
24- . product ( "Serial port" )
25- . serial_number ( "TEST" )
23+ . strings ( & [ StringDescriptors :: default ( )
24+ . manufacturer ( "Fake company" )
25+ . product ( "Serial port" )
26+ . serial_number ( "TEST" ) ] )
27+ . unwrap ( )
2628 . device_class ( USB_CLASS_CDC )
2729 . max_packet_size_0 ( 64 ) // (makes control transfers 8x faster)
30+ . unwrap ( )
2831 . build ( ) ;
2932
3033 loop {
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ optional = true
7373version = " 0.12.2"
7474
7575[dependencies .nrf-usbd ]
76- version = " 0.2 .0"
76+ version = " 0.3 .0"
7777optional = true
7878
7979[dependencies .embedded-hal-02 ]
You can’t perform that action at this time.
0 commit comments