Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STM32 GPIO driver fixes #898

Merged
merged 4 commits into from
Oct 27, 2023
Merged

Conversation

bettio
Copy link
Collaborator

@bettio bettio commented Oct 26, 2023

This PR fixes few issues introduced with #836.

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

@bettio bettio requested a review from UncleGrumpy October 26, 2023 12:34
Copy link
Collaborator

@UncleGrumpy UncleGrumpy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These corrections all look right to me.

Also use TUPLE_SIZE(x) macro rather than hardcoded values.

Signed-off-by: Davide Bettio <[email protected]>
IS_NULL_PTR is already `UNLIKELY(x == NULL)`, no need to add UNLIKELY
also here.

Signed-off-by: Davide Bettio <[email protected]>
`globalcontext_make_atom` returns an atom term, so let's just use it when
needed.

Signed-off-by: Davide Bettio <[email protected]>
MUTABLE_LIST_FOR_EACH is useful only when changes are made to the list
while iterating over it, otherwise LIST_FOR_EACH is the right choice.

Signed-off-by: Davide Bettio <[email protected]>
@bettio bettio force-pushed the stm32_gpio_driver-fixes branch from 00573dc to 05e98e4 Compare October 27, 2023 12:35
@bettio bettio changed the title Stm32 gpio driver fixes STM32 GPIO driver fixes Oct 27, 2023
@bettio bettio marked this pull request as ready for review October 27, 2023 12:36
@bettio bettio merged commit f274873 into atomvm:master Oct 27, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants