-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathesp_ota_client.h
47 lines (42 loc) · 2.56 KB
/
esp_ota_client.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
/*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: CC0-1.0
*
* Zigbee customized client Example
*
* This example code is in the Public Domain (or CC0 licensed, at your option.)
*
* Unless required by applicable law or agreed to in writing, this
* software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied.
*/
#include "esp_zigbee_core.h"
/* Zigbee configuration */
#define INSTALLCODE_POLICY_ENABLE false /* Enable the install code policy for security */
#define ED_AGING_TIMEOUT ESP_ZB_ED_AGING_TIMEOUT_256MIN
#define ED_KEEP_ALIVE 30000 /* 30000 millisecond */
#define ESP_OTA_CLIENT_ENDPOINT 5
#define OTA_UPGRADE_MANUFACTURER 0x1001 /* The attribute indicates the file version of the downloaded image on the device*/
#define OTA_UPGRADE_IMAGE_TYPE 0x1011 /* The attribute indicates the value for the manufacturer of the device */
#define OTA_UPGRADE_FILE_VERSION 0x01010101 /* The attribute indicates the file version of the running firmware image on the device */
#define OTA_UPGRADE_HW_VERSION 0x0101 /* The parameter indicates the version of hardware */
#define OTA_UPGRADE_MAX_DATA_SIZE 32 /* The parameter indicates the maximum data size of query block image */
#define ESP_ZB_PRIMARY_CHANNEL_MASK ESP_ZB_TRANSCEIVER_ALL_CHANNELS_MASK /* Zigbee primary channel mask use in the example */
#define ESP_ZB_ZED_CONFIG() \
{ \
.esp_zb_role = ESP_ZB_DEVICE_TYPE_ED, \
.install_code_policy = INSTALLCODE_POLICY_ENABLE, \
.nwk_cfg.zed_cfg = { \
.ed_timeout = ED_AGING_TIMEOUT, \
.keep_alive = ED_KEEP_ALIVE, \
}, \
}
#define ESP_ZB_DEFAULT_RADIO_CONFIG() \
{ \
.radio_mode = RADIO_MODE_NATIVE, \
}
#define ESP_ZB_DEFAULT_HOST_CONFIG() \
{ \
.host_connection_mode = HOST_CONNECTION_MODE_NONE, \
}