More porting changes from ble-nrf51822

This commit is contained in:
Liyou Zhou 2015-11-24 14:07:00 +00:00
parent 82b18a5c27
commit 8ca16fedbd
3 changed files with 8 additions and 0 deletions

View File

@ -151,6 +151,7 @@ uint32_t dfu_init_prevalidate(uint8_t * p_init_data, uint32_t init_data_len)
uint32_t dfu_init_postvalidate(uint8_t * p_image, uint32_t image_len)
{
#if NEED_CRC_CHECK /* disabled for now */
uint16_t image_crc;
uint16_t received_crc;
@ -169,6 +170,7 @@ uint32_t dfu_init_postvalidate(uint8_t * p_image, uint32_t image_len)
{
return NRF_ERROR_INVALID_DATA;
}
#endif /* NEED_CRC_CHECK */
return NRF_SUCCESS;
}

View File

@ -547,7 +547,9 @@ typedef struct
{
ble_gap_addr_t peer_addr; /**< Bluetooth address of the peer device. */
ble_gap_addr_t own_addr; /**< Bluetooth address of the local device used during connection setup. */
#if !defined(TARGET_MCU_NRF51_16K_S110) && !defined(TARGET_MCU_NRF51_32K_S110)
uint8_t role; /**< BLE role for this connection, see @ref BLE_GAP_ROLES */
#endif
uint8_t irk_match :1; /**< If 1, peer device's address resolved using an IRK. */
uint8_t irk_match_idx :7; /**< Index in IRK list where the address was matched. */
ble_gap_conn_params_t conn_params; /**< GAP Connection Parameters. */

View File

@ -54,6 +54,7 @@
/** @} */
#if 0 /* The following have been duplicated in blecommon.h */
/** @defgroup BLE_UUID_VALUES Assigned Values for BLE UUIDs
* @{ */
/* Generic UUIDs, applicable to all services */
@ -79,6 +80,7 @@
#define BLE_UUID_GAP_CHARACTERISTIC_RECONN_ADDR 0x2A03 /**< Reconnection Address Characteristic. */
#define BLE_UUID_GAP_CHARACTERISTIC_PPCP 0x2A04 /**< Peripheral Preferred Connection Parameters Characteristic. */
/** @} */
#endif /* The following have been duplicated in blecommon.h */
/** @defgroup BLE_UUID_TYPES Types of UUID
@ -89,6 +91,7 @@
/** @} */
#if 0 /* The following have been duplicated in blecommon.h */
/** @defgroup BLE_APPEARANCES Bluetooth Appearance values
* @note Retrieved from http://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.gap.appearance.xml
* @{ */
@ -142,6 +145,7 @@
#define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_POD 5187 /**< Location Pod (Outdoor Sports Activity subtype). */
#define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_POD 5188 /**< Location and Navigation Pod (Outdoor Sports Activity subtype). */
/** @} */
#endif /* The following have been duplicated in blecommon.h */
/** @brief Set .type and .uuid fields of ble_uuid_struct to specified uuid value. */
#define BLE_UUID_BLE_ASSIGN(instance, value) do {\