Brijesh-Thakkar opened a new pull request, #21521:
URL: https://github.com/apache/nuttx/pull/21521

   ## Summary
   ccs811_uorb, lis3dsh_uorb, qmi8658_uorb and nau7802 aren't converted to 
`sensor_data_t` but have
   no B16 guard, so with `CONFIG_SENSORS_USE_B16` they build and write float 
(or raw ADC counts in
   nau7802) into b16_t fields, giving wrong data. Add the same `#error` guard 
other unconverted
   drivers use (e.g. ltr308_uorb). Related: #17365.
   
   ## Impact
   B16 builds enabling these drivers now fail at compile time instead of 
returning wrong data.
   Float builds unchanged. No in-tree defconfig uses B16 with these drivers.
   
   ## Testing
   Config: stm32f4discovery:sensorscope plus CONFIG_SENSORS_CCS811, 
CONFIG_SENSORS_NAU7802 and CONFIG_SENSORS_QMI8658 (CONFIG_SENSORS_LIS3DSH_UORB 
is already in the config); toolchain: arm-none-eabi-gcc (15:14.2.rel1-1) 14.2.1 
20241119.
   
   Float build (`CONFIG_SENSORS_USE_FLOAT=y`), last lines of `make`:
   ```text
   Memory region         Used Size  Region Size  %age Used
              flash:       83204 B         1 MB      7.93%
               sram:       10560 B       112 KB      9.21%
   CP: nuttx.hex
   CP: nuttx.bin
   ```
   
   Same config with `CONFIG_SENSORS_USE_B16=y`, each driver now stops at the 
guard:
   ```text
   ./sensors/lis3dsh_uorb.c:49:4: error: #error fixed-point data type not 
supported yet
   ./sensors/nau7802.c:55:4: error: #error fixed-point data type not supported 
yet
   ./sensors/ccs811_uorb.c:46:4: error: #error fixed-point data type not 
supported yet
   ./sensors/qmi8658_uorb.c:49:4: error: #error fixed-point data type not 
supported yet
   ```
   
   No runtime log: the change only adds a compile-time guard, so behaviour of 
float builds is unchanged and B16 builds stop at compile time.
   
   esp32s3 boards selecting QMI8658 not built.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to