@@ -14,7 +14,7 @@ pub const pdFALSE: BaseType_t = 0;
14
14
pub const pdTRUE: BaseType_t = 1 ;
15
15
pub const semGIVE_BLOCK_TIME: TickType_t = 0 ;
16
16
pub const queueSEND_TO_BACK: BaseType_t = 0 ;
17
- pub const tskNO_AFFINITY: BaseType_t = BaseType_t :: max_value ( ) ;
17
+ const tskNO_AFFINITY: BaseType_t = BaseType_t :: max_value ( ) ;
18
18
pub const errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY: BaseType_t = -1 ;
19
19
20
20
extern "C" {
@@ -44,6 +44,16 @@ extern "C" {
44
44
#[ link_name = "xQueueCreateCountingSemaphore" ]
45
45
pub fn xSemaphoreCreateCounting ( max : UBaseType_t , initial : UBaseType_t ) -> SemaphoreHandle_t ;
46
46
pub fn xPortGetTickRateHz ( ) -> u32 ;
47
+ #[ cfg( target_device = "esp8266" ) ]
48
+ pub fn xTaskCreate (
49
+ pxTaskCode : TaskFunction_t ,
50
+ pcName : * const libc:: c_char ,
51
+ usStackDepth : u32 ,
52
+ pvParameters : * const libc:: c_void ,
53
+ uxPriority : UBaseType_t ,
54
+ pxCreatedTask : * mut TaskHandle_t ,
55
+ ) -> BaseType_t ;
56
+ #[ cfg( target_device = "esp32" ) ]
47
57
pub fn xTaskCreatePinnedToCore (
48
58
pxTaskCode : TaskFunction_t ,
49
59
pcName : * const libc:: c_char ,
@@ -55,6 +65,19 @@ extern "C" {
55
65
) -> BaseType_t ;
56
66
}
57
67
68
+ #[ cfg( target_device = "esp32" ) ]
69
+ #[ inline]
70
+ pub unsafe fn xTaskCreate (
71
+ pxTaskCode : TaskFunction_t ,
72
+ pcName : * const libc:: c_char ,
73
+ usStackDepth : u32 ,
74
+ pvParameters : * const libc:: c_void ,
75
+ uxPriority : UBaseType_t ,
76
+ pxCreatedTask : * mut TaskHandle_t ,
77
+ ) -> BaseType_t {
78
+ xTaskCreatePinnedToCore ( pxTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pxCreatedTask, tskNO_AFFINITY)
79
+ }
80
+
58
81
#[ inline]
59
82
pub unsafe fn xSemaphoreCreateRecursiveMutex ( ) -> SemaphoreHandle_t {
60
83
xQueueCreateMutex ( queueQUEUE_TYPE_RECURSIVE_MUTEX)
0 commit comments