Adding ability to set priority for the Rx thread

Fork of ublox-at-cellular-interface by u-blox

Files at this revision

API Documentation at this revision

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
diff -r 8cc9a80ac0ad -r 0f66548832a3 UbloxATCellularInterface.cpp
--- 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));
diff -r 8cc9a80ac0ad -r 0f66548832a3 UbloxATCellularInterface.h
--- 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.
       */