ropg / ezTime

ezTime — pronounced "Easy Time" — is a very easy to use Arduino time and date library that provides NTP network time lookups, extensive timezone support, formatted time and date strings, user events, millisecond precision and more.
MIT License
327 stars 92 forks source link

The name "ERROR" collides with a declaration for the STM32F1 series #45

Closed mitag closed 4 years ago

mitag commented 5 years ago

Hello, first of all I would like to thank you for the really great library. Now we come to the less beautiful things in life. I can't compile the library for the STM32F1 series. ezTime ERROR STM32F1.txt I renamed "ERROR" to "ez_ERROR" locally in the files ezTime.h and ezTime.cpp, then I was able to compile the sketch. ezTime ez_ERROR STM32F1.txt

ropg commented 4 years ago

Sorry for late reply. I had already built a feature for this that I had not documented. I just checked in a reference to it near the top of the ezTime.h file:

// Uncomment if you want to access ezTime functions only after "ezt."
// (to avoid naming conflicts in bigger projects, e.g.) 
// #define EZTIME_EZT_NAMESPACE

What that means is that if you set that define, all ezTime functions have to be prefaced with ezt., so as to avoid such conflicts. Please test if you feel so inclined.