请问一下上述两者有什么区别,下面给出从机程序出现这部分的
// Simple Profile Characteristic 1 Properties
static uint8 simpleProfileChar1Props = GATT_PROP_READ | GATT_PROP_WRITE;
{ { ATT_BT_UUID_SIZE, characterUUID },
GATT_PERMIT_READ, 0,
&simpleProfileChar1Props },
// Characteristic Value 1
{ { ATT_BT_UUID_SIZE, simpleProfilechar1UUID },
GATT_PERMIT_READ | GATT_PERMIT_WRITE, 0,#ifdef HAL_UART_TRANS
simpleProfileChar1
#else
&simpleProfileChar1#endif
},
simpleProfileChar1Props 被定义成GATT_PROP_READ | GATT_PROP_WRITE,而simpleprofilechar1则被定义成GATT_PERMIT_READ | GATT_PERMIT_WRITE,这两者有什么区别啊?请假一下
boson chen:
GATT_PROP_READ :可读 GATT_PROP_WRITE:可写 GATT_PERMIT_READ:禁止读 GATT_PERMIT_WRITE:禁止写 这个可根据不同的需求自由设置。限制特征值的属性, 例如有的特征值只希望可以读,不希望被远端修改, 则设置为GATT_READ | GATT_PERMIT_WRITE,