pull/196/head
Przemek Wirkus 2014-03-03 12:16:00 +00:00
commit f47daa9173
3 changed files with 5 additions and 7 deletions

View File

@ -19,7 +19,7 @@
/************RTC***************/ /************RTC***************/
const PinMap PinMap_RTC[] = { const PinMap PinMap_RTC[] = {
{PTC1, RTC_CLKIN, 2}, {PTC1, RTC_CLKIN, 1},
}; };
/************ADC***************/ /************ADC***************/

View File

@ -18,7 +18,7 @@
/************RTC***************/ /************RTC***************/
const PinMap PinMap_RTC[] = { const PinMap PinMap_RTC[] = {
{PTC1, RTC_CLKIN, 2}, {PTC1, RTC_CLKIN, 1},
}; };
/************ADC***************/ /************ADC***************/

View File

@ -364,12 +364,10 @@ int serial_readable(serial_t *obj) {
} }
int serial_writable(serial_t *obj) { int serial_writable(serial_t *obj) {
int isWritable = 1;
if (NC != uart_data[obj->index].sw_cts.pin) if (NC != uart_data[obj->index].sw_cts.pin)
isWritable = gpio_read(&uart_data[obj->index].sw_cts) == 0; return (gpio_read(&uart_data[obj->index].sw_cts) == 0) && (obj->uart->LSR & 0x40); //If flow control: writable if CTS low + UART done
if (isWritable) else
isWritable = obj->uart->LSR & 0x40; return obj->uart->LSR & 0x20; //No flow control: writable if space in holding register
return isWritable;
} }
void serial_clear(serial_t *obj) { void serial_clear(serial_t *obj) {