Skip to content

Commit 6bfa91e

Browse files
committed
Merge pull request #1332 from UncleGrumpy/stm32_fixup
Fix bug in STM32 GPIO driver There was an incorrect case of passing the pointer to the atom string, instead of the atom index itself in the gpiodriver_set_int function. On more recent versions of arm-none-eabi compiler this is a compiler error, on some previous versions it was a warning, that must have been overlooked. 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
2 parents 7c86cc8 + be10e50 commit 6bfa91e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/platforms/stm32/src/lib/gpio_driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ static term gpiodriver_set_int(Context *ctx, int32_t target_pid, term cmd)
812812
term pid = term_get_tuple_element(cmd, 3);
813813
if (UNLIKELY(!term_is_pid(pid) && !term_is_atom(pid))) {
814814
AVM_LOGE(TAG, "Invalid listener parameter, must be a pid() or registered process!");
815-
return create_pair(ctx, ERROR_ATOM, invalid_listener_atom);
815+
return create_pair(ctx, ERROR_ATOM, globalcontext_make_atom(ctx->global, invalid_listener_atom));
816816
}
817817
if (term_is_pid(pid)) {
818818
target_local_pid = term_to_local_process_id(pid);

0 commit comments

Comments
 (0)