Skip to content

UARTx_end

gicking edited this page Feb 10, 2018 · 1 revision

back to Command Reference / Serial

Description

disables UARTx (x=1..4) sender and receiver. Re-enable via UARTx_begin().

Inclusion

  • defined in uartx.h (x=1..4)
  • not loaded by main_general.h
  • no #define required

Syntax

UARTx_end()

Parameters

  • input:

    • none
  • output:

    • none

Returns

  • Nothing

Example Code

The below function echoes 1 byte received via UART1, then disables communication.

#include "main_general.h"
#include "uart1.h"

void setup() {
  UART1_begin(115200);
}

void loop() {
  if (UART1_available()) {
    UART1_write(UARTx_read());
    UART1_end();
  }
}

Relevant Tutorial

  • tbd

See also

Clone this wiki locally