mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-05-24 16:47:00 -04:00
It appears in the past a major edit was made but had used a regex to change some text which resulted in an errant space between the enumuneration/struct/class name and the scope resolution operator. These errant spaces have been removed.
45 lines
1.1 KiB
C++
45 lines
1.1 KiB
C++
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#ifndef PUREPHONE_DRIVERDMAMUX_HPP
|
|
#define PUREPHONE_DRIVERDMAMUX_HPP
|
|
|
|
#include <memory>
|
|
|
|
namespace drivers
|
|
{
|
|
|
|
enum class DMAMuxInstances
|
|
{
|
|
DMAMUX0,
|
|
COUNT
|
|
};
|
|
|
|
struct DriverDMAMuxParams
|
|
{};
|
|
|
|
class DriverDMAMux
|
|
{
|
|
public:
|
|
static std::shared_ptr<DriverDMAMux> Create(const DMAMuxInstances inst, const DriverDMAMuxParams ¶ms);
|
|
|
|
DriverDMAMux(const DriverDMAMuxParams ¶ms) : parameters(params)
|
|
{}
|
|
|
|
virtual ~DriverDMAMux()
|
|
{}
|
|
|
|
virtual void Enable(const uint32_t channel, const uint32_t source = UINT32_MAX) = 0;
|
|
virtual void Disable(const uint32_t channel) = 0;
|
|
|
|
protected:
|
|
const DriverDMAMuxParams parameters;
|
|
|
|
private:
|
|
static std::weak_ptr<DriverDMAMux> singleton[static_cast<uint32_t>(DMAMuxInstances::COUNT)];
|
|
};
|
|
|
|
} // namespace drivers
|
|
|
|
#endif // PUREPHONE_DRIVERDMAMUX_HPP
|