lpcmanager
Clone
Summary
Browse
Changes
Graph
Add user-friendly WAMP-SMT scheme for SmartehCloud connection.
py2compat
14 months ago, Edouard Tisserant
37f7e851eae4
Add user-friendly WAMP-SMT scheme for SmartehCloud connection.
if(!pthread_mutex_lock(&UART_ReadMutex)){
int prevstate;
if((prevstate=uartDevReadBuf_plc_state) == FULL){
uartDevReadBuf_plc_state = LOCKED;
}
pthread_mutex_unlock(&UART_ReadMutex);
if(prevstate == FULL){
%(retrieve_code)s
/* unlock plc buffer */
uartDevReadBuf_plc_state = EMPTY;
}else{
/* No new data -> no update */
}
}