stefslon / cec-arduino

Arduino project for communicating with HDMI CEC equipment
GNU General Public License v2.0
73 stars 10 forks source link

Compile error #2

Open Filo301 opened 5 years ago

Filo301 commented 5 years ago

When i'm trying to compile code i've got error:

USBComm.cpp:178: error: prototype for 'size_t HIDSerial::write(const uint8_t*, size_t)' does not match any in class 'HIDSerial'

 size_t HIDSerial::write(const uint8_t *buffer, size_t size)

        ^

In file included from sketch\USBComm.cpp:1:0:

USBComm.h:14: error: candidates are: size_t HIDSerial::write(const uint8_t*)

   size_t write(const uint8_t *buffer); // write a string

          ^

USBComm.cpp:151: error: virtual size_t HIDSerial::write(uint8_t)

 size_t HIDSerial::write(uint8_t data)

        ^

Znaleziono wiele bibliotek w "usbdrv.h"
Wykorzystane: C:\Users\filo3\Documents\Arduino\libraries\usbdrv
Niewykorzystane: C:\Users\filo3\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\DigisparkUSB
Niewykorzystane: C:\Users\filo3\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\DigisparkMouse
exit status 1
prototype for 'size_t HIDSerial::write(const uint8_t*, size_t)' does not match any in class 'HIDSerial'

I've tried arduino IDE 1.8.1, 1.6.5 and 1.0.4. attiny85 and atmega32u4 but i like attiny for this. What should i do to make this work?

stefslon commented 5 years ago

I just did a clean install of Arduino IDE 1.8.9, pulled cec-arduino and everything compiled with no problems. Make sure usbdrv under libraries directory is copied to your Arduino libraries directory. See Manual installation section Arduino Libraries Guide.

Filo301 commented 5 years ago

I did clean install of Arduino ide. When i set board as nano or micro compiles without errors but when i set board as digispark i've got following errors:


Build options changed, rebuilding all
In file included from sketch\USBComm.cpp:1:0:

USBComm.h:14:10: error: conflicting return type specified for 'virtual size_t HIDSerial::write(const uint8_t*, size_t)'

   size_t write(const uint8_t *buffer, size_t size); // write a string

          ^

In file included from C:\Users\filo3\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Stream.h:24:0,

                 from C:\Users\filo3\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/TinyDebugSerial.h:31,

                 from C:\Users\filo3\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:18,

                 from C:\Users\filo3\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4,

                 from sketch\USBComm.h:4,

                 from sketch\USBComm.cpp:1:

C:\Users\filo3\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Print.h:75:18: error:   overriding 'virtual void Print::write(const uint8_t*, size_t)'

     virtual void write(const uint8_t *buffer, size_t size);

                  ^

Multiple libraries were found for "usbdrv.h"
 Used: C:\Users\filo3\Documents\Arduino\libraries\usbdrv
 Not used: C:\Users\filo3\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\DigisparkUSB
 Not used: C:\Users\filo3\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\DigisparkMouse
 Not used: C:\Users\filo3\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\DigisparkKeyboard
 Not used: C:\Users\filo3\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\DigisparkJoystick
 Not used: C:\Users\filo3\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\DigisparkCDC
In file included from C:\Users\filo3\Desktop\cec-arduino-master\firmware\cec-arduino\cec-arduino.ino:2:0:

USBComm.h:14:10: error: conflicting return type specified for 'virtual size_t HIDSerial::write(const uint8_t*, size_t)'

   size_t write(const uint8_t *buffer, size_t size); // write a string

          ^

In file included from C:\Users\filo3\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Stream.h:24:0,

                 from C:\Users\filo3\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/TinyDebugSerial.h:31,

                 from C:\Users\filo3\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:18,

                 from C:\Users\filo3\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4,

                 from sketch\cec-arduino.ino.cpp:1:

C:\Users\filo3\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Print.h:75:18: error:   overriding 'virtual void Print::write(const uint8_t*, size_t)'

     virtual void write(const uint8_t *buffer, size_t size);

                  ^

exit status 1
conflicting return type specified for 'virtual size_t HIDSerial::write(const uint8_t*, size_t)'

Or i should reprogram attiny85/digispark via isp?