-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Refactored away onboard_modem_api because it is not needed at all #12092
Conversation
targets/TARGET_STM/TARGET_STM32L4/TARGET_MTS_DRAGONFLY_L471QG/ONBOARD_SARA4_PPP.cpp.autosave
Outdated
Show resolved
Hide resolved
@AnttiKauppila, thank you for your changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could still have qualified lookup for C functions..?
be39dbe
to
4b3b135
Compare
cc @ARMmbed/team-ublox @ARMmbed/team-multitech |
CI started |
4b3b135
to
8d63ebd
Compare
Unittests fixed |
Test run: FAILEDSummary: 4 of 4 test jobs failed Failed test jobs:
|
|
||
gpio_init_out_ex(&gpio, PIN_NAME_CELL_ON_OFF, 1); | ||
gpio_write(&gpio, 0); | ||
thread_sleep_for(time_ms); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the calls to thread_sleep_for()
be changed to ThisThread::sleep_for()
since this is now C++ and not C? I suppose the least amount of change the better to preserve functionality, but it's also good to follow convention. This would then apply to all affected modules as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't a matter of convention - the C version is guaranteed always available, as it's in platform
. The C++ one is in rtos-api
, which might not be in a minimal build (via requires: "bare-metal"
or .mbedignore rtos
). So the C version is appropriate for HAL code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, thanks for the clarification.
|
||
void onboard_modem_power_up(); | ||
|
||
void onboard_modem_power_down(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we consider making these functions public? Making them private restricts power optimization efforts at the application level which were previously available in the onboard_modem_api.c
functions (e.g. turning off the cell module when not in use).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect the power control from application end to be via higher-level calls to the cellular framework - those calls were always viewed as "driver core to hardware glue" type calls, and would be only part of the power saving. (You'd want to do serial port suspension too).
Whether higher-level application appropriate calls currently exist is another matter.
CI restarted |
Test run: FAILEDSummary: 3 of 4 test jobs failed Failed test jobs:
|
@AnttiKauppila it looks like a previous merge has caused this to need a rebase. |
8d63ebd
to
d7de9c1
Compare
Test run: FAILEDSummary: 3 of 4 test jobs failed Failed test jobs:
|
All targets must implement soft_- and hard_power_on/off() functions which are practically same what onboard_modem_api offered. These were seen as a duplicate features and therefore we removed this. All targets involved have been updated to reflect the changes
d7de9c1
to
4436abb
Compare
Build issue fixed |
Test run: FAILEDSummary: 3 of 4 test jobs failed Failed test jobs:
|
4436abb
to
3a10982
Compare
One more fix done |
Test run: SUCCESSSummary: 12 of 12 test jobs passed |
Restarted ci after update |
Test run: FAILEDSummary: 1 of 12 test jobs failed Failed test jobs:
|
DISCO L475 serial error. CI restarted |
Test run: SUCCESSSummary: 12 of 12 test jobs passed |
Summary of changes
Refactored away onboard_modem_api because it is not needed at all
All targets must implement soft_- and hard_power_on/off() functions which are practically same what onboard_modem_api offered.
These were seen as a duplicate features and therefore we removed this.
All targets involved have been updated to reflect the changes as this is "an internal feature break"
This will clean up the needed logic for Mbed OS internal targets which are defined in targets.json. Less configuration = easier to maintain for everybody!
Also moved non-IP socket related classes into netsocket root folder. This won't break anything due to our build system.
Impact of changes
All cellular modems having onboard modem are affected. Code has been updated to reflect the changes.
Migration actions required
onboard_modem_api.h removed
Documentation
Refactored away onboard_modem_api because it is not needed at all
All targets must implement soft_- and hard_power_on/off() functions which are practically same what onboard_modem_api offered.
These were seen as a duplicate features and therefore we removed this.
All targets involved have been updated to reflect the changes as this is "an internal feature break"
Pull request type
Test results
Reviewers
@ARMmbed/mbed-os-wan