Skip to content

Get rid of while loop in freertos rpmsg init function #222

@Hadatko

Description

@Hadatko

Hi @MichalPrincNXP,
do you think we can get rid of this while loop using some rtos specific call? For example wait for event.
I think we would need change rpmsg itself. There can be bm poll, wait functions and freertos wait.
BM poll is rpmsg_lite_is_link_up(s_rpmsg)
BM wait can be: while (0 == rpmsg_lite_is_link_up(s_rpmsg)){ }
Freertos wait: while(xEventGroupWaitBits(rpmsgGroup, RPMSG_WAIT_FOR_LINK, FALSE, TRUE, portMAX_DELAY) & (RPMSG_WAIT_FOR_LINK) == 0){}

so if rpmsg_lite_tx_callback do this: rpmsg_lite_dev->link_state = 1U; in case of freertos it can do also
xEventGroupSetBits(rpmsgGroup,RPMSG_WAIT_FOR_LINK)

while (0 == rpmsg_lite_is_link_up(s_rpmsg))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions