Skip to content

Commit

Permalink
MbedOS framework support (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
pstolarz authored Apr 6, 2022
1 parent 8a6a152 commit 94ef1cb
Show file tree
Hide file tree
Showing 17 changed files with 139 additions and 432 deletions.
3 changes: 3 additions & 0 deletions .mbedignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
components/*
examples/*
extras/*
41 changes: 31 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,24 +73,45 @@ configuring the library functionality. See the file for more details.

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

OneWireNg may be used as an external library for Espressif [ESP-IDF](https://github.com/espressif/esp-idf)
projects. To install, copy content of [`components`](components) directory
to project's directory with sym-link dereference:
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:

```
cp -rL ONEWIRENG_DIR/components ESP_PROJECT_DIR
```

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

```
ln -s ONEWIRENG_DIR/components/OneWireNg ESP_PROJECT_DIR/components/OneWireNg
```

While added the library may be configured via ESP-IDF menu based configuration
(no need to directly change `src/OneWireNg_Config.h` configuration file).
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.

### MbedOS

*NOTE: The library usage for MbedOS framework is experimental and was not tested.*

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

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

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
(see [`mbed_lib.json`](mbed_lib.json) for details). There is no need to directly
change `src/OneWireNg_Config.h` configuration file.

## Supported platforms

Expand All @@ -103,7 +124,7 @@ While added the library may be configured via ESP-IDF menu based configuration
* Arduino ESP8266/ESP-IDF.
* Platform class: `OneWireNg_ArduinoIdfESP8266`.
* Tested on WemOS D1
* Arduino/ESP-IDF ESP32 (classic, S and C families).
* Arduino/ESP-IDF ESP32 (classic, S, C and H families).
* Platform class: `OneWireNg_ArduinoIdfESP32`.
* Tested on ESP32-WROOM-32, ESP32-S2-WROVER, ESP32-C3-32S-Kit
* Arduino SAM.
Expand All @@ -115,7 +136,7 @@ While added the library may be configured via ESP-IDF menu based configuration
* Arduino STM32.
* Platform class: `OneWireNg_ArduinoSTM32`.
* **Not tested**.
* Arduino MbedOS based platforms (RP2040, Nano, Edge, Nicla, Portena).
* Arduino/MbedOS platforms (incl. RP2040, Nano, Edge, Nicla, Portena).
* Platform class: `OneWireNg_ArduinoMbedHAL`.
* **Not tested**.

Expand Down Expand Up @@ -156,7 +177,7 @@ The library supports two modes of providing a direct voltage source on the
an external power source to the bus and is controlled by a dedicated
power-control-GPIO as presented on the following figure.

![Switching transistor parasite powering](extras/schema/parasite.svg)
![Switching transistor parasite powering](extras/img/parasite.svg)

To enable the second mode the library needs to be configured with
`CONFIG_PWR_CTRL_ENABLED`.
Expand Down Expand Up @@ -214,7 +235,7 @@ For legacy AVR platforms the library need to be configured with

## Architecture details

![OneWirNg class diagram](extras/schema/classOneWireNg__inherit__graph.png)
![OneWirNg class diagram](extras/img/classOneWireNg__inherit__graph.png)

### `OneWireNg`

Expand Down
4 changes: 0 additions & 4 deletions components/OneWireNg/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ choice BITBANG_TIMING
bool "None"
endchoice

config EXT_VIRTUAL_INTF
bool "Enable extended virtual interface"
default n

config ITERATION_RETRIES
int "Search scan iteration retires"
default 0
Expand Down
File renamed without changes
Binary file added extras/schema.tar.gz
Binary file not shown.
110 changes: 0 additions & 110 deletions extras/schema/parasite-cache.lib

This file was deleted.

110 changes: 0 additions & 110 deletions extras/schema/parasite-rescue.lib

This file was deleted.

43 changes: 0 additions & 43 deletions extras/schema/parasite.pro

This file was deleted.

Loading

0 comments on commit 94ef1cb

Please sign in to comment.