lpcmanager
Clone
Summary
Browse
Changes
Graph
Devices Bus : Removed explicit RTS pin toggling as GPIO, now that kernel side RS485 driver handles it. Also changed UART task sleep/unblock into suspend/resume, since it looks unreliable in xenomai3
revamp
2018-05-16, Edouard Tisserant
c4244c0ad6c7
Devices Bus : Removed explicit RTS pin toggling as GPIO, now that kernel side RS485 driver handles it. Also changed UART task sleep/unblock into suspend/resume, since it looks unreliable in xenomai3
if(!rt_mutex_acquire(&UART_ReadMutex, TM_INFINITE )){
int prevstate;
if((prevstate=uartDevReadBuf_plc_state) == FULL){
uartDevReadBuf_plc_state = LOCKED;
}
rt_mutex_release(&UART_ReadMutex);
if(prevstate == FULL){
%(retrieve_code)s
/* unlock plc buffer */
uartDevReadBuf_plc_state = EMPTY;
}else{
/* No new data -> no update */
}
}