mirror of https://github.com/ARMmbed/mbed-os.git
Merge branch 'master' of https://github.com/mbedmicro/mbed
commit
f47daa9173
|
@ -19,7 +19,7 @@
|
|||
|
||||
/************RTC***************/
|
||||
const PinMap PinMap_RTC[] = {
|
||||
{PTC1, RTC_CLKIN, 2},
|
||||
{PTC1, RTC_CLKIN, 1},
|
||||
};
|
||||
|
||||
/************ADC***************/
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
/************RTC***************/
|
||||
const PinMap PinMap_RTC[] = {
|
||||
{PTC1, RTC_CLKIN, 2},
|
||||
{PTC1, RTC_CLKIN, 1},
|
||||
};
|
||||
|
||||
/************ADC***************/
|
||||
|
|
|
@ -364,12 +364,10 @@ int serial_readable(serial_t *obj) {
|
|||
}
|
||||
|
||||
int serial_writable(serial_t *obj) {
|
||||
int isWritable = 1;
|
||||
if (NC != uart_data[obj->index].sw_cts.pin)
|
||||
isWritable = gpio_read(&uart_data[obj->index].sw_cts) == 0;
|
||||
if (isWritable)
|
||||
isWritable = obj->uart->LSR & 0x40;
|
||||
return isWritable;
|
||||
return (gpio_read(&uart_data[obj->index].sw_cts) == 0) && (obj->uart->LSR & 0x40); //If flow control: writable if CTS low + UART done
|
||||
else
|
||||
return obj->uart->LSR & 0x20; //No flow control: writable if space in holding register
|
||||
}
|
||||
|
||||
void serial_clear(serial_t *obj) {
|
||||
|
|
Loading…
Reference in New Issue