mirror of https://github.com/ARMmbed/mbed-os.git
commit
ed53fe1ed4
|
@ -742,13 +742,13 @@ void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, Pi
|
|||
{
|
||||
struct serial_s *obj_s = SERIAL_S(obj);
|
||||
|
||||
// Determine the UART to use (UART_1, UART_2, ...)
|
||||
// Checked used UART name (UART_1, UART_2, ...)
|
||||
UARTName uart_rts = (UARTName)pinmap_peripheral(rxflow, PinMap_UART_RTS);
|
||||
UARTName uart_cts = (UARTName)pinmap_peripheral(txflow, PinMap_UART_CTS);
|
||||
|
||||
// Get the peripheral name (UART_1, UART_2, ...) from the pin and assign it to the object
|
||||
obj_s->uart = (UARTName)pinmap_merge(uart_cts, uart_rts);
|
||||
MBED_ASSERT(obj_s->uart != (UARTName)NC);
|
||||
if (((UARTName)pinmap_merge(uart_rts, obj_s->uart) == (UARTName)NC) || ((UARTName)pinmap_merge(uart_cts, obj_s->uart) == (UARTName)NC)) {
|
||||
MBED_ASSERT(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == FlowControlNone) {
|
||||
// Disable hardware flow control
|
||||
|
|
|
@ -613,13 +613,13 @@ void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, Pi
|
|||
{
|
||||
struct serial_s *obj_s = SERIAL_S(obj);
|
||||
|
||||
// Determine the UART to use (UART_1, UART_2, ...)
|
||||
// Checked used UART name (UART_1, UART_2, ...)
|
||||
UARTName uart_rts = (UARTName)pinmap_peripheral(rxflow, PinMap_UART_RTS);
|
||||
UARTName uart_cts = (UARTName)pinmap_peripheral(txflow, PinMap_UART_CTS);
|
||||
|
||||
// Get the peripheral name (UART_1, UART_2, ...) from the pin and assign it to the object
|
||||
obj_s->uart = (UARTName)pinmap_merge(uart_cts, uart_rts);
|
||||
MBED_ASSERT(obj_s->uart != (UARTName)NC);
|
||||
if (((UARTName)pinmap_merge(uart_rts, obj_s->uart) == (UARTName)NC) || ((UARTName)pinmap_merge(uart_cts, obj_s->uart) == (UARTName)NC)) {
|
||||
MBED_ASSERT(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == FlowControlNone) {
|
||||
// Disable hardware flow control
|
||||
|
|
|
@ -696,13 +696,13 @@ void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, Pi
|
|||
{
|
||||
struct serial_s *obj_s = SERIAL_S(obj);
|
||||
|
||||
// Determine the UART to use (UART_1, UART_2, ...)
|
||||
// Checked used UART name (UART_1, UART_2, ...)
|
||||
UARTName uart_rts = (UARTName)pinmap_peripheral(rxflow, PinMap_UART_RTS);
|
||||
UARTName uart_cts = (UARTName)pinmap_peripheral(txflow, PinMap_UART_CTS);
|
||||
|
||||
// Get the peripheral name (UART_1, UART_2, ...) from the pin and assign it to the object
|
||||
obj_s->uart = (UARTName)pinmap_merge(uart_cts, uart_rts);
|
||||
MBED_ASSERT(obj_s->uart != (UARTName)NC);
|
||||
if (((UARTName)pinmap_merge(uart_rts, obj_s->uart) == (UARTName)NC) || ((UARTName)pinmap_merge(uart_cts, obj_s->uart) == (UARTName)NC)) {
|
||||
MBED_ASSERT(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == FlowControlNone) {
|
||||
// Disable hardware flow control
|
||||
|
|
|
@ -659,13 +659,13 @@ void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, Pi
|
|||
{
|
||||
struct serial_s *obj_s = SERIAL_S(obj);
|
||||
|
||||
// Determine the UART to use (UART_1, UART_2, ...)
|
||||
// Checked used UART name (UART_1, UART_2, ...)
|
||||
UARTName uart_rts = (UARTName)pinmap_peripheral(rxflow, PinMap_UART_RTS);
|
||||
UARTName uart_cts = (UARTName)pinmap_peripheral(txflow, PinMap_UART_CTS);
|
||||
|
||||
// Get the peripheral name (UART_1, UART_2, ...) from the pin and assign it to the object
|
||||
obj_s->uart = (UARTName)pinmap_merge(uart_cts, uart_rts);
|
||||
MBED_ASSERT(obj_s->uart != (UARTName)NC);
|
||||
if (((UARTName)pinmap_merge(uart_rts, obj_s->uart) == (UARTName)NC) || ((UARTName)pinmap_merge(uart_cts, obj_s->uart) == (UARTName)NC)) {
|
||||
MBED_ASSERT(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == FlowControlNone) {
|
||||
// Disable hardware flow control
|
||||
|
|
|
@ -741,13 +741,13 @@ void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, Pi
|
|||
{
|
||||
struct serial_s *obj_s = SERIAL_S(obj);
|
||||
|
||||
// Determine the UART to use (UART_1, UART_2, ...)
|
||||
// Checked used UART name (UART_1, UART_2, ...)
|
||||
UARTName uart_rts = (UARTName)pinmap_peripheral(rxflow, PinMap_UART_RTS);
|
||||
UARTName uart_cts = (UARTName)pinmap_peripheral(txflow, PinMap_UART_CTS);
|
||||
|
||||
// Get the peripheral name (UART_1, UART_2, ...) from the pin and assign it to the object
|
||||
obj_s->uart = (UARTName)pinmap_merge(uart_cts, uart_rts);
|
||||
MBED_ASSERT(obj_s->uart != (UARTName)NC);
|
||||
if (((UARTName)pinmap_merge(uart_rts, obj_s->uart) == (UARTName)NC) || ((UARTName)pinmap_merge(uart_cts, obj_s->uart) == (UARTName)NC)) {
|
||||
MBED_ASSERT(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == FlowControlNone) {
|
||||
// Disable hardware flow control
|
||||
|
|
|
@ -700,13 +700,13 @@ void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, Pi
|
|||
{
|
||||
struct serial_s *obj_s = SERIAL_S(obj);
|
||||
|
||||
// Determine the UART to use (UART_1, UART_2, ...)
|
||||
// Checked used UART name (UART_1, UART_2, ...)
|
||||
UARTName uart_rts = (UARTName)pinmap_peripheral(rxflow, PinMap_UART_RTS);
|
||||
UARTName uart_cts = (UARTName)pinmap_peripheral(txflow, PinMap_UART_CTS);
|
||||
|
||||
// Get the peripheral name (UART_1, UART_2, ...) from the pin and assign it to the object
|
||||
obj_s->uart = (UARTName)pinmap_merge(uart_cts, uart_rts);
|
||||
MBED_ASSERT(obj_s->uart != (UARTName)NC);
|
||||
if (((UARTName)pinmap_merge(uart_rts, obj_s->uart) == (UARTName)NC) || ((UARTName)pinmap_merge(uart_cts, obj_s->uart) == (UARTName)NC)) {
|
||||
MBED_ASSERT(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == FlowControlNone) {
|
||||
// Disable hardware flow control
|
||||
|
|
|
@ -700,13 +700,13 @@ void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, Pi
|
|||
{
|
||||
struct serial_s *obj_s = SERIAL_S(obj);
|
||||
|
||||
// Determine the UART to use (UART_1, UART_2, ...)
|
||||
// Checked used UART name (UART_1, UART_2, ...)
|
||||
UARTName uart_rts = (UARTName)pinmap_peripheral(rxflow, PinMap_UART_RTS);
|
||||
UARTName uart_cts = (UARTName)pinmap_peripheral(txflow, PinMap_UART_CTS);
|
||||
|
||||
// Get the peripheral name (UART_1, UART_2, ...) from the pin and assign it to the object
|
||||
obj_s->uart = (UARTName)pinmap_merge(uart_cts, uart_rts);
|
||||
MBED_ASSERT(obj_s->uart != (UARTName)NC);
|
||||
if (((UARTName)pinmap_merge(uart_rts, obj_s->uart) == (UARTName)NC) || ((UARTName)pinmap_merge(uart_cts, obj_s->uart) == (UARTName)NC)) {
|
||||
MBED_ASSERT(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == FlowControlNone) {
|
||||
// Disable hardware flow control
|
||||
|
|
|
@ -646,13 +646,13 @@ void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, Pi
|
|||
{
|
||||
struct serial_s *obj_s = SERIAL_S(obj);
|
||||
|
||||
// Determine the UART to use (UART_1, UART_2, ...)
|
||||
// Checked used UART name (UART_1, UART_2, ...)
|
||||
UARTName uart_rts = (UARTName)pinmap_peripheral(rxflow, PinMap_UART_RTS);
|
||||
UARTName uart_cts = (UARTName)pinmap_peripheral(txflow, PinMap_UART_CTS);
|
||||
|
||||
// Get the peripheral name (UART_1, UART_2, ...) from the pin and assign it to the object
|
||||
obj_s->uart = (UARTName)pinmap_merge(uart_cts, uart_rts);
|
||||
MBED_ASSERT(obj_s->uart != (UARTName)NC);
|
||||
if (((UARTName)pinmap_merge(uart_rts, obj_s->uart) == (UARTName)NC) || ((UARTName)pinmap_merge(uart_cts, obj_s->uart) == (UARTName)NC)) {
|
||||
MBED_ASSERT(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == FlowControlNone) {
|
||||
// Disable hardware flow control
|
||||
|
|
|
@ -649,13 +649,13 @@ void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, Pi
|
|||
{
|
||||
struct serial_s *obj_s = SERIAL_S(obj);
|
||||
|
||||
// Determine the UART to use (UART_1, UART_2, ...)
|
||||
// Checked used UART name (UART_1, UART_2, ...)
|
||||
UARTName uart_rts = (UARTName)pinmap_peripheral(rxflow, PinMap_UART_RTS);
|
||||
UARTName uart_cts = (UARTName)pinmap_peripheral(txflow, PinMap_UART_CTS);
|
||||
|
||||
// Get the peripheral name (UART_1, UART_2, ...) from the pin and assign it to the object
|
||||
obj_s->uart = (UARTName)pinmap_merge(uart_cts, uart_rts);
|
||||
MBED_ASSERT(obj_s->uart != (UARTName)NC);
|
||||
if (((UARTName)pinmap_merge(uart_rts, obj_s->uart) == (UARTName)NC) || ((UARTName)pinmap_merge(uart_cts, obj_s->uart) == (UARTName)NC)) {
|
||||
MBED_ASSERT(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == FlowControlNone) {
|
||||
// Disable hardware flow control
|
||||
|
|
|
@ -673,13 +673,13 @@ void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, Pi
|
|||
{
|
||||
struct serial_s *obj_s = SERIAL_S(obj);
|
||||
|
||||
// Determine the UART to use (UART_1, UART_2, ...)
|
||||
// Checked used UART name (UART_1, UART_2, ...)
|
||||
UARTName uart_rts = (UARTName)pinmap_peripheral(rxflow, PinMap_UART_RTS);
|
||||
UARTName uart_cts = (UARTName)pinmap_peripheral(txflow, PinMap_UART_CTS);
|
||||
|
||||
// Get the peripheral name (UART_1, UART_2, ...) from the pin and assign it to the object
|
||||
obj_s->uart = (UARTName)pinmap_merge(uart_cts, uart_rts);
|
||||
MBED_ASSERT(obj_s->uart != (UARTName)NC);
|
||||
if (((UARTName)pinmap_merge(uart_rts, obj_s->uart) == (UARTName)NC) || ((UARTName)pinmap_merge(uart_cts, obj_s->uart) == (UARTName)NC)) {
|
||||
MBED_ASSERT(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == FlowControlNone) {
|
||||
// Disable hardware flow control
|
||||
|
|
Loading…
Reference in New Issue