[N32WBxxx] 关于attm_desc的问题

[复制链接]
 楼主| ysq1234 发表于 2022-12-17 09:53 | 显示全部楼层 |阅读模式
请教一下 n32wb03x_EVAL\ble\rdtss_16bit\src\app_profile\app_rdtss_16bit.c 下的这个表格,
    /* Characteristic Declaration */
    [1] = {ATT_DECL_CHARACTERISTIC, PERM(RD, ENABLE) | PERM(WRITE_REQ, ENABLE),
               0,   0},




最后的那个0,按照如下的定义,
struct attm_desc
{
    /// 16 bits UUID LSB First
    uint16_t uuid;
    /// Attribute Permissions (@see enum attm_perm_mask)
    uint16_t perm;
    /// Attribute Extended Permissions (@see enum attm_value_perm_mask)
    uint16_t ext_perm;
    /// Attribute Max Size
    /// note: for characteristic declaration contains handle offset
    /// note: for included service, contains target service handle
    uint16_t max_size;
};




应该是一个handle offset, 为什么不指向value的index(2)呢?

Sam131208 发表于 2022-12-20 16:48 | 显示全部楼层
  同问,为什么随便写个值,不影响使用?
  那么,它是干嘛的?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

主题

2

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部