ysq1234 发表于 2022-12-17 09:53

关于attm_desc的问题

请教一下 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]
查看完整版本: 关于attm_desc的问题