linguini1 opened a new pull request, #19181:
URL: https://github.com/apache/nuttx/pull/19181

   ## Summary
   
   List of patches:
   
   ### raspberrypi-4b/bmp280: Include optional registration of BMP280 driver
   
   This commit includes BMP280 driver registration on I2C1 in the RPi4B
   bringup logic _if_ the user selects the board-level configuration option
   (so as to not interfere with any user's custom implementation of
   interfacing with this sensor). A configuration is added with the BMP280
   registration, example program and `uorb_listener` that is also
   documented.
       
   ### raspberrypi-4b/i2c: Added I2C configuration
   
   Includes a new I2C configuration (and documentation for it) to use the
   I2C1 bus on the Raspberry Pi 4B.
   
   ### rpi4b/bringup: Use correct CONFIG option for I2C char driver
   
   Change the I2C character device registration to depend on the correct
   CONFIG option for enabling character drivers.
   
   ### bcm2711/i2c: Support I2C_M_NOSTOP/I2C_M_NOSTART properly
   
   This commit adds support for I2C transfers spread across multiple
   messages using the I2C_M_NOSTOP/I2C_M_NOSTART. The approach greedily
   merges as many sequential I2C messages together as possible and
   considers them as a single transfer.
   
   ### Related issues
   
   This is part of the GSoC project #18507; milestone 1 item 1 (I2C 
improvement).
   
   ## Impact
   
   1) BCM2711 I2C driver is improved to support flags required for many I2C
   devices, as per the discussion in #16937.
   
   2) An I2C configuration for the most commonly used bus (I2C1) is provided 
with
   the `i2ctool` for users to play with.
   
   3) A BMP280 configuration is supplied for users to play with a breakout 
board if
   they wish.
   
   ## Testing
   
   I tested using the `raspberrypi-4b:bmp280` configuration supplied in this 
patch.
   It includes all the functionality of `raspberrypi-4b:i2c1` and tests the I2C
   logic patch for supporting NO_STOP/NO_START flags. Here is the output of the
   bmp280 program being run on the device:
   
   ```console
   sh> - Ready to Boot Primary CPU
   - Boot from EL2
   - Boot from EL1
   - Boot to C runtime for OS Initialize
   
   NuttShell (NSH) NuttX-12.13.0
   nsh> 
   nsh> 
   nsh> ls /dev
   /dev:
    console
    i2c1
    null
    uorb/
    usensor
    zero
   nsh> bmp280
   Absolute pressure [hPa] = 697.700012
   Temperature [C] = 27.520000
   nsh> bmp280
   Absolute pressure [hPa] = 970.929993
   Temperature [C] = 26.040001
   nsh> bmp280
   Absolute pressure [hPa] = 970.969971
   Temperature [C] = 26.059999
   nsh> bmp280
   Absolute pressure [hPa] = 970.989990
   Temperature [C] = 26.070000
   ```
   
   And the I2C scanner:
   
   ```console
   nsh> i2c dev -b 1 00 77
   NOTE: Some devices may not appear with this scan.
   You may also try a scan with the -z flag to discover more devices using a 
zero-byte wri.
        0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
   00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   70: -- -- -- -- -- -- -- 77                         
   nsh> 
   ```
   
   Everything works as expected.


-- 
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