Open neocafe88 opened 1 year ago
The actual temperature sensor driver might not be needed as the BSP in Buildroot might provide it. Still, a pseudo driver can help develop other modules which needs the driver but the driver won't be available until the system is build for the board. (Test Mock)
The kernel driver module generates random number using the function 'get_random_bytes()'. The temperature will fluctuate 66 ~ 86 F.
DoD is verified as 'cat /dev/tempdriver' get a temperature successfully.
The driver is adjusted to give the temperature data at an interval longer than 1 second. If it's read within a second, it will give 'no-read'. To check the time, <linux/jiffies> was used.
Build a device driver for a pseudo (mock) temperature sensor. Random numbers will be generated for temperature readings.
DoD: A user program can read temperatures from the device.
Blocker: None