How to set the clock frequency of xintang NUC chip?
I feel the landlord's code, which is strange. If I/O needs input/output and internal pull-up, it is set to quasi-mode, that is, quasi-bidirectional. When inputting, let the corresponding bit output high, and it will be OK. In addition, each IO has an independent GPIOA/B/C/Dxxx register, so it is not necessary to read the DOUT register when controlling a bit. For example, the output of PA.0 can be modified by writing directly into the GPIOA0 register, and the output of PA. 1 can be modified by writing GPIOA 1. The pin register is read-only and is used to check the current state of the IO pin. Of course, a register like GPIOA0, if read, will also reflect the current state of IO.