Driver Development Process

To develop a sensor driver, it generally takes three steps: know about the sensor, develop a sensor driver, and test the driver.

1. Know about the sensor.

By reading the sensor's datasheet or other means, learn about the characteristics of the sensor including its type, communication interface (e.g., I2C, SPI), measurement cycle, working mode, power mode, etc.

2. Develop a sensor driver.

The main purpose of developing a sensor driver is to control the behaviors of the sensor through the SoC's peripheral interfaces.

3. Test the driver.

Once the development is done, write test cases to examine whether the driver can read data and control the peripheral interface successfully.



It takes similar steps to develop a controller driver: know about the controller, develop a driver, and test the driver.

1. Know about the controller.

By reading the controller's datasheet, learn about the controller's working principles, so as to select a suitable peripheral interface.

2. Develop a driver.

Based on the peripheral interface selected before, develop corresponding driver APIs for other embedded software modules.

3. Test the driver.

Write test cases to examine whether each driver API can be called and operate as expected.