标题: [NUC123] HID RF-Mouse through RF24L01 [打印本页] 作者: admin 时间: 2022-9-15 10:40 标题: [NUC123] HID RF-Mouse through RF24L01
Application: The sample code is NUC123 applied to wireless mouse through RF24L01.
BSP Version: NUC123 Series BSP CMSIS v3.01.001
Hardware: NuTiny-EVB-123-LQFP64 V1.0
This sample code uses SPI0 interface to initialize RF24L01 and make it as the receiving mode to receive the data. After receiving the RF data, the corresponding data will be converted into the mouse movement direction value after processing, and the data will be uploaded to PC through USB to control the mouse action.
Use a timer to record, if 50ms does not receive data, frequency hopping once.
The IRQ (external GPIO) interrupt is used to detect whether data is received. If data is received, an IRQ interrupt will be generated. In the IRQ interrupt, if the received data flag is detected, the data will be read. If the first data is 0xAA, the second byte data will be judged and stored in the RF key variable.