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_WriteMutex, TM_INFINITE )){
int prevstate;
prevstate=uartDevWriteBuf_plc_state;
uartDevWriteBuf_plc_state = LOCKED;
rt_mutex_release(&UART_WriteMutex);
%(publish_code)s
/* unlock plc buffer */
uartDevWriteBuf_plc_state = FULL;
/* wakeup task */
rt_task_unblock(&UART_task);
}