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

Fix analogin scaling for EFM32 target #5223

Merged
merged 1 commit into from Oct 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions targets/TARGET_Silicon_Labs/TARGET_EFM32/analogin_api.c
Expand Up @@ -99,8 +99,8 @@ uint16_t analogin_read_u16(analogin_t *obj)

float analogin_read(analogin_t *obj)
{
/* Convert from a uint16 to a float between 0 and 1 by division by 0xFFFF */
return analogin_read_u16(obj) / (float) 0xFFFF;
/* Convert from a uint16 to a float between 0 and 1 by division by 0xFFF0 */
return analogin_read_u16(obj) / (float) 0xFFF0;
}

#endif