Mirror of espurna firmware for wireless switches and more
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

40 lines
540 B

/*
UART MODULE
Copyright (C) 2022 by Maxim Prokhorov <prokhorov dot max at outlook dot com>
*/
#pragma once
#include <Arduino.h>
#include <memory>
namespace espurna {
namespace driver {
namespace uart {
enum class Type {
Unknown,
Software,
Uart0,
Uart1,
};
struct Port {
Type type;
bool tx;
bool rx;
Stream* stream;
};
using PortPtr = std::unique_ptr<Port>;
} // namespace uart
} // namespace driver
} // namespace espurna
espurna::driver::uart::PortPtr uartPort(size_t index);
void uartSetup();