Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
Hi,
I just got started with mbed, i'm using:
I'm trying to create a Thread passing an argument to it by using the following Thread constructor:
This is my code:
#include "mbed.h" #include "stats_report.h" DigitalOut led1(LED1); void led_thread(uint8_t toggle_time) { while (true) { led1 = !led1; wait(toggle_time); } } uint8_t green_led_toggle_time = 1; // main() runs in its own thread in the OS int main(void) { Thread thread( &green_led_toggle_time, led_thread, osPriorityNormal /* thread priority */, OS_STACK_SIZE /* stack_size */, NULL /* stack_mem */ ); while (true) { } }I'm having the following error:
Quote:
no matching constructor for initialization of rtos::Thread
I haven't been able to find examples similar to what i want to do, maybe my google-foo isn't working tho.