FreeRTOS type updates. (#261)
This commit is contained in:
parent
4c84b64566
commit
a5cc728079
53 changed files with 151 additions and 148 deletions
|
@ -35,7 +35,7 @@
|
|||
namespace esp_open_rtos {
|
||||
namespace timer {
|
||||
|
||||
#define __millis() (xTaskGetTickCount() * portTICK_RATE_MS)
|
||||
#define __millis() (xTaskGetTickCount() * portTICK_PERIOD_MS)
|
||||
|
||||
/******************************************************************************************************************
|
||||
* countdown_t
|
||||
|
@ -93,7 +93,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
portTickType interval_end_ms;
|
||||
TickType_t interval_end_ms;
|
||||
};
|
||||
|
||||
} // namespace timer {
|
||||
|
|
|
@ -86,7 +86,7 @@ public:
|
|||
*/
|
||||
inline int try_lock(unsigned long ms)
|
||||
{
|
||||
return (xSemaphoreTake(mutex, ms / portTICK_RATE_MS) == pdTRUE) ? 0 : -1;
|
||||
return (xSemaphoreTake(mutex, ms / portTICK_PERIOD_MS) == pdTRUE) ? 0 : -1;
|
||||
}
|
||||
/**
|
||||
*
|
||||
|
@ -98,7 +98,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
xSemaphoreHandle mutex;
|
||||
SemaphoreHandle_t mutex;
|
||||
|
||||
// Disable copy construction and assignment.
|
||||
mutex_t (const mutex_t&);
|
||||
|
|
|
@ -83,7 +83,7 @@ public:
|
|||
*/
|
||||
inline int post(const Data& data, unsigned long ms = 0)
|
||||
{
|
||||
return (xQueueSend(queue, &data, ms / portTICK_RATE_MS) == pdTRUE) ? 0 : -1;
|
||||
return (xQueueSend(queue, &data, ms / portTICK_PERIOD_MS) == pdTRUE) ? 0 : -1;
|
||||
}
|
||||
/**
|
||||
*
|
||||
|
@ -93,7 +93,7 @@ public:
|
|||
*/
|
||||
inline int receive(Data& data, unsigned long ms = 0)
|
||||
{
|
||||
return (xQueueReceive(queue, &data, ms / portTICK_RATE_MS) == pdTRUE) ? 0 : -1;
|
||||
return (xQueueReceive(queue, &data, ms / portTICK_PERIOD_MS) == pdTRUE) ? 0 : -1;
|
||||
}
|
||||
/**
|
||||
*
|
||||
|
@ -110,7 +110,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
xQueueHandle queue;
|
||||
QueueHandle_t queue;
|
||||
|
||||
// Disable copy construction.
|
||||
queue_t (const queue_t&);
|
||||
|
|
|
@ -66,7 +66,7 @@ protected:
|
|||
*/
|
||||
void sleep(unsigned long ms)
|
||||
{
|
||||
vTaskDelay(ms / portTICK_RATE_MS);
|
||||
vTaskDelay(ms / portTICK_PERIOD_MS);
|
||||
}
|
||||
/**
|
||||
*
|
||||
|
@ -74,7 +74,7 @@ protected:
|
|||
*/
|
||||
inline unsigned long millis()
|
||||
{
|
||||
return xTaskGetTickCount() * portTICK_RATE_MS;
|
||||
return xTaskGetTickCount() * portTICK_PERIOD_MS;
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue