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***************/
|
/************RTC***************/
|
||||||
const PinMap PinMap_RTC[] = {
|
const PinMap PinMap_RTC[] = {
|
||||||
{PTC1, RTC_CLKIN, 2},
|
{PTC1, RTC_CLKIN, 1},
|
||||||
};
|
};
|
||||||
|
|
||||||
/************ADC***************/
|
/************ADC***************/
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
/************RTC***************/
|
/************RTC***************/
|
||||||
const PinMap PinMap_RTC[] = {
|
const PinMap PinMap_RTC[] = {
|
||||||
{PTC1, RTC_CLKIN, 2},
|
{PTC1, RTC_CLKIN, 1},
|
||||||
};
|
};
|
||||||
|
|
||||||
/************ADC***************/
|
/************ADC***************/
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue