arpruss / USBComposite_stm32f1

USB Composite library for STM32F1 (HID, Serial, MIDI and XBox360 controller)
Other
381 stars 76 forks source link

Waiting for USBComposite #43

Closed Asken closed 4 years ago

Asken commented 4 years ago

Arduino beginner trying the library out and running while (!USBComposite); gives me a compilation error

Sketch1.ino: 101:9: error: no match for 'operator!' (operand type is 'USBCompositeDevice')
Build failed for project 'Sketch1'
   if (millis() > t + 250) {
Sketch1.ino:101: note  candidate is
Sketch1.ino:101: note  operator!(bool) <built-in>
Sketch1.ino:101: note    no known conversion for argument 1 from USBCompositeDevice to bool
arpruss commented 4 years ago

Try: while(!USBComposite.isReady()); instead.