Adding ability to set priority for the Rx thread
Fork of ublox-at-cellular-interface by
Revision 16:0f66548832a3, committed 2018-10-30
- Comitter:
- amq
- Date:
- Tue Oct 30 17:57:41 2018 +0000
- Parent:
- 15:8cc9a80ac0ad
- Commit message:
- Add ability to set priority for the Rx thread
Changed in this revision
| UbloxATCellularInterface.cpp | Show annotated file Show diff for this revision Revisions of this file |
| UbloxATCellularInterface.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/UbloxATCellularInterface.cpp Mon Mar 26 15:33:40 2018 +0100
+++ b/UbloxATCellularInterface.cpp Tue Oct 30 17:57:41 2018 +0000
@@ -938,7 +938,8 @@
UbloxATCellularInterface::UbloxATCellularInterface(PinName tx,
PinName rx,
int baud,
- bool debug_on)
+ bool debug_on
+ osPriority priority)
{
_sim_pin_check_change_pending = false;
_sim_pin_check_change_pending_enabled_value = false;
@@ -969,6 +970,7 @@
// Start the event handler thread for Rx data
event_thread.start(callback(this, &UbloxATCellularInterface::handle_event));
+ event_thread.set_priority(priority);
// URC handlers for sockets
_at->oob("+UUSORD", callback(this, &UbloxATCellularInterface::UUSORD_URC));
--- a/UbloxATCellularInterface.h Mon Mar 26 15:33:40 2018 +0100
+++ b/UbloxATCellularInterface.h Tue Oct 30 17:57:41 2018 +0000
@@ -74,7 +74,8 @@
UbloxATCellularInterface(PinName tx = MDMTXD,
PinName rx = MDMRXD,
int baud = MBED_CONF_UBLOX_CELL_BAUD_RATE,
- bool debug_on = false);
+ bool debug_on = false,
+ osPriority priority = osPriorityNormal);
/* Destructor.
*/
