sparkfun / SparkFun_STUSB4500_Arduino_Library

Communicates with the STUSB4500 over I2C to easily add USB-C Power Delivery into your project.
https://www.sparkfun.com/
Other
15 stars 10 forks source link

warning: "DEFAULT" redefined #8

Open mcpat-it opened 11 months ago

mcpat-it commented 11 months ago

I try to compile for a attiny817 (with megatinycore) and get this warning, it disappears when I change DEFAULT to DEFAULT1 or something else (in file stusb4500_register_map.h), but don't know what will happen (I ordered the board "SparkFun Power Delivery Board - USB-C (Qwiic)", but will receive it in a couple of days, so I want to know it in advance):

In file included from sketch\SparkFun_STUSB4500.h:31:0,
                 from D:\pcb\SparkFun Power Delivery Board\Example1-ReadParameters\Example1-ReadParameters.ino:23:
sketch\stusb4500_register_map.h:1:0: warning: "DEFAULT" redefined
 #define DEFAULT                0xFF

In file included from sketch\Example1-ReadParameters.ino.cpp:1:0:
C:\Users\xxx\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.10\cores\megatinycore/Arduino.h:117:0: note: this is the location of the previous definition
   #define DEFAULT         ADC_REFSEL_VDDREF_gc

In file included from sketch\SparkFun_STUSB4500.h:31:0,
                 from sketch\SparkFun_STUSB4500.cpp:21:
sketch\stusb4500_register_map.h:1:0: warning: "DEFAULT" redefined
 #define DEFAULT                0xFF

In file included from sketch\SparkFun_STUSB4500.h:25:0,
                 from sketch\SparkFun_STUSB4500.cpp:21:
C:\Users\xxx\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.10\cores\megatinycore/Arduino.h:117:0: note: this is the location of the previous definition
   #define DEFAULT         ADC_REFSEL_VDDREF_gc