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

Using in embedded systems #44

Closed
SergeTauger opened this issue Jul 28, 2021 · 3 comments
Closed

Using in embedded systems #44

SergeTauger opened this issue Jul 28, 2021 · 3 comments

Comments

@SergeTauger
Copy link

I'd like use HFSM2 in firmware for stm32, compiler is GNU ARM Embedded Toolchain (gcc 10.2 or 9.3.1). The problem is that both RTOSes and bare metal usually don't support stdlib and POSIX. Can I use the library as it is or some efforts to port are needed?

@andrew-gresyk
Copy link
Owner

Never tried that.
Give it a go!

@SergeTauger
Copy link
Author

I cannot get how event dispatching is done. Is that right that std::thread is not used and we should call update() in infinite loop? And I cannot find any usages of mutexes/semaphores in the code, so I have no idea how you implemented event queue. Could you please point me to the code that does dispatching?

@andrew-gresyk
Copy link
Owner

std::thread isn't used.
You should call update() in a loop after changeTo<>()
Or just call handleEvent()

There is no event queue, it's outside the scope of an FSM library
So is multithreading support

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