Private
Public Access
2
0

firmata: Add pthread spin locks around uart operations

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2016-10-26 12:55:54 +01:00
parent bb5ec8bd10
commit 623fef670e
3 changed files with 32 additions and 3 deletions

View File

@@ -24,6 +24,8 @@
#pragma once
#include <pthread.h>
#include "uart.h"
#define MODE_INPUT 0x00
@@ -99,6 +101,7 @@ typedef struct s_firmata {
char firmware[140];
uint8_t dev_count;
struct _firmata** devs;
pthread_spinlock_t lock;
} t_firmata;
t_firmata* firmata_new(const char* name);