// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #pragma once #include #include #include namespace drivers { enum class LPUARTInstances { LPUART_1, LPUART_2, LPUART_3, LPUART_4, LPUART_5, LPUART_6, LPUART_7, LPUART_8 }; class DriverLPUART : public devices::Device { public: static std::shared_ptr Create(std::string name, const LPUARTInstances inst); explicit DriverLPUART(std::string name, LPUARTInstances inst) : devices::Device(std::move(name)), instance(inst) {} protected: LPUARTInstances instance; private: static std::weak_ptr singleton[magic_enum::enum_count()]; }; } // namespace drivers