~aleteoryx/muditaos

ref: fa24dcc8293533a27df76838cb8077ab09ea14da muditaos/module-bsp/board/linux/bluetooth/Bluetooth.cpp -rw-r--r-- 1.5 KiB
fa24dcc8 — SP2FET [EGD-5483] Updated BT harness tests 5 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
81
82
83
84
85
86
87
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "bsp/bluetooth/Bluetooth.hpp"
#include "BluetoothWorker.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::configure_uart_io()
{}

void BluetoothCommon::configure_lpuart()
{}

void BluetoothCommon::configure_cts_irq()
{}

void BluetoothCommon::set_irq(bool enable)
{}