A board support package for the LPC4088 Display Module.

Dependencies:   DM_HttpServer DM_USBHost

Dependents:   lpc4088_displaymodule_emwin lpc4088_displaymodule_demo_sphere sampleGUI sampleEmptyGUI ... more

Fork of DMSupport by EmbeddedArtists AB

Revision:
41:e06e764ff4fd
Parent:
34:fc366bab393f
--- a/RtosLog.cpp	Wed Jun 10 09:54:15 2015 +0000
+++ b/RtosLog.cpp	Wed Oct 23 06:59:29 2019 +0000
@@ -88,7 +88,8 @@
 void RtosLog::init()
 {
     if (_thr == NULL) {
-        _thr = new Thread(&RtosLog::logTask, this);
+        _thr = new Thread();
+        _thr->start(callback(&RtosLog::logTask, this));
     }
 }
 
@@ -97,7 +98,7 @@
     // The pool has no "wait for free message" so we use a Sempahore
     // to keep track of the number of free messages and, if needed,
     // block the caller until a message is free
-    _sem.wait();
+    _sem.acquire();
     
     // Allocate a null terminated message. Will always succeed due to
     // the semaphore above
@@ -136,8 +137,8 @@
     // The pool has no "wait for free message" so we use a Sempahore
     // to keep track of the number of free messages and, if needed,
     // block the caller until a message is free
-    int available = _sem.wait(0);
-    if (available <= 0) {
+    bool available = _sem.try_acquire();
+    if (!available) {
       // no free messages and it is not good to wait in an ISR so
       // we discard the message
       return 0;