Skip to content

Class hal::lpc40::uart

ClassList > hal > lpc40 > uart

Implementation of the UART peripheral for the LPC40xx family of microcontrollers. More...

  • #include <uart.hpp>

Inherits the following classes: hal::serial

Classes

Type Name
struct port

Public Functions

Type Name
uart & operator= (uart & p_other) = delete
uart & operator= (uart && p_other) noexcept
uart (uart & p_other) = delete
uart (uart && p_other) noexcept

Public Functions inherited from hal::serial

See hal::serial

Type Name
status configure (const settings & p_settings)
Configure serial to match the settings supplied.
result< flush_t > flush ()
Flush working buffer.
result< read_t > read (std::span< hal::byte > p_data)
Copy bytes from working buffer into passed buffer.
result< write_t > write (std::span< const hal::byte > p_data)
Write data to the transmitter line of the serial port.
virtual ~serial () = default

Public Static Functions

Type Name
result< uart > construct_custom (uart::port p_port, std::span< hal::byte > p_receive_working_buffer, serial::settings p_settings={})
result< uart > get (std::uint8_t p_port_number, std::span< hal::byte > p_receive_buffer, serial::settings p_settings={})
Retrieve a UART serial port.

Detailed Description

Note:

that the baud rates less than or equal to the peripheral clock frequency / 48. Otherwise this peripheral cannot guarantee proper transmission or receive of bytes.

Public Functions Documentation

function operator=

uart & hal::lpc40::uart::operator= (
    uart & p_other
) = delete

function operator=

uart & hal::lpc40::uart::operator= (
    uart && p_other
) noexcept

function uart [1/3]

hal::lpc40::uart::uart (
    uart & p_other
) = delete

function uart [2/3]

hal::lpc40::uart::uart (
    uart && p_other
) noexcept

Public Static Functions Documentation

function construct_custom

static result< uart > hal::lpc40::uart::construct_custom (
    uart::port p_port,
    std::span< hal::byte > p_receive_working_buffer,
    serial::settings p_settings={}
) 

function get

Retrieve a UART serial port.

static result< uart > hal::lpc40::uart::get (
    std::uint8_t p_port_number,
    std::span< hal::byte > p_receive_buffer,
    serial::settings p_settings={}
) 

Parameters:

  • p_port_number - which uart port number to return
  • p_receive_buffer - uart serial receive working buffer
  • p_settings - the initial settings for the uart driver

Returns:

result<uart> - uart serial driver


The documentation for this class was generated from the following file libraries/include/libhal-lpc40/uart.hpp