Skip to content

Commit

Permalink
Merge branch 'release/esp-zigbee-sdk-v1.3.0' into 'master'
Browse files Browse the repository at this point in the history
esp-zboss-lib: release/v1.3.0(a824e1a1)

See merge request espressif/esp-zboss-lib!65
  • Loading branch information
chshu committed Apr 26, 2024
2 parents 0d3782a + 117ce72 commit 645d140
Show file tree
Hide file tree
Showing 44 changed files with 150 additions and 87 deletions.
2 changes: 1 addition & 1 deletion idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1.2.3
version: 1.3.0
description: esp-zboss library component
url: https://github.com/espressif/esp-zboss-lib
dependencies:
Expand Down
7 changes: 7 additions & 0 deletions include/zb_address.h
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,13 @@ zb_bool_t zb_address_cmp_two_refs(zb_address_ieee_ref_t addr_ref_a, zb_address_i
*/
zb_bool_t zb_address_in_use(zb_address_ieee_ref_t ref);

/**
* @brief Check if address tables have enough memory for the new address
*
@param new_addr - new uncompressed IEEE address
* @return zb_bool_t ZB_TRUE if there is enough memory, ZB_FALSE otherwise.
*/
zb_bool_t zb_address_check_mem_for_new_addr(const zb_ieee_addr_t new_addr);
/*! @endcond */

/*! @} */
Expand Down
7 changes: 7 additions & 0 deletions include/zb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,13 @@ Ideally should rework the whole zb_config.h to suit better for that new concept.

#endif /* ZB_MACSPLIT_HOST */

/* ZB_HAVE_SERIAL_SINGLE is used by default for r22 only
* Define ZB_HAVE_MULTI_SERIAL in a vendor file for multi-serial if you need
*/
#if !defined(ZB_HAVE_MULTI_SERIAL)
#define ZB_HAVE_SERIAL_SINGLE
#endif /* ZB_HAVE_MULTI_SERIAL */

#ifdef ZB_MACSPLIT
#if defined ZB_MACSPLIT_TRANSPORT_SERIAL || defined ZB_TRANSPORT_LINUX_UART
#define ZB_MACSPLIT_TRANSPORT_TYPE ZB_MACSPLIT_TRANSPORT_TYPE_SERIAL
Expand Down
36 changes: 26 additions & 10 deletions include/zb_config_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,25 +72,25 @@
- 900)

typedef enum {
RADIO_MODE_INIT_UART = 0x0,
HOST_MODE_INIT_UART = 0x1,
ZB_RADIO_MODE_INIT_UART = 0x0,
ZB_HOST_MODE_INIT_UART = 0x1,
} zb_esp_uart_init_mode;

typedef enum {
RADIO_MODE_NATIVE = 0x0, /*!< Use the native 15.4 radio */
RADIO_MODE_UART_RCP = 0x1, /*!< UART connection to a 15.4 capable radio co - processor (RCP) */
RADIO_MODE_SPI_RCP = 0x2, /*!< SPI connection to a 15.4 capable radio co - processor (RCP) */
ZB_RADIO_MODE_NATIVE = 0x0, /*!< Use the native 15.4 radio */
ZB_RADIO_MODE_UART_RCP = 0x1, /*!< UART connection to a 15.4 capable radio co - processor (RCP) */
ZB_RADIO_MODE_SPI_RCP = 0x2, /*!< SPI connection to a 15.4 capable radio co - processor (RCP) */
} esp_zb_radio_mode_t;

typedef enum {
HOST_CONNECTION_MODE_NONE = 0x0, /*!< Disable host connection */
HOST_CONNECTION_MODE_CLI_UART = 0x1, /*!< CLI UART connection to the host */
HOST_CONNECTION_MODE_RCP_UART = 0x2, /*!< RCP UART connection to the host */
ZB_HOST_CONNECTION_MODE_NONE = 0x0, /*!< Disable host connection */
ZB_HOST_CONNECTION_MODE_CLI_UART = 0x1, /*!< CLI UART connection to the host */
ZB_HOST_CONNECTION_MODE_RCP_UART = 0x2, /*!< RCP UART connection to the host */
} esp_zb_host_connection_mode_t;

typedef enum {
SERIAL_MODE_DISABLE = 0x0, /*!< Disable osif serial mode */
SERIAL_MODE_UART = 0x1, /*!< osif serial mode through uart */
ZB_SERIAL_MODE_DISABLE = 0x0, /*!< Disable osif serial mode */
ZB_SERIAL_MODE_UART = 0x1, /*!< osif serial mode through uart */
} esp_zb_serial_mode_t;

typedef struct {
Expand Down Expand Up @@ -133,6 +133,22 @@ typedef void (*esp_rcp_failure_callback_t)(uint8_t param);
esp_err_t esp_zb_platform_config(esp_zb_platform_config_t *config);
esp_err_t esp_zb_platform_serial_config_set(esp_zb_serial_config_t *serial_config);

/**
* @brief Get the espressif soc platform config
*
* @return - pointer to platform configuration @ref esp_zb_platform_config_t
*
*/
esp_zb_platform_config_t* esp_zb_platform_config_get(void);

/**
* @brief Get the espressif soc platform serial config
*
* @return - pointer to platform serial configuration @ref esp_zb_serial_config_t
*
*/
esp_zb_serial_config_t* esp_zb_platform_serial_config_get(void);

/**
* @brief Get the rcp Zigbee rcp version string
*
Expand Down
1 change: 0 additions & 1 deletion include/zb_scheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ typedef struct zb_sched_globals_s
ZB_POOLED_LIST8_DEFINE(tm_freelist); /*!< freelist of the timer queue entries */
zb_delayed_cb_q_t delayed_queue[2]; /*!< queue to store delayed callbacks for getting in and out buffers (@ref buffer_types)*/
zb_uint8_t tm_buffer_usage; /*!< Usage of timer queue */
zb_uint8_t delayed_buf_usage; /*!< Usage of waiting for free buffer queue */
zb_bool_t stop;
zb_bool_t stopping;
zb_sched_stopping_cb_checker_t stopping_cb_checker;
Expand Down
6 changes: 6 additions & 0 deletions include/zb_trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ extern zb_uint_t g_trace_inside_intr;
#define TRACE_SUBSYSTEM_ZBDIRECT 0x8000000U /**< Zigbee Direct subsystem */
#define TRACE_SUBSYSTEM_DIAGNOSTIC 0x10000000U /**< Diagnostic subsystem */
#define TRACE_SUBSYSTEM_NS 0x20000000U /**< Network simulator subsystem */
#define TRACE_SUBSYSTEM_TEST 0x40000000U /**< Subsystem for tests and CI */
/** @endcond */ /* DOXYGEN_INTERNAL_DOC */

#define TRACE_SUBSYSTEM_INFO ((zb_uint_t)-1) /**< Common subsystem */
Expand Down Expand Up @@ -1274,6 +1275,11 @@ typedef struct zb_byte128_struct_s
#define TRACE_NS2 TRACE_SUBSYSTEM_NS, 2U
#define TRACE_NS3 TRACE_SUBSYSTEM_NS, 3U
#define TRACE_NS4 TRACE_SUBSYSTEM_NS, 4U

#define TRACE_TEST1 TRACE_SUBSYSTEM_TEST, 1U
#define TRACE_TEST2 TRACE_SUBSYSTEM_TEST, 2U
#define TRACE_TEST3 TRACE_SUBSYSTEM_TEST, 3U
#define TRACE_TEST4 TRACE_SUBSYSTEM_TEST, 4U
#endif /* DOXYGEN */

#ifndef ZB_SET_TRACE_LEVEL
Expand Down
8 changes: 6 additions & 2 deletions include/zboss_api_buf.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,9 @@ void *zb_buf_alloc_left_func(TRACE_PROTO zb_bufid_t buf, zb_uint_t size);
* Depending on the specific value, the buffer pool may decide to use a fraction
* of buffer or long buffers. If the value is set to 0, the payload size will be equal
* to the size of a single default buffer.
* @return RET_OK or error code.
* @return RET_OK if allocation has successfully scheduled.
* RET_ERROR if there is no room to schedule buffer allocation.
* RET_OUT_OF_RANGE if buffer with such payload size can't be allocated.
*/
#ifndef zb_buf_get_out_delayed_ext
#define zb_buf_get_out_delayed_ext(callback,arg,max_size) zb_buf_get_out_delayed_ext_func(TRACE_CALL (callback),(arg),(max_size))
Expand All @@ -333,7 +335,9 @@ void *zb_buf_alloc_left_func(TRACE_PROTO zb_bufid_t buf, zb_uint_t size);
* Depending on the specific value, the buffer pool may decide to use a fraction
* of buffer or long buffers. If the value is set to 0, the payload size will be equal
* to the size of a single default buffer.
* @return RET_OK or error code.
* @return RET_OK if allocation has successfully scheduled.
* RET_ERROR if there is no room to schedule buffer allocation.
* RET_OUT_OF_RANGE if buffer with such payload size can't be allocated.
*/
#ifndef zb_buf_get_in_delayed_ext
#define zb_buf_get_in_delayed_ext(callback,arg,max_size) zb_buf_get_in_delayed_ext_func(TRACE_CALL (callback),(arg),(max_size))
Expand Down
Loading

0 comments on commit 645d140

Please sign in to comment.