lpcmanager
Clone
Summary
Browse
Changes
Graph
RS485: in case of LHC-1 products allow more than 32 devices on a bus (because each physical LHC1 device has two addresses on the bus).
5 months ago, Tomaz Orac
8bc93d4df301
RS485: in case of LHC-1 products allow more than 32 devices on a bus (because each physical LHC1 device has two addresses on the bus).
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 */
}
}