~aleteoryx/muditaos

ref: 3cbbeff551230786ae13c23a7bf4fa8c50099896 muditaos/module-bsp/board/linux/bluetooth/Bluetooth.cpp -rw-r--r-- 1.4 KiB
3cbbeff5 — Lefucjusz [MOS-1011] Fix frequency switching stability 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "bsp/bluetooth/Bluetooth.hpp"
#include <log/log.hpp>

/// stubs

using namespace bsp;

BlueKitchen::BlueKitchen() = default;

BlueKitchen *BlueKitchen::getInstance()
{
    static BlueKitchen *k = NULL;
    if (k == NULL) {
        k = new BlueKitchen();
    }
    return k;
}

BluetoothCommon::BluetoothCommon() = default;

BlueKitchen::~BlueKitchen()
{}

BluetoothCommon::~BluetoothCommon()
{}

void BluetoothCommon::open()
{}

void BluetoothCommon::close()
{}

void BluetoothCommon::sleep_ms(ssize_t ms)
{
    ulTaskNotifyTake(pdTRUE, ms);
}

BTdev::Error BlueKitchen::read(uint8_t *buf, size_t nbytes)
{
    return Success;
}

BTdev::Error BluetoothCommon::read(uint8_t *buf, size_t nbytes)
{
    return Success;
}

BTdev::Error BlueKitchen::write(const uint8_t *buf, size_t nbytes)
{
    return Success;
}

BTdev::Error BluetoothCommon::write(const uint8_t *buf, size_t nbytes)
{
    return Success;
}

ssize_t BluetoothCommon::write_blocking(const uint8_t *buf, ssize_t nbytes)
{
    return 0;
}

BTdev::Error BluetoothCommon::set_baudrate(uint32_t bd)
{
    return Success;
}

BTdev::Error BluetoothCommon::set_reset(bool on)
{
    return Success;
}

void BluetoothCommon::init_uart()
{}

void BluetoothCommon::set_irq(bool enable)
{}