Look at the above, these sentences will also help you to explain briefly:
-
# Define uchar unsigned characters
This sentence has been redefined, that is, when the program encounters uchar at compile time, it is replaced by unsigned char.
# defineunt unsigned int is the same.
Unsigned means unsigned. If you have studied C language a little,
The Int type has 65535 bits, and the signed range is:
Int short shaping -32768 ~ 32767
Unsigned int unsigned short integer 0-65535;
-
# The defined data port P2 is also redefined, and all data ports encountered during compilation are replaced by P2.
P2 is the interface of May 1 single chip microcomputer. If you don't know this, I suggest you read the basic book 5 1 first.
5 1 has four full-duplex io ports P0, P 1, P2 and P3, each with 8 bits.
-
Sbit is a bit redefinition statement. When you encounter SCL at compile time, you will know that it is 4 bits of P0 port (P0^4).
It's all the same down there.
To learn about adxl345, please read my article.
/kai 9 1/item/fa60 c 630 b 6 12d 085 b 7 1 1 DBA 1
The program did not ask me again.