The variable "st_result" is not initialized. In addition, the function "l3gd20h_self_test" only sets the variable "st_result" to be ST_FAIL if the test condition is violated. It turns out that the function "l3gd20h_self_test" always outputs "Self Test - FAIL".
Additional context
Add any other context about the problem here. (ie: hardware description, compiler used, etc...)
Device part numbers
l3gd20h
Type of bug
examples/l3gd20h_self_test.c
Describe the bug
The variable "st_result" is not initialized. In addition, the function "l3gd20h_self_test" only sets the variable "st_result" to be ST_FAIL if the test condition is violated. It turns out that the function "l3gd20h_self_test" always outputs "Self Test - FAIL".
Additional context
Add any other context about the problem here. (ie: hardware description, compiler used, etc...)