Files
MuditaOS/module-bsp/board/linux/bluetooth/Bluetooth.cpp
Lefucjusz 09efb75ed5 [MOS-1068] Cleanup BTStack intergration
Code cleanup in various places of
BTStack integration.
2024-05-29 17:33:30 +02:00

70 lines
1.5 KiB
C++

// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "bsp/bluetooth/Bluetooth.hpp"
#include <memory>
using namespace bsp;
BlueKitchen::BlueKitchen() = default;
BlueKitchen::~BlueKitchen() = default;
BlueKitchen &BlueKitchen::getInstance()
{
static std::unique_ptr<BlueKitchen> instance;
if (instance == nullptr) {
instance = std::make_unique<BlueKitchen>();
}
return *instance;
}
BTDevice::Error BlueKitchen::read(std::uint8_t *buf, std::size_t size)
{
return BTDevice::Error::Success;
}
BTDevice::Error BlueKitchen::write(const std::uint8_t *buf, std::size_t size)
{
return BTDevice::Error::Success;
}
BluetoothCommon::BluetoothCommon() = default;
BluetoothCommon::~BluetoothCommon() = default;
void BluetoothCommon::open()
{}
void BluetoothCommon::close()
{}
void BluetoothCommon::sleepMs(std::size_t ms)
{
ulTaskNotifyTake(pdTRUE, ms);
}
BTDevice::Error BluetoothCommon::read(std::uint8_t *buf, std::size_t size)
{
return BTDevice::Error::Success;
}
BTDevice::Error BluetoothCommon::write(const std::uint8_t *buf, std::size_t size)
{
return BTDevice::Error::Success;
}
BTDevice::Error BluetoothCommon::setBaudrate([[maybe_unused]] std::uint32_t baud)
{
return BTDevice::Error::Success;
}
BTDevice::Error BluetoothCommon::setReset([[maybe_unused]] bool on)
{
return BTDevice::Error::Success;
}
void BluetoothCommon::uartInit()
{}
void BluetoothCommon::setIrq([[maybe_unused]] bool enable)
{}