lpcmanager

Uart communication timer is now bound to rt_timer_read() and no longer to common_ticktime__. Swapping of uart buffers is repositioned, so it is executed just befor/after the actual uart communication. Uart timeout is set according to buffer size: long buffer -> 20ms, short buffer -> 40ms. Decreased max uart devices from 68 to 32.
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 */
}
}