Skip to content
Snippets Groups Projects
Luiz Fernando Lavado Villa's avatar
Luiz Fernando Lavado Villa authored
To use other ADCs on the board, it is necessary to add them to the DTS. This commit is dedicate to DTS improvements.

A new adc-channel was added "ANALOG_COMM".
ADC4 was added at the adc.dtsi
The PB15 pin was added to the pin control. It corresponds to the 5th channel of ADC4.
The ADC4 was also added to the owntech_board.dts, where it is activated and its channel declared.
ccbae3a0
History
Name Last commit Last update
src
zephyr
.gitignore
LICENSE
README.md
platformio.ini

This is the OwnTech Power API Core repository.

The OwnTech Power API is modular, allowing to automatically select libraries for use with the power converter. Using the Core repository, you can work with OwnTech Power API Libraries, which are automatically downloaded on demand.

The Power API is designed to be used with VS Code and PlatformIO. More information about PlatformIO on VS code.

Downloading OwnTech Power API Core

You fisrt need to clone the Core repository using the following command:

git clone https://gitlab.laas.fr/owntech/power-api/core.git owntech_power_api

Then, open VS Code and, if not already done, install the PlatformIO plugin.

Finall, open the newly cloned folder owntech_power_api using menu File > Open Folder...

Working with OwnTech Power API

The hierarchy of the project is as follows:

owntech_power_api
└─ src
|  └─ main.cpp
|  └─ owntech.ini
└─ zephyr
|  └─ boards
|  └─ modules
|  └─ [...]
└─ LICENSE
└─ README.md
└─ [...]

You will want to work in the src folder, other folders and files are used to configure the underlying Zephyr OS and PlatformIO. Power users may want to tweak them too. Is so, please checkout the Zephyr documentation.

In the src folder, the file main.cpp is the entry point of the application. The file owntech.ini is used to configure the Power API Libraries you want to use.

Working with OwnTech Power API Libraries

To enable a Power API Library, edit the src/owntech.ini file. In this file, you'll find various commented libraries references. Simply uncomment a line to enable the corresponding library. You can also add any PlatformIO library in this file.