forked from EmbeddedRPC/erpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathble_common.erpc
67 lines (58 loc) · 1.67 KB
/
ble_common.erpc
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
/*
* Copyright (c) 2016, Freescale Semiconductor, Inc.
* Copyright 2016-2017 NXP
* All rights reserved.
*
*
* SPDX-License-Identifier: BSD-3-Clause
*/
enum {
BIT0 = 1 << 0,
BIT1 = 1 << 1,
BIT2 = 1 << 2,
BIT3 = 1 << 3,
BIT4 = 1 << 4,
BIT5 = 1 << 5,
BIT6 = 1 << 6,
BIT7 = 1 << 7,
BIT8 = 1 << 8,
BIT9 = 1 << 9,
BIT10 = 1 << 10,
BIT11 = 1 << 11,
BIT12 = 1 << 12,
BIT13 = 1 << 13,
BIT14 = 1 << 14,
BIT15 = 1 << 15,
BIT16 = 1 << 16,
}
//@external
enum bleResult_t {
gBleStatusBase_c = 0x0000, /*!< General status base. */
gBleSuccess_c = gBleStatusBase_c | 0x00, /*!< Function */
// ...
}
/*! Unique identifier type for a connected device. */
type deviceId_t = uint8;
/*! Bluetooth Device Address Types */
enum bleAddressType_t {
gBleAddrTypePublic_c = 0x00, /*!< Public Device Address - fixed into the Controller by the manufacturer. */
gBleAddrTypeRandom_c = 0x01 /*!< Random Device Address - set by the Host into the Controller for privacy reasons. */
}
@external
const int32 gcBleDeviceAddressSize_c = (6)
type bleDeviceAddress_t = uint8[gcBleDeviceAddressSize_c]
@external
const int32 gcSmpOobSize_c = (16)
enum bleMasterClockAccuracy_t {
gBleMasterClkAcc500ppm_c = 0x00,
gBleMasterClkAcc250ppm_c = 0x01,
gBleMasterClkAcc150ppm_c = 0x02,
gBleMasterClkAcc100ppm_c = 0x03,
gBleMasterClkAcc75ppm_c = 0x04,
gBleMasterClkAcc50ppm_c = 0x05,
gBleMasterClkAcc30ppm_c = 0x06,
gBleMasterClkAcc20ppm_c = 0x07,
}
/*! Maximum Rand size in bytes */
@external
const uint8 gcSmpMaxRandSize_c = (8)