rename start() to begin()
This commit is contained in:
1 parent
d342f4a6a2
commit
92e61127da
29 files changed
+62
-62
No files matched your search
@@ -48,7 +48,7 @@ void setup()
|
||||
// Configure and Start Device Information Service
|
||||
bledis.setManufacturer("Adafruit Industries");
|
||||
bledis.setModel("Bluefruit Feather52");
|
||||
bledis.start();
|
||||
bledis.begin();
|
||||
|
||||
/* Start BLE MIDI
|
||||
* Note: Apple requires BLE device must have min connection interval >= 20m
|
||||
@@ -58,7 +58,7 @@ void setup()
|
||||
* connection interval to 11.25 ms and 15 ms respectively for best performance.
|
||||
*/
|
||||
blemidi.setWriteCallback(midi_write_callback);
|
||||
blemidi.start();
|
||||
blemidi.begin();
|
||||
|
||||
// Initialize MIDI, listen to all channels
|
||||
MIDI.begin(MIDI_CHANNEL_OMNI);
|
||||
|
||||
@@ -48,7 +48,7 @@ void setup()
|
||||
// Configure and Start Device Information Service
|
||||
bledis.setManufacturer("Adafruit Industries");
|
||||
bledis.setModel("Bluefruit Feather52");
|
||||
bledis.start();
|
||||
bledis.begin();
|
||||
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ void setup()
|
||||
* up to 11.25 ms. Therefore BLEMidi::start() will try to set the min and max
|
||||
* connection interval to 11.25 ms and 15 ms respectively for best performance.
|
||||
*/
|
||||
blemidi.start();
|
||||
blemidi.begin();
|
||||
|
||||
// Connect the handleNoteOn function to the library,
|
||||
// so it is called upon reception of a NoteOn.
|
||||
|
||||
@@ -45,13 +45,13 @@ void setup()
|
||||
// Configure and Start Device Information Service
|
||||
bledis.setManufacturer("Adafruit Industries");
|
||||
bledis.setModel("Bluefruit Feather52");
|
||||
bledis.start();
|
||||
bledis.begin();
|
||||
|
||||
// Configure and Start BLE Uart Service
|
||||
bleuart.start();
|
||||
bleuart.begin();
|
||||
|
||||
// Start BLE Battery Service
|
||||
blebas.start();
|
||||
blebas.begin();
|
||||
blebas.update(100);
|
||||
|
||||
// Set up Advertising Packet
|
||||
|
||||
@@ -34,7 +34,7 @@ void setup(void)
|
||||
Bluefruit.setName("Bluefruit52");
|
||||
|
||||
// Configure and start the BLE Uart service
|
||||
bleuart.start();
|
||||
bleuart.begin();
|
||||
|
||||
// Set up the advertising packet
|
||||
setupAdv();
|
||||
|
||||
@@ -64,11 +64,11 @@ void setup()
|
||||
Serial.println("Configuring the Device Information Service");
|
||||
bledis.setManufacturer("Adafruit Industries");
|
||||
bledis.setModel("Bluefruit Feather52");
|
||||
bledis.start();
|
||||
bledis.begin();
|
||||
|
||||
// Start the BLE Battery Service and set it to 100%
|
||||
Serial.println("Configuring the Battery Service");
|
||||
blebas.start();
|
||||
blebas.begin();
|
||||
blebas.update(100);
|
||||
|
||||
// Setup the Heart Rate Monitor service using
|
||||
@@ -109,7 +109,7 @@ void setupHRM(void)
|
||||
// Heart Rate Measurement 0x2A37 Mandatory Notify
|
||||
// Body Sensor Location 0x2A38 Optional Read
|
||||
// Heart Rate Control Point 0x2A39 Conditional Write <-- Not used here
|
||||
hrms.start();
|
||||
hrms.begin();
|
||||
|
||||
// Note: You must call .start() on the BLEService before calling .start() on
|
||||
// any characteristic(s) within that service definition.. Calling .start() on
|
||||
@@ -135,7 +135,7 @@ void setupHRM(void)
|
||||
hrmc.setPermission(SECMODE_OPEN, SECMODE_NO_ACCESS);
|
||||
hrmc.setFixedLen(2);
|
||||
hrmc.setCccdWriteCallback(cccd_callback); // Optionally capture CCCD updates
|
||||
hrmc.start();
|
||||
hrmc.begin();
|
||||
uint8_t hrmdata[2] = { 0b00000110, 0x40 }; // Set the characteristic to use 8-bit values, with the sensor connected and detected
|
||||
hrmc.notify(hrmdata, 2); // Use .notify instead of .write!
|
||||
|
||||
@@ -156,7 +156,7 @@ void setupHRM(void)
|
||||
bslc.setProperties(CHR_PROPS_READ);
|
||||
bslc.setPermission(SECMODE_OPEN, SECMODE_NO_ACCESS);
|
||||
bslc.setFixedLen(1);
|
||||
bslc.start();
|
||||
bslc.begin();
|
||||
bslc.write(2); // Set the characteristic to 'Wrist' (2)
|
||||
}
|
||||
|
||||
|
||||
@@ -31,10 +31,10 @@ void setup()
|
||||
// Configure and Start Device Information Service
|
||||
bledis.setManufacturer("Adafruit Industries");
|
||||
bledis.setModel("Bluefruit Feather52");
|
||||
bledis.start();
|
||||
bledis.begin();
|
||||
|
||||
// Configure and Start BLE Uart Service
|
||||
bleuart.start();
|
||||
bleuart.begin();
|
||||
|
||||
/* Start BLE HID
|
||||
* Note: Apple requires BLE device must have min connection interval >= 20m
|
||||
@@ -43,7 +43,7 @@ void setup()
|
||||
* up to 11.25 ms. Therefore BLEHidAdafruit::start() will try to set the min and max
|
||||
* connection interval to 11.25 ms and 15 ms respectively for best performance.
|
||||
*/
|
||||
blehid.start();
|
||||
blehid.begin();
|
||||
|
||||
/* Set connection interval (min, max) to your perferred value.
|
||||
* Note: It is already set by BLEHidAdafruit::start() to 11.25ms - 15ms
|
||||
|
||||
@@ -36,13 +36,13 @@ void setup()
|
||||
// Configure and Start Device Information Service
|
||||
bledis.setManufacturer("Adafruit Industries");
|
||||
bledis.setModel("Bluefruit Feather52");
|
||||
bledis.start();
|
||||
bledis.begin();
|
||||
|
||||
// Configure and Start BLE Uart Service
|
||||
bleuart.start();
|
||||
bleuart.begin();
|
||||
|
||||
// BLE HID
|
||||
blehid.start();
|
||||
blehid.begin();
|
||||
|
||||
// Set up Advertising Packet
|
||||
setupAdv();
|
||||
|
||||
@@ -56,7 +56,7 @@ void setup(void)
|
||||
Bluefruit.setName("Bluefruit52");
|
||||
|
||||
// Configure and Start BLE Uart Service
|
||||
bleuart.start();
|
||||
bleuart.begin();
|
||||
|
||||
// Set up Advertising Packet
|
||||
setupAdv();
|
||||
|
||||
@@ -48,10 +48,10 @@ void setup(void)
|
||||
// Configure and Start Device Information Service
|
||||
bledis.setManufacturer("Adafruit Industries");
|
||||
bledis.setModel("Bluefruit Feather52");
|
||||
bledis.start();
|
||||
bledis.begin();
|
||||
|
||||
// Configure and Start BLE Uart Service
|
||||
bleuart.start();
|
||||
bleuart.begin();
|
||||
|
||||
// Set up Advertising Packet
|
||||
setupAdv();
|
||||
|
||||
@@ -171,12 +171,12 @@ ble_gatts_char_handles_t BLECharacteristic::handles(void)
|
||||
return _handles;
|
||||
}
|
||||
|
||||
err_t BLECharacteristic::start(void)
|
||||
err_t BLECharacteristic::begin(void)
|
||||
{
|
||||
_service = BLEService::lastService;
|
||||
|
||||
// Add UUID128 if needed
|
||||
uuid.add();
|
||||
uuid.begin();
|
||||
|
||||
// Permission is OPEN if passkey is disabled.
|
||||
// if (!nvm_data.core.passkey_enable) BLE_GAP_CONN_SEC_MODE_SET_OPEN(&p_char_def->permission);
|
||||
|
||||
@@ -143,7 +143,7 @@ class BLECharacteristic
|
||||
void setReadAuthorizeCallback(read_authorize_cb_t fp);
|
||||
void setWriteAuthorizeCallbak(write_authorize_cb_t fp);
|
||||
|
||||
err_t start(void);
|
||||
err_t begin(void);
|
||||
|
||||
ble_gatts_char_handles_t handles(void);
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ void BLEService::setUuid(uint8_t const uuid128[])
|
||||
err_t BLEService::addToGatt(void)
|
||||
{
|
||||
// Add UUID128 if needed
|
||||
uuid.add();
|
||||
uuid.begin();
|
||||
|
||||
uint16_t handle;
|
||||
VERIFY_STATUS( sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &uuid._uuid, &handle) );
|
||||
@@ -85,7 +85,7 @@ err_t BLEService::addToGatt(void)
|
||||
return ERROR_NONE;
|
||||
}
|
||||
|
||||
err_t BLEService::start(void)
|
||||
err_t BLEService::begin(void)
|
||||
{
|
||||
return addToGatt();
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ class BLEService
|
||||
void setUuid(uint16_t uuid16);
|
||||
void setUuid(uint8_t const uuid128[]);
|
||||
|
||||
virtual err_t start(void);
|
||||
virtual err_t begin(void);
|
||||
};
|
||||
|
||||
#endif /* BLESERVICE_H_ */
|
||||
@@ -63,7 +63,7 @@ class BLEUuid
|
||||
|
||||
// Add UUID128 if any, in case of UUID16, no ations is required
|
||||
// Application should call it anyway to be safe and consistent
|
||||
void add(void)
|
||||
void begin(void)
|
||||
{
|
||||
/* Add base uuid and decode to get uuid16
|
||||
* This should cover the already added base uuid128 previously
|
||||
|
||||
@@ -177,7 +177,7 @@ err_t AdafruitBluefruit::begin(bool prph_enable, bool central_enable)
|
||||
VERIFY_STATUS( sd_ble_gap_tx_power_set( CFG_BLE_TX_POWER_LEVEL ) );
|
||||
|
||||
/*------------- DFU OTA as built-in service -------------*/
|
||||
_dfu_svc.start();
|
||||
_dfu_svc.begin();
|
||||
|
||||
// Create RTOS Semaphore & Task for BLE Event
|
||||
_ble_event_sem = xSemaphoreCreateBinary();
|
||||
|
||||
@@ -42,14 +42,14 @@ BLEBas::BLEBas(void) :
|
||||
|
||||
}
|
||||
|
||||
err_t BLEBas::start(void)
|
||||
err_t BLEBas::begin(void)
|
||||
{
|
||||
VERIFY_STATUS( this->addToGatt() );
|
||||
|
||||
_battery.setProperties(CHR_PROPS_READ | CHR_PROPS_NOTIFY); // could support notify
|
||||
_battery.setPermission(SECMODE_OPEN, SECMODE_NO_ACCESS);
|
||||
_battery.setFixedLen(1);
|
||||
VERIFY_STATUS( _battery.start() );
|
||||
VERIFY_STATUS( _battery.begin() );
|
||||
|
||||
return ERROR_NONE;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ class BLEBas : public BLEService
|
||||
public:
|
||||
BLEBas(void);
|
||||
|
||||
virtual err_t start(void);
|
||||
virtual err_t begin(void);
|
||||
|
||||
void update(uint8_t level);
|
||||
void notify(uint8_t level);
|
||||
|
||||
@@ -174,7 +174,7 @@ BLEDfu::BLEDfu(void) : BLEService(UUID128_SVC_DFU_OTA), _chr_control(UUID128_CHR
|
||||
|
||||
}
|
||||
|
||||
err_t BLEDfu::start(void)
|
||||
err_t BLEDfu::begin(void)
|
||||
{
|
||||
VERIFY_STATUS( this->addToGatt() );
|
||||
|
||||
@@ -183,18 +183,18 @@ err_t BLEDfu::start(void)
|
||||
chr_packet.setTempMemory();
|
||||
chr_packet.setProperties(CHR_PROPS_WRITE_WO_RESP);
|
||||
chr_packet.setMaxLen(20);
|
||||
VERIFY_STATUS( chr_packet.start() );
|
||||
VERIFY_STATUS( chr_packet.begin() );
|
||||
|
||||
_chr_control.setProperties(CHR_PROPS_WRITE | CHR_PROPS_NOTIFY);
|
||||
_chr_control.setMaxLen(23);
|
||||
_chr_control.setWriteAuthorizeCallbak(bledfu_control_wr_authorize_cb);
|
||||
VERIFY_STATUS( _chr_control.start() );
|
||||
VERIFY_STATUS( _chr_control.begin() );
|
||||
|
||||
BLECharacteristic chr_revision(UUID128_CHR_DFU_REVISON);
|
||||
chr_packet.setTempMemory();
|
||||
chr_revision.setProperties(CHR_PROPS_READ);
|
||||
chr_revision.setFixedLen(2);
|
||||
VERIFY_STATUS( chr_revision.start());
|
||||
VERIFY_STATUS( chr_revision.begin());
|
||||
chr_revision.write( (uint16_t) DFU_REV_APPMODE);
|
||||
|
||||
return ERROR_NONE;
|
||||
|
||||
@@ -49,7 +49,7 @@ class BLEDfu : public BLEService
|
||||
public:
|
||||
BLEDfu(void);
|
||||
|
||||
virtual err_t start(void);
|
||||
virtual err_t begin(void);
|
||||
};
|
||||
|
||||
#endif /* BLEDFU_H_ */
|
||||
@@ -71,7 +71,7 @@ void BLEDis::setManufacturer(const char* manufacturer)
|
||||
_manufacturer = manufacturer;
|
||||
}
|
||||
|
||||
err_t BLEDis::start(void)
|
||||
err_t BLEDis::begin(void)
|
||||
{
|
||||
VERIFY_STATUS( this->addToGatt() );
|
||||
|
||||
@@ -89,7 +89,7 @@ err_t BLEDis::start(void)
|
||||
chars.setProperties(CHR_PROPS_READ);
|
||||
chars.setFixedLen(strlen(_strarr[i]));
|
||||
|
||||
VERIFY_STATUS( chars.start() );
|
||||
VERIFY_STATUS( chars.begin() );
|
||||
chars.write(_strarr[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ class BLEDis : public BLEService
|
||||
void setSoftwareRev(const char* sw_rev);
|
||||
void setManufacturer(const char* manufacturer);
|
||||
|
||||
virtual err_t start(void);
|
||||
virtual err_t begin(void);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ BLEHidAdafruit::BLEHidAdafruit(void)
|
||||
_mse_buttons = 0;
|
||||
}
|
||||
|
||||
err_t BLEHidAdafruit::start(void)
|
||||
err_t BLEHidAdafruit::begin(void)
|
||||
{
|
||||
uint16_t input_len [] = { sizeof(hid_keyboard_report_t), sizeof(hid_consumer_control_report_t), sizeof(hid_mouse_report_t) };
|
||||
uint16_t output_len[] = { 1 };
|
||||
@@ -213,7 +213,7 @@ err_t BLEHidAdafruit::start(void)
|
||||
enableBootProtocol(true, true);
|
||||
setReportMap(hid_report_descriptor, sizeof(hid_report_descriptor));
|
||||
|
||||
VERIFY_STATUS( BLEHidGeneric::start() );
|
||||
VERIFY_STATUS( BLEHidGeneric::begin() );
|
||||
|
||||
// Attemp to change the connection interval to 11.25-15 ms when starting HID
|
||||
Bluefruit.setConnInterval(9, 12);
|
||||
|
||||
@@ -52,7 +52,7 @@ class BLEHidAdafruit : public BLEHidGeneric
|
||||
public:
|
||||
BLEHidAdafruit(void);
|
||||
|
||||
virtual err_t start(void);
|
||||
virtual err_t begin(void);
|
||||
|
||||
// Keyboard
|
||||
err_t keyboardReport(hid_keyboard_report_t* report);
|
||||
|
||||
@@ -129,7 +129,7 @@ void blehidgeneric_output_cb(BLECharacteristic& chr, ble_gatts_evt_write_t* requ
|
||||
}
|
||||
)
|
||||
|
||||
err_t BLEHidGeneric::start(void)
|
||||
err_t BLEHidGeneric::begin(void)
|
||||
{
|
||||
VERIFY ( (_report_map != NULL) && _report_map_len, NRF_ERROR_INVALID_PARAM);
|
||||
|
||||
@@ -143,7 +143,7 @@ err_t BLEHidGeneric::start(void)
|
||||
|
||||
_chr_protocol->setProperties(CHR_PROPS_READ | CHR_PROPS_WRITE_WO_RESP);
|
||||
_chr_protocol->setFixedLen(1);
|
||||
VERIFY_STATUS( _chr_protocol->start() );
|
||||
VERIFY_STATUS( _chr_protocol->begin() );
|
||||
_chr_protocol->write( (uint8_t) 1);
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ err_t BLEHidGeneric::start(void)
|
||||
// Input report len is configured, else variable len up to 255
|
||||
if ( _input_len ) _chr_inputs[i].setFixedLen( _input_len[i] );
|
||||
|
||||
VERIFY_STATUS( _chr_inputs[i].start() );
|
||||
VERIFY_STATUS( _chr_inputs[i].begin() );
|
||||
}
|
||||
|
||||
// Output reports
|
||||
@@ -176,7 +176,7 @@ err_t BLEHidGeneric::start(void)
|
||||
// Input report len is configured, else variable len up to 255
|
||||
if ( _output_len ) _chr_outputs[i].setFixedLen( _output_len[i] );
|
||||
|
||||
VERIFY_STATUS( _chr_outputs[i].start() );
|
||||
VERIFY_STATUS( _chr_outputs[i].begin() );
|
||||
|
||||
_chr_outputs[i].write( (uint8_t) 0 );
|
||||
}
|
||||
@@ -187,7 +187,7 @@ err_t BLEHidGeneric::start(void)
|
||||
report_map.setProperties(CHR_PROPS_READ);
|
||||
report_map.setPermission(SECMODE_ENC_NO_MITM, SECMODE_NO_ACCESS);
|
||||
report_map.setFixedLen(_report_map_len);
|
||||
VERIFY_STATUS( report_map.start() );
|
||||
VERIFY_STATUS( report_map.begin() );
|
||||
report_map.write(_report_map, _report_map_len);
|
||||
|
||||
// Boot Keyboard Input & Output Report
|
||||
@@ -197,13 +197,13 @@ err_t BLEHidGeneric::start(void)
|
||||
_chr_boot_keyboard_input->setProperties(CHR_PROPS_READ | CHR_PROPS_NOTIFY);
|
||||
_chr_boot_keyboard_input->setFixedLen(8); // boot keyboard is 8 bytes
|
||||
_chr_boot_keyboard_input->setPermission(SECMODE_ENC_NO_MITM, SECMODE_NO_ACCESS);
|
||||
VERIFY_STATUS(_chr_boot_keyboard_input->start());
|
||||
VERIFY_STATUS(_chr_boot_keyboard_input->begin());
|
||||
|
||||
_chr_boot_keyboard_output = new BLECharacteristic(UUID16_CHR_BOOT_KEYBOARD_OUTPUT_REPORT);
|
||||
_chr_boot_keyboard_output->setProperties(CHR_PROPS_READ | CHR_PROPS_WRITE | CHR_PROPS_WRITE_WO_RESP);
|
||||
_chr_boot_keyboard_output->setFixedLen(1); // boot keyboard is 1 byte
|
||||
_chr_boot_keyboard_output->setPermission(SECMODE_ENC_NO_MITM, SECMODE_NO_ACCESS);
|
||||
VERIFY_STATUS(_chr_boot_keyboard_output->start());
|
||||
VERIFY_STATUS(_chr_boot_keyboard_output->begin());
|
||||
_chr_boot_keyboard_output->write((uint8_t) 0);
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ err_t BLEHidGeneric::start(void)
|
||||
_chr_boot_mouse_input->setProperties(CHR_PROPS_READ | CHR_PROPS_NOTIFY);
|
||||
_chr_boot_mouse_input->setFixedLen(sizeof(hid_mouse_report_t));
|
||||
_chr_boot_mouse_input->setPermission(SECMODE_ENC_NO_MITM, SECMODE_NO_ACCESS);
|
||||
VERIFY_STATUS(_chr_boot_mouse_input->start());
|
||||
VERIFY_STATUS(_chr_boot_mouse_input->begin());
|
||||
}
|
||||
|
||||
// HID Info
|
||||
@@ -223,14 +223,14 @@ err_t BLEHidGeneric::start(void)
|
||||
hid_info.setProperties(CHR_PROPS_READ);
|
||||
hid_info.setPermission(SECMODE_ENC_NO_MITM, SECMODE_NO_ACCESS);
|
||||
hid_info.setFixedLen(sizeof(_hid_info));
|
||||
VERIFY_STATUS( hid_info.start() );
|
||||
VERIFY_STATUS( hid_info.begin() );
|
||||
hid_info.write(_hid_info, sizeof(_hid_info));
|
||||
|
||||
// HID Control Point
|
||||
_chr_control.setProperties(CHR_PROPS_WRITE_WO_RESP);
|
||||
_chr_control.setPermission(SECMODE_NO_ACCESS, SECMODE_ENC_NO_MITM);
|
||||
_chr_control.setFixedLen(1);
|
||||
VERIFY_STATUS( _chr_control.start() );
|
||||
VERIFY_STATUS( _chr_control.begin() );
|
||||
_chr_control.write( (uint8_t) 0 );
|
||||
|
||||
return ERROR_NONE;
|
||||
|
||||
@@ -100,7 +100,7 @@ class BLEHidGeneric : public BLEService
|
||||
|
||||
void setOutputReportCallback(uint8_t reportID, output_report_cb_t fp);
|
||||
|
||||
virtual err_t start(void);
|
||||
virtual err_t begin(void);
|
||||
|
||||
err_t inputReport(uint8_t reportID, void const* data, int len);
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@ void BLEMidi::setWriteCallback(midi_write_cb_t fp)
|
||||
_io.setWriteCallback(blemidi_write_cb);
|
||||
}
|
||||
|
||||
err_t BLEMidi::start(void)
|
||||
err_t BLEMidi::begin(void)
|
||||
{
|
||||
VERIFY_STATUS( this->addToGatt() );
|
||||
|
||||
@@ -209,7 +209,7 @@ err_t BLEMidi::start(void)
|
||||
_io.setProperties(CHR_PROPS_READ | CHR_PROPS_WRITE | CHR_PROPS_WRITE_WO_RESP | CHR_PROPS_NOTIFY);
|
||||
_io.setPermission(SECMODE_ENC_NO_MITM, SECMODE_ENC_NO_MITM);
|
||||
|
||||
VERIFY_STATUS( _io.start() );
|
||||
VERIFY_STATUS( _io.begin() );
|
||||
|
||||
// Attempt to change the connection interval to 11.25-15 ms when starting HID
|
||||
Bluefruit.setConnInterval(9, 12);
|
||||
|
||||
@@ -67,7 +67,7 @@ class BLEMidi: public BLEService, public Stream
|
||||
|
||||
BLEMidi(uint16_t fifo_depth = BLE_MIDI_DEFAULT_FIFO_DEPTH);
|
||||
|
||||
virtual err_t start(void);
|
||||
virtual err_t begin(void);
|
||||
|
||||
// MidiInterface
|
||||
void begin(int baudrate) { (void) baudrate; }
|
||||
|
||||
@@ -86,7 +86,7 @@ void BLEUart::setRxCallback( rx_callback_t fp)
|
||||
_rx_cb = fp;
|
||||
}
|
||||
|
||||
err_t BLEUart::start(void)
|
||||
err_t BLEUart::begin(void)
|
||||
{
|
||||
VERIFY_STATUS( this->addToGatt() );
|
||||
|
||||
@@ -98,7 +98,7 @@ err_t BLEUart::start(void)
|
||||
_txd.setPermission(SECMODE_OPEN, SECMODE_NO_ACCESS);
|
||||
|
||||
_txd.setStringDescriptor("TXD");
|
||||
VERIFY_STATUS( _txd.start() );
|
||||
VERIFY_STATUS( _txd.begin() );
|
||||
|
||||
// Add RXD Characteristic
|
||||
_rxd.setProperties(CHR_PROPS_WRITE | CHR_PROPS_WRITE_WO_RESP);
|
||||
@@ -108,7 +108,7 @@ err_t BLEUart::start(void)
|
||||
_rxd.setPermission(SECMODE_NO_ACCESS, SECMODE_OPEN);
|
||||
|
||||
_rxd.setStringDescriptor("RXD");
|
||||
VERIFY_STATUS(_rxd.start());
|
||||
VERIFY_STATUS(_rxd.begin());
|
||||
|
||||
|
||||
return ERROR_NONE;
|
||||
|
||||
@@ -54,7 +54,7 @@ class BLEUart : public BLEService, public Stream
|
||||
typedef void (*rx_callback_t) (void);
|
||||
BLEUart(uint16_t fifo_depth = BLE_UART_DEFAULT_FIFO_DEPTH);
|
||||
|
||||
virtual err_t start(void);
|
||||
virtual err_t begin(void);
|
||||
|
||||
bool notifyEnabled(void);
|
||||
|
||||
|
||||
Reference in new issue
Block a user