Skip to content

Commit

Permalink
Forward port changes from v0.6 release branch
Browse files Browse the repository at this point in the history
Merge doc fixes and a ESP32 GPIO fix from release-0.6 branch into main.
  • Loading branch information
bettio committed Nov 10, 2024
2 parents 0a0c8da + 6acfcb5 commit 43e770b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Fixed specifications of nifs from `esp_adc` module
- ESP32: fix `gpio:init/1` on GPIO >= 32

## [0.6.5] - 2024-10-15

Expand Down
4 changes: 4 additions & 0 deletions doc/src/programmers-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -1369,6 +1369,10 @@ To retrieve data in RTC slow memory, use the [`esp:rtc_slow_get_binary/0`](./api
Data = esp:rtc_slow_get_binary()
```
```{caution}
Calling [`esp:rtc_slow_get_binary/0`](./apidocs/erlang/eavmlib/esp.md#rtc_slow_get_binary0) without having stored a binary first using [`esp:rtc_slow_set_binary/1`](./apidocs/erlang/eavmlib/esp.md#rtc_slow_set_binary1), will raise with badarg. So make sure to wrap such a call with a try/catch or similar.
```
By default, RTC slow memory in AtomVM is limited to 4098 (4k) bytes. This value can be modified at build time using an IDF SDK `KConfig` setting. For instructions about how to build AtomVM, see the AtomVM [Build Instructions](./build-instructions.md#building-for-esp32).
### Miscellaneous ESP32 APIs
Expand Down
2 changes: 1 addition & 1 deletion src/platforms/esp32/components/avm_builtins/gpio_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ static term nif_gpio_init(Context *ctx, int argc, term argv[])
}

gpio_config_t config = {};
config.pin_bit_mask = 1 << gpio_num;
config.pin_bit_mask = 1ULL << gpio_num;
config.mode = GPIO_MODE_DISABLE;
config.pull_up_en = GPIO_PULLUP_DISABLE;
config.pull_down_en = GPIO_PULLDOWN_DISABLE;
Expand Down

0 comments on commit 43e770b

Please sign in to comment.