@@ -24,10 +24,10 @@ use cortex_m::peripheral::NVIC;
24
24
use hal:: {
25
25
clock:: GenericClockController ,
26
26
dbgprint,
27
- ehal:: timer:: CountDown ,
28
27
pac:: { interrupt, CorePeripherals , Peripherals } ,
29
- time:: MegaHertz ,
28
+ time:: Hertz ,
30
29
timer:: TimerCounter ,
30
+ timer_traits:: InterruptDrivenTimer ,
31
31
usb:: UsbBus ,
32
32
} ;
33
33
use smart_leds:: { hsv:: RGB8 , SmartLedsWrite } ;
@@ -49,7 +49,7 @@ fn main() -> ! {
49
49
let gclk0 = clocks. gclk0 ( ) ;
50
50
let tc2_3 = clocks. tc2_tc3 ( & gclk0) . unwrap ( ) ;
51
51
let mut timer = TimerCounter :: tc3_ ( & tc2_3, peripherals. TC3 , & mut peripherals. MCLK ) ;
52
- timer. start ( MegaHertz ( 4 ) ) ;
52
+ timer. start ( Hertz :: MHz ( 4 ) . into_duration ( ) ) ;
53
53
let mut rgb = bsp:: dotstar_bitbang (
54
54
pins. dotstar_miso . into ( ) ,
55
55
pins. dotstar_mosi . into ( ) ,
@@ -83,9 +83,11 @@ fn main() -> ! {
83
83
USB_SERIAL = Some ( SerialPort :: new ( bus_allocator) ) ;
84
84
USB_BUS = Some (
85
85
UsbDeviceBuilder :: new ( bus_allocator, UsbVidPid ( 0x16c0 , 0x27dd ) )
86
- . manufacturer ( "Fake company" )
87
- . product ( "Serial port" )
88
- . serial_number ( "TEST" )
86
+ . strings ( & [ StringDescriptors :: new ( LangID :: EN )
87
+ . manufacturer ( "Fake company" )
88
+ . product ( "Serial port" )
89
+ . serial_number ( "TEST" ) ] )
90
+ . expect ( "Failed to set strings" )
89
91
. device_class ( USB_CLASS_CDC )
90
92
. build ( ) ,
91
93
) ;
0 commit comments