mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-05-25 00:59:39 -04:00
System wakes up Cellular when there is a need to communicate with the modem, e.g. to handle an outgoing call
41 lines
930 B
C++
41 lines
930 B
C++
// 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 <memory>
|
|
#include <devices/Device.hpp>
|
|
#include <magic_enum.hpp>
|
|
|
|
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<DriverLPUART> 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<DriverLPUART> singleton[magic_enum::enum_count<LPUARTInstances>()];
|
|
};
|
|
|
|
} // namespace drivers
|