Chat freely about anything...

User avatar
By plinioseniore
#14791 Hi,

this is my first post. I'm into an open-source developing group that has developed and is maintaining a SmartHome framework for Arduino AVR (http://souliss.github.io) devices. We want now migrate it to ESP8266 using the porting of the relevant cores into the Arduino IDE.

So, actually I'm planning how to port the code, because it handle the packet header directly with pointer. I haven't yet an ESP8266 module and so I need some help. Lets start:

1) The ESP8266 as per documentation has a 32bit addressing space and 32bit registers, compared against the 16bit addressing space of AVRs and 8bit registers. So how a code like this will behave:
uint_16t var1 = 0xAABB;
uint_8t *pvar1 = (uint8_t*)(&var1);
Serial.println(*pvar1,HEX);
Serial.println(*pvar1++,HEX);

Is it the pointer moving to the next 32bit memory location or is it moving one byte forward?

Is it the data in big-endian or low-endian?

Thanks.

Regards,
Dario.