Skip to content

Commit be10e50

Browse files
committed
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. Signed-off-by: Winford <winford@object.stream>
1 parent 4b82c37 commit be10e50

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)