forked from nrfconnect/sdk-nrf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gzp_config.h
114 lines (89 loc) · 2.79 KB
/
gzp_config.h
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*
* Copyright (c) 2021 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/
#ifndef __GZP_CONFIG_H
#define __GZP_CONFIG_H
#ifdef __cplusplus
extern "C" {
#endif
/**
* Definition of "secret key" used during "Host ID exchange".
*/
#define GZP_SECRET_KEY {1, 23, 45, 57, 26, 68, 12, 64, 13, 73, 13, 62, 26, 45, 12, 77}
/*---------------------------------------------------------------------------*/
/**
* Definition of the first static selected pairing channel. Should be located in
* the lower Nth of the channel range, where N is the size if the channel subset
* selected by the application.
*/
#define GZP_CHANNEL_LOW 2
/**
* Definition of the second static selected pairing channel. Should be located in
* the upper Nth of the channel range, where N is the size if the channel subset
* selected by the application.
*/
#define GZP_CHANNEL_HIGH 79
/**
* Definition of the static "global" pairing address.
*/
#define GZP_ADDRESS {4, 6, 8, 10}
/**
* Reduced TX power for use during close proximity pairing.
*/
#define GZP_POWER NRF_GZLL_TX_POWER_N16_DBM
/**
* Definition of pairing request timeout.
*/
#define GZP_REQ_TX_TIMEOUT 200
/**
* Definition of the maximimum number of "backoff" packets (step 0) to be transmitted.
*/
#define GZP_MAX_BACKOFF_PACKETS 100
/**
* Definition of the period a device shall wait before attempting to send the packet for
* fetching the pairing response (step 1).
*/
#define GZP_TX_ACK_WAIT_TIMEOUT (GZP_CLOSE_PROXIMITY_BACKOFF_RX_TIMEOUT + 50)
/**
* Definition of the period a device in close proximity shall back off on the pairing
* address after a backoff packet has been received.
*/
#define GZP_CLOSE_PROXIMITY_BACKOFF_RX_TIMEOUT ((GZP_REQ_TX_TIMEOUT / 2) + 50)
/**
* Definition of the period a device NOT in close proximity shall back off on the pairing
* address after a backoff packet has been received.
*/
#define GZP_NOT_PROXIMITY_BACKOFF_RX_TIMEOUT (GZP_CLOSE_PROXIMITY_BACKOFF_RX_TIMEOUT + \
GZP_STEP1_RX_TIMEOUT)
/**
* Definition of the time the host waits for a device to complete
* transmission of the pairing request step 1 packet.
*/
#define GZP_STEP1_RX_TIMEOUT (((GZP_REQ_TX_TIMEOUT / 2) + GZP_TX_ACK_WAIT_TIMEOUT) + 50)
/**
* Definition of the lowest boundary for the channel range to be used.
*/
#define GZP_CHANNEL_MIN 2
/**
* Definition of the upper boundary for the channel range to be used.
*/
#define GZP_CHANNEL_MAX 80
/**
* Definition of the minimum channel spacing for the channel subset generated
* during pairing.
*/
#define GZP_CHANNEL_SPACING_MIN 5
/**
* Maximum Device TX payload length [bytes].
*/
#define GZP_MAX_FW_PAYLOAD_LENGTH 17
/**
* Maximum Host ACK payload length [bytes].
*/
#define GZP_MAX_ACK_PAYLOAD_LENGTH 10
#ifdef __cplusplus
}
#endif
#endif /* __GZP_CONFIG_H */