Ok, i'll retry in a lesser trolly way so...
First of all uint8_t
isn't a shortcut, it's a macro ( preprocessor definition ) or compiler type definition, the C preprocessor will substitute every occurrence of that word in the code with something else.
means "Unsigned INTeger 8 bit long data Type" and then, its equivalent in standard C99 for any 8bit or bigger address length processor is unsigned char
, a bitfields that can contain integral values between 0x0 and 0xFF ( 0 - 255 ).
Other useful macros like this are uint16_t, uint32_t, uint64_t, uint128_t, int8_t, int16_t, int32_t, int64_t, int128_t
, each used to declare a specific data type, in size and signess, they are provided almost just for cross compatibility ( for instance on arduino uint16_t
is unsigned int
, while on usual x86 desktop processor is unsigned short
due to the nature of the Atmel cpu it has on board ).
The use of uint_8
inside the Arduino core files is due to the strict relation between the Atmel GCC (Gnu Compiler Collection) and the *NIX based GCC, wich storically has been used with this kind of core data types ( usually declared in /usr/include/stdint.h ), almost every UNIX or GNU/Linux system cores ( any kind of system that strictly follows the POSIX specifications ) have been written using those kind of keyword, while Windows systems are historically written with similar BYTE, WORD, DWORD
Because Atmel choose to use a semi-standard gcc *NIX based tool-chain they kept as a legacy the use of the "stdint.h" file ( look in [Your Arduino folder]/hardware/tools/avr/avr/include/stdint.h
, at line 79 there is our friend uint8_t
), but as you see this has nothing to do with Arduino, but with its third-party toolchain.
This is why ( i think ) there should not be a topic about it on the Arduino documentation, at least i could understand something about their specific byte
( defined in [Your Arduino folder]/hardware/arduino/cores/arduino/Arduino.h
line 94 ) but it is so much self explanatory that would be somewhat redundant.
I hope my answer will be more usefull this time and will give u more details to solve you question.
@cunctator: Your approach is harmful, we are all here to learn. Is prohibited to attack verbally other users.
Please change your attitude to beginners, if you are an expert, spread your knowledge if you want.
My attempt was not to attack anyone, just to say that this product is an advanced piece of hardware and software, not an entry point for beginner coders, for instance the 2K available memory management is something that even a skilled programmer feels hard to handle in complex projects, the way timers and interrupts are fired needs some background for beeing used in a safe and productive way, serial communication needs precise optimization, and that's asynchronous!
(you?) Arduino guys made a great work making it easy to use, but still there is GCC, and AR behind the corner and much more that needs some kind of know-how, background and competence.
Nothin against beginners ( we were all noobs
) but a learning curve exsists because we cannot just jump to the top, and even if Arduino is not (yet) the top, it lies high!