fdcavalcanti opened a new pull request, #18406:
URL: https://github.com/apache/nuttx/pull/18406
## Summary
This PR adds three new defconfigs to `esp32-devkitc`: `gpio`, `i2c` and
`spi`. Those are available on other boards but were missing from the
`esp32-devkitc`.
<!-- This field should contain a summary of the changes. It will be
pre-filled with the commit's message and descriptions. Adjust it accordingly -->
* documentation: update ESP32 docs for spi, gpio and i2c
Adds description for the GPIO, SPI and I2C defconfigs for the
esp32-devkitc board.
* board/xtensa/esp32: add SPI defconfig
Add SPI defconfig for ESP32-DevKit-C.
* board/xtensa/esp32: add GPIO defconfig
Add a GPIO defconfig for ESP32-DevKit-C.
* boards/xtensa/esp32: add I2C defconfig and update board source
Add I2C defconfig to esp32-devkitc board and update some board
ifdefs.
* arch/xtensa/esp32: select I2C_DRIVER on I2C
Automatically select I2C_DRIVER when ESP32_I2C is selected.
## Impact
<!-- Please fill the following sections with YES/NO and provide a brief
explanation -->
Impact on user: New defconfigs available: gpio, spi, i2c.
Impact on build: No.
Impact on hardware: Only ESP32 devices.
Impact on documentation: Adds defconfig description on the esp32-devkitc
page.
Impact on security: No.
Impact on compatibility: No.
## Testing
### Building
Build each of the new defconfigs and flash the board:
```
./tools/configure.sh esp32-devkitc:spi
./tools/configure.sh esp32-devkitc:i2c
./tools/configure.sh esp32-devkitc:gpio
```
### Running
Merge and flash as usual.
### Results
- SPI:
```
nsh> ls /dev
/dev:
console
null
spi2
ttyS0
zero
nsh> spi bus
BUS EXISTS?
Bus 2: YES
Bus 3: NO
```
- GPIO:
```
nsh> ls /dev
/dev:
console
gpio0
gpio1
gpio2
null
ttyS0
zero
nsh> gpio -o 1 /dev/gpio0
Driver: /dev/gpio0
Output pin: Value=0
Writing: Value=1
Verify: Value=1
```
- I2C:
```
nsh> ls /dev
/dev:
console
i2c0
null
ttyS0
zero
nsh> i2c bus
BUS EXISTS?
Bus 0: YES
Bus 1: NO
Bus 2: NO
Bus 3: NO
```
--
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]