26
26
* STATIC MEMBER DECLARATION
27
27
**************************************************************************************/
28
28
29
- rtos::EventFlags ArduinoThreads ::_global_events;
29
+ rtos::EventFlags Arduino_Threads ::_global_events;
30
30
31
31
/* *************************************************************************************
32
32
* CTOR/DTOR
33
33
**************************************************************************************/
34
34
35
- ArduinoThreads::ArduinoThreads ()
35
+ Arduino_Threads::Arduino_Threads ()
36
36
: _start_flags{0 }
37
37
, _stop_flags{0 }
38
38
, _loop_delay_ms{0 }
39
39
{
40
40
41
41
}
42
42
43
- ArduinoThreads ::~ArduinoThreads ()
43
+ Arduino_Threads ::~Arduino_Threads ()
44
44
{
45
45
terminate ();
46
46
}
@@ -49,31 +49,31 @@ ArduinoThreads::~ArduinoThreads()
49
49
* PUBLIC MEMBER FUNCTIONS
50
50
**************************************************************************************/
51
51
52
- void ArduinoThreads ::start (int const stack_size, uint32_t const start_flags, uint32_t const stop_flags)
52
+ void Arduino_Threads ::start (int const stack_size, uint32_t const start_flags, uint32_t const stop_flags)
53
53
{
54
54
_start_flags = start_flags;
55
55
_stop_flags = stop_flags;
56
56
_thread.reset (new rtos::Thread (osPriorityNormal, stack_size, nullptr , _tabname));
57
- _thread->start (mbed::callback (this , &ArduinoThreads ::threadFunc));
57
+ _thread->start (mbed::callback (this , &Arduino_Threads ::threadFunc));
58
58
}
59
59
60
- void ArduinoThreads ::terminate ()
60
+ void Arduino_Threads ::terminate ()
61
61
{
62
62
_thread->terminate ();
63
63
_thread->join ();
64
64
}
65
65
66
- void ArduinoThreads ::sendEvent (uint32_t const event)
66
+ void Arduino_Threads ::sendEvent (uint32_t const event)
67
67
{
68
68
_thread->flags_set (event);
69
69
}
70
70
71
- void ArduinoThreads ::setLoopDelay (uint32_t const delay)
71
+ void Arduino_Threads ::setLoopDelay (uint32_t const delay)
72
72
{
73
73
_loop_delay_ms = delay;
74
74
}
75
75
76
- void ArduinoThreads ::broadcastEvent (uint32_t const event)
76
+ void Arduino_Threads ::broadcastEvent (uint32_t const event)
77
77
{
78
78
_global_events.set (event);
79
79
}
@@ -82,7 +82,7 @@ void ArduinoThreads::broadcastEvent(uint32_t const event)
82
82
* PRIVATE MEMBER FUNCTIONS
83
83
**************************************************************************************/
84
84
85
- void ArduinoThreads ::threadFunc ()
85
+ void Arduino_Threads ::threadFunc ()
86
86
{
87
87
setup ();
88
88
/* If _start_flags have been passed then wait until all the flags are set
0 commit comments