Skip to content

Commit

Permalink
ESP-IDF: component directory structure changed
Browse files Browse the repository at this point in the history
  • Loading branch information
pstolarz committed Apr 9, 2022
1 parent f4899a8 commit 4f51305
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 27 deletions.
File renamed without changes.
File renamed without changes.
40 changes: 17 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,45 +73,39 @@ configuring the library functionality. See the file for more details.

### ESP-IDF (incl. ESP8266 RTOS SDK)

To use OneWireNg as a library for Espressif [ESP-IDF](https://github.com/espressif/esp-idf)
project, copy content of [`components`](components) directory to project's
directory with sym-link dereference:
Preferred way to add OneWireNg as a library for Espressif [ESP-IDF](https://github.com/espressif/esp-idf)
framework is to add it as a git submodule located at project's `components`
subdirectory:

```
cp -rL ONEWIRENG_DIR/components ESP_PROJECT_DIR
git submodule add -- https://github.com/pstolarz/OneWireNg components/OneWireNg
```

Alternatively, if it's preferred to have single copy of sources for each external
component (e.g. by using git sub-modules), create a sym-link for OneWireNg as
ESP-IDF component inside project's directory structure:
Next checkout specific library `VERSION`:

```
ln -s ONEWIRENG_DIR/components/OneWireNg ESP_PROJECT_DIR/components/OneWireNg
cd components/OneWireNg
git checkout VERSION
```

While added the library shall be configured via ESP-IDF native configuration
(Kconfig based). There is no need to directly change `src/OneWireNg_Config.h`
configuration file.
(see [`Kconfig`](Kconfig) for details). There is no need to directly change
`OneWireNg_Config.h` configuration file.

### MbedOS
### Mbed OS

*NOTE: The library usage for MbedOS framework is experimental and was not tested.*
*NOTE: The library usage for [Mbed OS](https://os.mbed.com) framework is
experimental and was not tested.*

To add OneWireNg as a library for MbedOS project use (for latest `master` commit):
To add OneWireNg as a library for Mbed OS project use (for specific `VERSION`):

```
mbed add https://github.com/pstolarz/OneWireNg
mbed add https://github.com/pstolarz/OneWireNg#VERSION
```

or pick up a specific version (e.g. 0.11.0):

```
mbed add https://github.com/pstolarz/OneWireNg#0.11.0
```

While added the library shall be configured via MbedOS native configuration
While added the library shall be configured via Mbed OS native configuration
(see [`mbed_lib.json`](mbed_lib.json) for details). There is no need to directly
change `src/OneWireNg_Config.h` configuration file.
change `OneWireNg_Config.h` configuration file.

## Supported platforms

Expand All @@ -136,7 +130,7 @@ change `src/OneWireNg_Config.h` configuration file.
* Arduino STM32.
* Platform class: `OneWireNg_ArduinoSTM32`.
* **Not tested**.
* Arduino/MbedOS platforms (incl. RP2040, Nano, Edge, Nicla, Portena).
* Arduino/Mbed OS platforms (incl. RP2040, Nano, Edge, Nicla, Portena).
* Platform class: `OneWireNg_ArduinoMbedHAL`.
* **Not tested**.

Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion components/OneWireNg/src

This file was deleted.

6 changes: 3 additions & 3 deletions src/platform/OneWireNg_ArduinoMbedHAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
#include "platform/Platform_TimeCritical.h"

/**
* Arduino MbedOS based platform GPIO specific implementation via HAL API.
* Arduino Mbed OS based platform GPIO specific implementation via HAL API.
*/
class OneWireNg_ArduinoMbedHAL: public OneWireNg_BitBang
{
public:
/**
* OneWireNg 1-wire service for Arduino MbedOS based platform.
* OneWireNg 1-wire service for Arduino Mbed OS based platform.
*
* Bus powering is supported via switching its GPIO to the high state.
* In this case the GPIO servers as a voltage source for connected slaves
Expand All @@ -49,7 +49,7 @@ class OneWireNg_ArduinoMbedHAL: public OneWireNg_BitBang

#ifdef CONFIG_PWR_CTRL_ENABLED
/**
* OneWireNg 1-wire service for Arduino MbedOS based platform.
* OneWireNg 1-wire service for Arduino Mbed OS based platform.
*
* Bus powering is supported via a switching transistor providing
* the power to the bus and controlled by a dedicated GPIO (@see
Expand Down

0 comments on commit 4f51305

Please sign in to comment.