OSAL way to wait for an event?
Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess
OSAL way to wait for an event?
I really like all the hal uses osal way to handle all things, so hal can work on "any" os platform. Like in uart / can hal driver, hal_lld will use osalEventBroadcastFlagsI to broadcast an event when an isr fires. I also want to write my application in osal way so it can be also easily moved to another os. But I don't know how to wait on the event in osal way. I only know how to wait for the event in chibios rt way. Is there any example around that I can study of?
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: OSAL way to wait for an event?
Hi,
OSAL is just an interface from HAL to the underlying OS so it does not need a functionally complete API, waiting for events is not part of it, drivers just generate events so wait is not required. Rationale is to keep OSAL as simple as possible, extra API mean extra effort when porting to another OS.
In your application it is better to use the native RTOS and HAL API.
Giovanni
OSAL is just an interface from HAL to the underlying OS so it does not need a functionally complete API, waiting for events is not part of it, drivers just generate events so wait is not required. Rationale is to keep OSAL as simple as possible, extra API mean extra effort when porting to another OS.
In your application it is better to use the native RTOS and HAL API.
Giovanni
Who is online
Users browsing this forum: No registered users and 10 guests