fix firmata sketch issue
This commit is contained in:
1 parent
267c1b29a4
commit
e3a1b895fd
3 files changed
+12
-3
No files matched your search
@@ -423,6 +423,11 @@ BLE_PRPH_MAX_CONN LITERAL1
|
||||
|
||||
BLE_CONN_HANDLE_INVALID LITERAL1
|
||||
|
||||
BANDWIDTH_AUTO LITERAL1
|
||||
BANDWIDTH_LOW LITERAL1
|
||||
BANDWIDTH_NORMAL LITERAL1
|
||||
BANDWIDTH_HIGH LITERAL1
|
||||
BANDWIDTH_MAX LITERAL1
|
||||
|
||||
#######################################
|
||||
# Characteristic Constants (LITERAL1)
|
||||
|
||||
@@ -40,13 +40,14 @@ BLEGap::BLEGap(void)
|
||||
{
|
||||
memclr(_peers, sizeof(_peers));
|
||||
|
||||
#if SD_VER >= 500
|
||||
_cfg_prph.mtu_max = BLE_GATT_ATT_MTU_DEFAULT;
|
||||
_cfg_central.mtu_max = BLE_GATT_ATT_MTU_DEFAULT;
|
||||
|
||||
#if SD_VER >= 500
|
||||
_cfg_prph.event_len = BLE_GAP_EVENT_LENGTH_DEFAULT;
|
||||
_cfg_prph.hvn_tx_qsize = BLE_GATTS_HVN_TX_QUEUE_SIZE_DEFAULT;
|
||||
_cfg_prph.wr_cmd_qsize = BLE_GATTC_WRITE_CMD_TX_QUEUE_SIZE_DEFAULT;
|
||||
|
||||
_cfg_central.mtu_max = BLE_GATT_ATT_MTU_DEFAULT;
|
||||
_cfg_central.event_len = BLE_GAP_EVENT_LENGTH_DEFAULT;
|
||||
_cfg_central.hvn_tx_qsize = BLE_GATTS_HVN_TX_QUEUE_SIZE_DEFAULT;
|
||||
_cfg_central.wr_cmd_qsize = BLE_GATTC_WRITE_CMD_TX_QUEUE_SIZE_DEFAULT;
|
||||
|
||||
@@ -219,7 +219,7 @@ void BLEUart::_disconnect_cb(void)
|
||||
|
||||
void BLEUart::_connect_cb (void)
|
||||
{
|
||||
if ( _tx_buffered)
|
||||
if ( _tx_buffered )
|
||||
{
|
||||
// create TXD timer TODO take connInterval into account
|
||||
// ((5*ms2tick(Bluefruit.connInterval())) / 4) / 2
|
||||
@@ -257,6 +257,9 @@ size_t BLEUart::write (const uint8_t *content, size_t len)
|
||||
return _txd.notify(content, len) ? len : 0;
|
||||
}else
|
||||
{
|
||||
// skip if not enabled
|
||||
if ( !notifyEnabled() ) return 0;
|
||||
|
||||
uint16_t written = _tx_fifo->write(content, len);
|
||||
|
||||
// TODO multiple prph connections
|
||||
|
||||
Reference in new issue
Block a user