WiringProject / Wiring

Wiring Framework
http://wiring.org.co/
Other
217 stars 168 forks source link

Is Wiring 1.0 build 100 Arduino 1.0 compliant? #13

Closed rei-vilo closed 12 years ago

rei-vilo commented 12 years ago

Is Wiring 1.0 build 100 Arduino 1.0 compliant?

Wiring print.h Code

class Print
{
  public:
    // pure virtual - must be implemented by derived class
    virtual void write(uint8_t) = 0;

    // virtual - can be redefined (polymorphic class)
    virtual void write(const char *str);
    virtual void write(const uint8_t *buffer, size_t size);

write is void with Wiring 1.0 while returning size_t with Arduino 1.0

Arduino 1.0 print.h code

class Print
{
  private:
    int write_error;
    size_t printNumber(unsigned long, uint8_t);
    size_t printFloat(double, uint8_t);
tochinet commented 12 years ago

Arduino up to 0023 was almost "wiring-compliant" as ti was a close derivative with some additions and maybe some deviations. 1.0 was a serious deviation, making not only the distance with Wiring bigger, but also breaking all existing Arduino code libraries and examples for the sake of some strange and undocumented "beautification" process.

Besides, I believe (looking at the file dates) that Wiring 1.0 is older than Arduino 1.0.

So AFAIK, the answer is no and it's not going to be. Maybe the question is "why should it be ?

This said, the above is only my educated guess after a 2 minutes reflexion. So this may be stupid ;-)

rei-vilo commented 12 years ago

Actually, this is great news!

Arduino 0023 is good enough and the 1.0 release isn't easy to manage.

So I'm going to stick with Wiring 1.0 = Arduino 0023 = chipKIT MPIDE 0023.

Thank you for your answer.