#include <FreeRTOS.h>
#include <portmacro.h>
#include <task.h>
#include <queue.h>
#include <semphr.h>
#define MUTEX_J16_GIVE { xSemaphoreGiveRecursive(xJ16Semaphore); } |
#define MUTEX_J16_TAKE { while( xSemaphoreTakeRecursive(xJ16Semaphore, (portTickType)1) != pdTRUE ); } |
#define MUTEX_LCD_GIVE { xSemaphoreGiveRecursive(xLCDSemaphore); } |
#define MUTEX_LCD_TAKE { while( xSemaphoreTakeRecursive(xLCDSemaphore, (portTickType)1) != pdTRUE ); } |
#define MUTEX_MIDIIN_GIVE { xSemaphoreGiveRecursive(xMIDIINSemaphore); } |
#define MUTEX_MIDIIN_TAKE { while( xSemaphoreTakeRecursive(xMIDIINSemaphore, (portTickType)1) != pdTRUE ); } |
#define MUTEX_MIDIOUT_GIVE { if( xMIDIOUTSemaphore ) xSemaphoreGiveRecursive(xMIDIOUTSemaphore); } |
#define MUTEX_MIDIOUT_TAKE { if( xMIDIOUTSemaphore ) while( xSemaphoreTakeRecursive(xMIDIOUTSemaphore, (portTickType)1) != pdTRUE ); } |
#define MUTEX_SDCARD_GIVE { xSemaphoreGiveRecursive(xSDCardSemaphore); } |
#define MUTEX_SDCARD_TAKE { while( xSemaphoreTakeRecursive(xSDCardSemaphore, (portTickType)1) != pdTRUE ); } |