MCUs: update deprecated use of term_from_int32 - #2241
Conversation
90bf284 to
0bd3c10
Compare
There was a problem hiding this comment.
All values encoded in adc_driver.c with term_from_int28 are 17 bits or less.
0bd3c10 to
793c199
Compare
793c199 to
4bb7414
Compare
|
Know this extends the scope - but the last remaining is below: Remaining
|
064164e to
2dcde17
Compare
2dcde17 to
9d2a026
Compare
|
This should take care of all of the remaining uses of |
Update the use of deprecated `term_from_int32` to `term_from_int11` for encoding gpio pin values. The values will fit in an int4, but the type is uint16_t, so `term_to_int11` is used for correctness. Signed-off-by: Winford <winford@object.stream>
Change all uses of the `term_from_int32` to `term_from_int11`, which is of adequate size to contain all of the encoded terms. Signed-off-by: Winford <winford@object.stream>
Replace use of `term_from_int32` other safe term_from_int* variants. Signed-off-by: Winford <winford@object.stream>
Updates use of deprecated `term_from_int32` to `term_from_int` when encoding the `send_timeout_ms` value. Signed-off-by: Winford <winford@object.stream>
Update the use of `term_from_int32` to encode `port` (`u16_t`) values to the new `term_from_int28`. Signed-off-by: Winford <winford@object.stream>
Update the use of deprecated `term_from_int32` to `term_from_int11` for encoding gpio pin values. The 11-bit value is more than enough to allow for the number of pins available on any ESP32 for many years. Signed-off-by: Winford <winford@object.stream>
Update deprecated `term_from_int32` to use `term_from_int28`. See also: atomvm#1897 Signed-off-by: Winford <winford@object.stream>
9d2a026 to
dcab3cd
Compare
Merge fixes, features, and optimizations from release-0.7, including: - JIT: Add WASM32 backend with emscripten integration (#2260) - Add SPI support to STM32 platform (#2127) - Add network:wifi_scan/0,1 to esp32 network driver (#1165) - Add serial (UART) distribution support (#2249) - Add more reset reasons to esp:reset_reason/0 (#2275) - Implement nif_start, executable_line and debug_line opcodes (#2264) - MCUs: update deprecated use of term_from_int32 (#2241) - Fix JIT crash on scheduler destroy by joining threads (#2280) - Fix race condition in context_destroy (#2277) - JIT x86-64: fix xorq encoding to use signed shorter form (#2278) - JIT arm32: assemble push/pop with single reg as gnu as does (#2276) - Fix sign of result of several functions from binary module (#2256) - Fix offset and mod_offset sign using size_t (#2266) - Fix warning with os:system_time/1 (#2265) - Fix test_timer assertions (#2261) - Normalize system_architecture strings (#2171) - emscripten: Use EXPORT_ES6 setting and .mjs suffix (#2273) - RP2: Improve initial flash message (#2122) - CI: Rename pico combined for sorting (#2220) - STM32 CI: Use tag release for renode 1.16.1 (#2268) - CI: Fix macos - use setup-beam for gleam (#2263)
Update all MCU platforms useage of
term_from_int32to safer variants ofterm_from_int*See also: #1897
These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).
SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later