In Nesc's code, you'll see a lot of data types you don't know, such as uint8_t. At first glance, it seems like a new data type, but the C language (Nesc is the extension of C) doesn't seem to have this type of data. How come again u again _t. Many people have this kind of doubt. On the Forum, someone asked: is the type with the end of *_t a long type? Baidu on the search, only to find the answer, then found that the original oneself to C too little mastery.
So what does the meaning of _t mean. The specific official answer was not found, but I think there is a close answer. It is a structure callout, which can be understood as an abbreviation of Type/typedef, indicating that it is defined by a TypeDef, not other data types.
Uint8_t,uint16_t,uint32_t and so are not new data types, they just use typedef to the type of alias, new bottle of wine tricks. However, do not underestimate the TypeDef, it will have a good role in the maintenance of your code. For example, there is no bool in C, so in a software, some programmers use int, some programmers use short, it is more chaotic, it is best to use a typedef to define, such as:
typedef char BOOL;
In general, a C project must do some of this work, because you will be involved in cross-platform, different platforms will have different word length, so the use of pre-compilation and typedef can make you the most effective maintenance of your code. For the convenience of users, C99 standard C language hardware for us to define these types, we are assured that the use of it.
According to the POSIX standard, the *_t type corresponding to the generic shaping is:
1 bytes uint8_t
2 bytes uint16_t
4 bytes uint32_t
8 bytes uint64_t