more clean up

This commit is contained in:
hathach
2018-08-08 00:41:41 +07:00
parent 108e47438e
commit 6f40f02537
5 changed files with 15 additions and 17 deletions

View File

@ -115,7 +115,6 @@ static ble_gap_id_key_t const * m_gap_ids[1];
// Adafruit
static uint8_t _adv_handle = BLE_GAP_ADV_SET_HANDLE_NOT_SET;
extern void blinky_fast_set(bool isFast);
/**@brief Function updating Service Changed CCCD and indicate a service change to peer.
*
@ -590,7 +589,7 @@ static void on_dfu_evt(ble_dfu_t * p_dfu, ble_dfu_evt_t * p_evt)
break;
case BLE_DFU_PACKET_WRITE:
blinky_fast_set(true);
led_blink_fast(true);
on_dfu_pkt_write(p_dfu, p_evt);
break;
@ -747,7 +746,7 @@ static void on_ble_evt(ble_evt_t * p_ble_evt)
m_direct_adv_cnt = APP_DIRECTED_ADV_TIMEOUT;
blinky_fast_set(false);
led_blink_fast(false);
err_code = sd_ble_gatts_sys_attr_get(m_conn_handle,
sys_attr,

View File

@ -19,6 +19,7 @@
#include "hci_transport.h"
#include "app_timer.h"
#include "app_scheduler.h"
#include "boards/boards.h"
#define MAX_BUFFERS 4u /**< Maximum number of buffers that can be received queued without being consumed. */
@ -208,7 +209,6 @@ static void process_dfu_packet(void * p_event_data, uint16_t event_size)
packet = &m_data_queue.data_packet[index];
if (INVALID_PACKET != packet->packet_type)
{
extern void blinky_fast_set(bool isFast);
switch (DATA_QUEUE_ELEMENT_GET_PTYPE(index))
{
case DATA_PACKET:
@ -227,14 +227,14 @@ static void process_dfu_packet(void * p_event_data, uint16_t event_size)
retval = dfu_init_pkt_complete();
APP_ERROR_CHECK(retval);
blinky_fast_set(true);
led_blink_fast(true);
break;
case STOP_DATA_PACKET:
(void)dfu_image_validate();
(void)dfu_image_activate();
blinky_fast_set(false);
led_blink_fast(false);
// Break the loop by returning.
return;