|
@@ -32,6 +32,7 @@
|
|
|
|
|
|
#include "spi.h"
|
|
|
#include "lcd.h"
|
|
|
+#include "global.h"
|
|
|
|
|
|
#ifndef TRUE
|
|
|
# define TRUE (1==1)
|
|
@@ -130,9 +131,11 @@ static void sendDataCmd(const struct lcdDataStruct *lcd, unsigned char data) {
|
|
|
*/
|
|
|
|
|
|
static void putCommand(const struct lcdDataStruct *lcd, unsigned char command) {
|
|
|
+ pthread_mutex_lock(&mutex);
|
|
|
digitalWrite(lcd->rsPin, 0);
|
|
|
sendDataCmd(lcd, command);
|
|
|
delay(2);
|
|
|
+ pthread_mutex_unlock(&mutex);
|
|
|
}
|
|
|
|
|
|
static void put4Command(const struct lcdDataStruct *lcd,
|