I2C Driver
The RTOS supports an I2C driver for communication over I2C buses. Characterized by a simple protocol, the I2C bus uses only two signal lines, making it widely adopted in embedded devices, especially in various low-speed devices. The RTOS also comes with a test program for testing I2C devices, which demonstrates how to call system interfaces to access I2C devices. The source code is located at: rtthread/bsp/starfive/jh7110/applications/i2c_test.c.
Before testing, the Sense HAT must be connected to the VF2 board. The I2C pin used for this connection is illustrated in the figure below.
Run the test program to read the Sense Hat device ID.
