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

ATC_CheckEvents not work #11

Open
w1350625043 opened this issue Oct 31, 2024 · 5 comments
Open

ATC_CheckEvents not work #11

w1350625043 opened this issue Oct 31, 2024 · 5 comments

Comments

@w1350625043
Copy link

hAtc->Events No initialization for (uint32_t ev = 0; ev < hAtc->Events; ev++) Always false

@w1350625043
Copy link
Author

bool ATC_SetEvents(ATC_HandleTypeDef* hAtc, const ATC_EventTypeDef* psEvents)
{
bool answer = false;
uint32_t ev = 0;
do
{
if (hAtc == NULL)
{
break;
}
if (psEvents == NULL)
{
break;
}
while ((psEvents[ev].Event != NULL) && (psEvents[ev].EventCallback != NULL))
{
ev++;
}
hAtc->psEvents = (ATC_EventTypeDef*)psEvents;
answer = true;
hAtc->Events = ev;
} while (0);

return answer;
}

@nimaltd
Copy link
Owner

nimaltd commented Oct 31, 2024

Hi. How did you initialize?

@w1350625043
Copy link
Author

微信图片_20241101103821

@w1350625043
Copy link
Author

I added hAtc->Events = ev; on line 366 of the atc.c file, and the program is running normally.

@nimaltd
Copy link
Owner

nimaltd commented Nov 1, 2024

I will check

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

No branches or pull requests

2 participants