Closed AGlass0fMilk closed 4 years ago
This example project uses Mbed OS 6, maybe you should try with that.
This example project uses Mbed OS 6, maybe you should try with that.
Not sure why I didn't try that first. That fixed the compilation issue. Better to work with Mbed OS 6 anyway.
I created a new class,
AWSDetachedThread
, that captures the argument and routine context given by the AWS layer of the application. This is to avoid problems with starting a thread using a callback created with a lambda expression.I have used lambdas to create callbacks before with Mbed-OS but haven't seen this kind of error before:
I am building with mbed-os 5.15.4 (default for this example I think?) and it was failing to compile with the above error. I was not able to tweak the lambda declaration (using
mbed::callback
,mbed::Callback<void(void)>
, or any other more explicit declaration) to compile so I implemented the patch in this PR.