Add support for the WeAct Studio STM32G431 Core board. Note that this
board does not support USB-C PD in its default configuration. See the
board documentation for the necessary hardware reconfiguration.
Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
Aliases, including usbc_port0, start counting from zero. This meant
that the DT alias is inconsistent with the port numbering in the
samples. Change the numbering scheme to start from zero to make this
consistent.
Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
Samples sometimes need to identify a default USB-C port. Instead of
hard-coding a node label, use the usbc-port0 alias to point to the
correct node.
Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
This migrates the subsys code samples to the new Sphinx code-sample
extension, making it easier to find relevant samples when browsing
API reference.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
During testing I've found one bad path and looked if
there is more.
I've used this oneliner to find more:
```
rg :zephyr-app: | awk '{ print $3 }' | while read dir
do
test -d $dir || echo $dir
done | grep '^samples' | grep -v '<' | sort | uniq
```
Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
Removed few VIF properties which are being hardcoded
Updated the script to parse source VIF XML and add information to
the output
Added optional Kconfig option to configure custom source VIF XML path
Cleaned up the code
Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com>
As both C and C++ standards require applications running under an OS to
return 'int', adapt that for Zephyr to align with those standard. This also
eliminates errors when building with clang when not using -ffreestanding,
and reduces the need for compiler flags to silence warnings for both clang
and gcc.
Most of these changes were automated using coccinelle with the following
script:
@@
@@
- void
+ int
main(...) {
...
- return;
+ return 0;
...
}
Approximately 40 files had to be edited by hand as coccinelle was unable to
fix them.
Signed-off-by: Keith Packard <keithp@keithp.com>
Instead of assigning the address of value to the temporary function
parameter, there should be a dereference of the pointer and assignment
of PDOs count to it.
Signed-off-by: Michał Barnaś <mb@semihalf.com>
The stm32g081b_eval board does not implement Dead Battery
functionality on PD Port2. Change the sample configuration
so that PD Port1 is used, which has Dead Battery support.
Signed-off-by: Sam Hurst <sbh1187@gmail.com>
Add CONFIG_USBC_CSM_SINK_ONLY=y to Sink's sample prj.conf.
This selects the Sink only Connection state machine
for the Sink sample and it explicitly show the user
of the Sink sample how the connection state machines are
selected.
Signed-off-by: Sam Hurst <sbh1187@gmail.com>
Generates XML file containing VIF policies by reading the device tree
using EDT.pickle generated during build
This script writes a subset of general and sink-pdo VIF policies in
output file
This script gets invoked during build if enabled through kconfig
The generated XML containing USB-C VIF policies could be used by
USB PD/Type-C analysers/testers to understand USB-C properties and
perform tests accordingly
Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com>
integration_platforms help us control what get built/executed in CI and
for each PR submitted. They do not filter out platforms, instead they
just minimize the amount of builds/testing for a particular
tests/sample.
Tests still run on all supported platforms when not in integration mode.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Implementing USB-C Sink functionality can be difficult.
This sample application serves as an example of how
to create an application with Power Delivery Sink
functionality.
Signed-off-by: Sam Hurst <sbh1187@gmail.com>