Using the new Arduino IDE for ESP8266 and found bugs, report them here

Moderator: igrr

User avatar
By martinayotte
#60394 Looking at HardwareSerial.h, both/all are equivalent :
Code: Select all    size_t write(uint8_t) override;
    inline size_t write(unsigned long n)
    {
        return write((uint8_t) n);
    }
    inline size_t write(long n)
    {
        return write((uint8_t) n);
    }
    inline size_t write(unsigned int n)
    {
        return write((uint8_t) n);
    }
    inline size_t write(int n)
    {
        return write((uint8_t) n);
    }
User avatar
By SwiCago
#60401 Are you using HardwareSerial.h ? for your test? or regular built in Serial.begin
I am using Serial.begin and from what I read, it does not implement its write function as "(uint8_t) n"
I'll try HardwareSerial.h


martinayotte wrote:Looking at HardwareSerial.h, both/all are equivalent :
Code: Select all    size_t write(uint8_t) override;
    inline size_t write(unsigned long n)
    {
        return write((uint8_t) n);
    }
    inline size_t write(long n)
    {
        return write((uint8_t) n);
    }
    inline size_t write(unsigned int n)
    {
        return write((uint8_t) n);
    }
    inline size_t write(int n)
    {
        return write((uint8_t) n);
    }
User avatar
By SwiCago
#60405 If it really is, then why does it not print 0x00 on the output?
You clearly posted that it's write method casts values (uint8_t) to, which should make it print 0x00, but in my dump it did not do that either. I find that strange.

In any case, thanks for the help so far, I'll see if I can figure it out. It has to be something stupid simple that I am missing

martinayotte wrote:HardwareSerial is the class name, and Serial is instantiated in HardwareSerial.cpp as :

Code: Select allHardwareSerial Serial(UART0);


So doing "Serial.begin()" is calling "HardwareSerial::begin()".