lpcmanager
Clone
Summary
Browse
Changes
Graph
Revamped init of GPIOs and ports that differ per-product.
som6
2019-09-02, Edouard Tisserant
3f2d4d55f1c7
Revamped init of GPIOs and ports that differ per-product.
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 */
}
}