File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change @@ -550,6 +550,59 @@ usbd_class_driver_t const *usbd_app_driver_get_cb(uint8_t *driver_count) {
550
550
*driver_count = 1 ;
551
551
return &_resetd_driver;
552
552
}
553
+
554
+ #elif defined NO_USB
555
+
556
+ // will ensure backward compatibility with existing code when using pico-debug
557
+
558
+ #warning "NO_USB selected. No output to Serial will occur!"
559
+
560
+ #include < Arduino.h>
561
+
562
+ void SerialUSB::begin (unsigned long baud) {
563
+ }
564
+
565
+ void SerialUSB::end () {
566
+
567
+ }
568
+
569
+ int SerialUSB::peek () {
570
+ return 0 ;
571
+ }
572
+
573
+ int SerialUSB::read () {
574
+ return -1 ;
575
+ }
576
+
577
+ int SerialUSB::available () {
578
+ return 0 ;
579
+ }
580
+
581
+ int SerialUSB::availableForWrite () {
582
+ return 0 ;
583
+ }
584
+
585
+ void SerialUSB::flush () {
586
+
587
+ }
588
+
589
+ size_t SerialUSB::write (uint8_t c) {
590
+ (void ) c;
591
+ return 0 ;
592
+ }
593
+
594
+ size_t SerialUSB::write (const uint8_t *buf, size_t length) {
595
+ (void ) buf;
596
+ (void ) length;
597
+ return 0 ;
598
+ }
599
+
600
+ SerialUSB::operator bool () {
601
+ return false ;
602
+ }
603
+
604
+ SerialUSB Serial;
605
+
553
606
#endif
554
607
555
608
You can’t perform that action at this time.
0 commit comments