lpcmanager
Clone
Summary
Browse
Changes
Graph
Added support for Smarteh UART bus on LHC2 GOT100 products - it replaces Modbus RTU. In LPCArch.py and LPCBus.py added support for module LHC2_GOT_111.
2020-05-12, bmakuc
67d9202cfcd9
Added support for Smarteh UART bus on LHC2 GOT100 products - it replaces Modbus RTU. In LPCArch.py and LPCBus.py added support for module LHC2_GOT_111.
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 */
}
}