封装如下函数是 同步还是异步发写数据,return是同步还是异步返回?
function sendDataRequest(sendDataBuffer) {
__ wx.writeBLECharacteristicValue({__
__ deviceId: currentDeviceId,__
__ serviceId: uuid_services,__
__ characteristicId: uuid_send,__
__ value: sendDataBuffer,__
__ success: function (res) {__
__ console.log(‘发送success的数据:’ + JSON.stringify(res));__
__ console.log(‘message发送成功’);__
__ return true;__
__ },__
__ fail: function (res) {__
__ console.log(‘发送fail的数据:’ + JSON.stringify(res));__
__ return false;__
__ },__
__ });__
}