Skip to content

Commit 43e770b

Browse files
committed
Forward port changes from v0.6 release branch
Merge doc fixes and a ESP32 GPIO fix from release-0.6 branch into main.
2 parents 0a0c8da + 6acfcb5 commit 43e770b

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
### Fixed
1616

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

1920
## [0.6.5] - 2024-10-15
2021

doc/src/programmers-guide.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,6 +1369,10 @@ To retrieve data in RTC slow memory, use the [`esp:rtc_slow_get_binary/0`](./api
13691369
Data = esp:rtc_slow_get_binary()
13701370
```
13711371
1372+
```{caution}
1373+
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.
1374+
```
1375+
13721376
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).
13731377
13741378
### Miscellaneous ESP32 APIs

src/platforms/esp32/components/avm_builtins/gpio_driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ static term nif_gpio_init(Context *ctx, int argc, term argv[])
660660
}
661661

662662
gpio_config_t config = {};
663-
config.pin_bit_mask = 1 << gpio_num;
663+
config.pin_bit_mask = 1ULL << gpio_num;
664664
config.mode = GPIO_MODE_DISABLE;
665665
config.pull_up_en = GPIO_PULLUP_DISABLE;
666666
config.pull_down_en = GPIO_PULLDOWN_DISABLE;

0 commit comments

Comments
 (0)