File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed
libraries/mbed/targets/hal
TARGET_Freescale/TARGET_KLXX
TARGET_NXP/TARGET_LPC176X Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 19
19
20
20
/************RTC***************/
21
21
const PinMap PinMap_RTC [] = {
22
- {PTC1 , RTC_CLKIN , 2 },
22
+ {PTC1 , RTC_CLKIN , 1 },
23
23
};
24
24
25
25
/************ADC***************/
Original file line number Diff line number Diff line change 18
18
19
19
/************RTC***************/
20
20
const PinMap PinMap_RTC [] = {
21
- {PTC1 , RTC_CLKIN , 2 },
21
+ {PTC1 , RTC_CLKIN , 1 },
22
22
};
23
23
24
24
/************ADC***************/
Original file line number Diff line number Diff line change @@ -364,12 +364,10 @@ int serial_readable(serial_t *obj) {
364
364
}
365
365
366
366
int serial_writable (serial_t * obj ) {
367
- int isWritable = 1 ;
368
367
if (NC != uart_data [obj -> index ].sw_cts .pin )
369
- isWritable = gpio_read (& uart_data [obj -> index ].sw_cts ) == 0 ;
370
- if (isWritable )
371
- isWritable = obj -> uart -> LSR & 0x40 ;
372
- return isWritable ;
368
+ return (gpio_read (& uart_data [obj -> index ].sw_cts ) == 0 ) && (obj -> uart -> LSR & 0x40 ); //If flow control: writable if CTS low + UART done
369
+ else
370
+ return obj -> uart -> LSR & 0x20 ; //No flow control: writable if space in holding register
373
371
}
374
372
375
373
void serial_clear (serial_t * obj ) {
You can’t perform that action at this time.
0 commit comments