RedHawk 620439fff4 LpcUart: [#22] rewritten wrapper for lpc11u68.
* We have UART1-4 (from UARTN, UART0 handling is different.)
* Added Fmutex
* Removed movable pins.
* Disabled handshakes. (Not sure how to configure those.)
* 1 and 4, as well as 2 and 3 share their interrupts with each other. (Again, not sure how it should work.)
2023-04-28 14:32:25 +03:00

29 lines
392 B
C++

/*
* Fmutex.cpp
*
* Created on: 15.8.2017
* Author: krl
*/
#include "Fmutex.h"
Fmutex::Fmutex() {
// TODO Auto-generated constructor stub
mutex = xSemaphoreCreateMutex();
}
Fmutex::~Fmutex() {
// TODO Auto-generated destructor stub
vSemaphoreDelete(mutex);
}
void Fmutex::lock()
{
xSemaphoreTake(mutex, portMAX_DELAY);
}
void Fmutex::unlock()
{
xSemaphoreGive(mutex);
}