Extends support for more hardware by supporting the following:
- Uarts where tx and rx pins are on different ports.
- Peripherals that are UARTs, not USARTs.
Adds the following new config options which default to
PW_SYS_IO_STM32CUBE_GPIO_PORT for backwards compatibility:
- PW_SYS_IO_STM32CUBE_GPIO_TX_PORT
- PW_SYS_IO_STM32CUBE_GPIO_RX_PORT
Adds the following new config option which default to USART:
- PW_SYS_IO_STM32CUBE_USART_PREFIX
For example, this was useful with the following config on an STM32H7:
PW_SYS_IO_STM32CUBE_GPIO_AF=8
PW_SYS_IO_STM32CUBE_USART_NUM=5
PW_SYS_IO_STM32CUBE_GPIO_TX_PORT=C
PW_SYS_IO_STM32CUBE_GPIO_TX_PIN=12
PW_SYS_IO_STM32CUBE_GPIO_RX_PORT=D
PW_SYS_IO_STM32CUBE_GPIO_RX_PIN=2
PW_SYS_IO_STM32CUBE_USART_PREFIX=UART
Change-Id: I9cbd2742dd2fc3ff031874f18dc80241e6c7675d
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/105540
Reviewed-by: Armando Montanez <amontanez@google.com>
Pigweed-Auto-Submit: Armando Montanez <amontanez@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
This changes uses of std::span to pw::span. No changes are made to build
dependencies in this commit.
This change was made with the following shell script:
#!/bin/bash
readonly FILES="$(git ls-files '*.rst' '*.md' '*.h' '*.cc' '*.py')"
readonly PW_NS_FILES="$(git grep -l 'namespace pw\>' | grep -v generate_decoding_test_data.cc)"
echo "Updating #includes"
sed -i --follow-symlinks \
's/#include <span>/#include "pw_span\/span.h"/g' ${FILES}
for name in span as_bytes as_writable_bytes dynamic_extent; do
echo Renaming std::$name to pw::$name
sed -i --follow-symlinks "s/std::$name/pw::$name/g" ${FILES}
sed -i --follow-symlinks "s/pw::$name/$name/g" ${PW_NS_FILES}
sed -i --follow-symlinks "s/using $name;//" ${PW_NS_FILES}
done
git checkout pw_span
pw format -b origin/main --fix
Bug: b/235237667
Change-Id: I32edfbcb7cadf3ab39009596fdb7275fcc5ea3f5
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/98264
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Ted Pudlik <tpudlik@google.com>
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Adds a PW_SYS_IO_STM32CUBE_GPIO_AF config.h option to
pw_sys_io_stm32cube to support STM32G0 and any other STM32 family
members that use different alternate functions for uarts.
Change-Id: I7c0677b9ef707051a9d9f3f224b5e7bf171682d0
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/90180
Reviewed-by: Armando Montanez <amontanez@google.com>
Commit-Queue: Armando Montanez <amontanez@google.com>
Cleans up pw_sys_io_stm32cube to provide docs, use Pigweed's established
config pattern, and use PW_CONCAT() rather than the one-off concat macro
helper.
Change-Id: Ie822f3b1efa164e4bb1f4310ea8f8d6ed7658da0
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/73962
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Armando Montanez <amontanez@google.com>