Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
dfu_metadata.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
15#ifndef ZEPHYR_INCLUDE_BLUETOOTH_MESH_DFU_METADATA_H__
16#define ZEPHYR_INCLUDE_BLUETOOTH_MESH_DFU_METADATA_H__
17
18#include <stdint.h>
19
20#include <sys/types.h>
21
22#include <zephyr/kernel.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
39
49
67
76 struct bt_mesh_dfu_metadata *metadata);
77
86 struct net_buf_simple *buf);
87
99
108
109#ifdef __cplusplus
110}
111#endif
112
113#endif /* ZEPHYR_INCLUDE_BLUETOOTH_MESH_DFU_METADATA_H__ */
114
int bt_mesh_dfu_metadata_comp_hash_get(struct net_buf_simple *buf, uint8_t *key, uint32_t *hash)
Compute hash of the Composition Data state.
int bt_mesh_dfu_metadata_decode(struct net_buf_simple *buf, struct bt_mesh_dfu_metadata *metadata)
Decode a firmware metadata from a network buffer.
int bt_mesh_dfu_metadata_encode(const struct bt_mesh_dfu_metadata *metadata, struct net_buf_simple *buf)
Encode a firmware metadata into a network buffer.
int bt_mesh_dfu_metadata_comp_hash_local_get(uint8_t *key, uint32_t *hash)
Compute hash of the Composition Data Page 0 of this device.
bt_mesh_dfu_metadata_fw_core_type
Firmware core type.
Definition dfu_metadata.h:41
@ BT_MESH_DFU_FW_CORE_TYPE_NETWORK
Network core.
Definition dfu_metadata.h:45
@ BT_MESH_DFU_FW_CORE_TYPE_APP_SPECIFIC_BLOB
Application-specific BLOB.
Definition dfu_metadata.h:47
@ BT_MESH_DFU_FW_CORE_TYPE_APP
Application core.
Definition dfu_metadata.h:43
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition util_macro.h:44
Public kernel APIs.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Firmware version.
Definition dfu_metadata.h:29
uint8_t minor
Firmware minor version.
Definition dfu_metadata.h:33
uint32_t build_num
Firmware build number.
Definition dfu_metadata.h:37
uint16_t revision
Firmware revision.
Definition dfu_metadata.h:35
uint8_t major
Firmware major version.
Definition dfu_metadata.h:31
Firmware metadata.
Definition dfu_metadata.h:51
struct bt_mesh_dfu_metadata_fw_ver fw_ver
New firmware version.
Definition dfu_metadata.h:53
uint32_t fw_size
New firmware size.
Definition dfu_metadata.h:55
enum bt_mesh_dfu_metadata_fw_core_type fw_core_type
New firmware core type.
Definition dfu_metadata.h:57
uint8_t * user_data
Application-specific data for new firmware.
Definition dfu_metadata.h:63
uint16_t elems
New number of node elements.
Definition dfu_metadata.h:61
uint32_t user_data_len
Length of the application-specific field.
Definition dfu_metadata.h:65
uint32_t comp_hash
Hash of incoming Composition Data.
Definition dfu_metadata.h:59
Simple network buffer representation.
Definition net_buf.h:89