Header files adjustment
(MQTT changes split from original commit - @projectgus.)
This commit is contained in:
parent
0a9b491a98
commit
38d4bd0f62
3 changed files with 22 additions and 9 deletions
|
@ -95,9 +95,9 @@ esp_open_rtos::thread::queue_t<uint32_t> MyQueue;
|
|||
*/
|
||||
extern "C" void user_init(void)
|
||||
{
|
||||
sdk_uart_div_modify(0, UART_CLK_FREQ / 115200);
|
||||
sdk_uart_div_modify(0, UART_CLK_FREQ / 115200);
|
||||
|
||||
MyQueue.create(10);
|
||||
MyQueue.queue_create(10);
|
||||
|
||||
task_1.queue = MyQueue;
|
||||
task_2.queue = MyQueue;
|
||||
|
|
|
@ -46,14 +46,30 @@ public:
|
|||
*/
|
||||
inline mutex_t()
|
||||
{
|
||||
mutex = xSemaphoreCreateMutex();
|
||||
mutex = 0;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
inline int mutex_create()
|
||||
{
|
||||
mutex = xSemaphoreCreateMutex();
|
||||
|
||||
if(mutex == NULL) {
|
||||
return -1;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
inline ~mutex_t()
|
||||
inline void mutex_destroy()
|
||||
{
|
||||
vQueueDelete(mutex);
|
||||
mutex = 0;
|
||||
}
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
* @param uxItemSize
|
||||
* @return
|
||||
*/
|
||||
inline int create(unsigned portBASE_TYPE uxQueueLength)
|
||||
inline int queue_create(unsigned portBASE_TYPE uxQueueLength)
|
||||
{
|
||||
queue = xQueueCreate(uxQueueLength, sizeof(Data));
|
||||
|
||||
|
@ -69,11 +69,8 @@ public:
|
|||
}
|
||||
/**
|
||||
*
|
||||
* @param data
|
||||
* @param ms
|
||||
* @return
|
||||
*/
|
||||
inline void destroy()
|
||||
inline void queue_destroy()
|
||||
{
|
||||
vQueueDelete(queue);
|
||||
queue = 0;
|
||||
|
|
Loading…
Reference in a new issue