Skip to content

understanding the logics behind rtos:: vs mbed:: #332

Closed
@jerabaul29

Description

@jerabaul29

I am playing around on a few recipes, and one thing that confuses me is when I should use some rtos:: vs some mbed:: namespaces when using functions / classes from Mbed-OS. For example:

https://github.com/jerabaul29/Artemis_MbedOS_recipes/blob/dd4c9fcbfec38fb09a3675a494fb442119336247/recipes/recipe_reed/test_reed_switch_3pins/test_reed_switch_3pins.ino#L13

rtos::Mutex use_reed_values;

but:

https://github.com/jerabaul29/Artemis_MbedOS_recipes/blob/dd4c9fcbfec38fb09a3675a494fb442119336247/recipes/recipe_reed/test_reed_switch_3pins/test_reed_switch_3pins.ino#L29

      mbed::ScopedLock<rtos::Mutex> lock_reed{use_reed_values};
  • am I doing something wrong (cannot be that wrong, it compiles ^^), or more complicated than it needs?
  • what is the logics behind which prefix to use / am I / what am I missing? :)
  • is it possible that there is something in how the core is set up that actually makes this more complicated than it needs? Should / could all of rtos:: simply be mbed:: instead?

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