From 8ca16fedbdc200fc71078aea112d802c46346756 Mon Sep 17 00:00:00 2001 From: Liyou Zhou Date: Tue, 24 Nov 2015 14:07:00 +0000 Subject: [PATCH] More porting changes from ble-nrf51822 --- .../components/libraries/bootloader_dfu/dfu_init_template.c | 2 ++ .../nordic_sdk/components/softdevice/s130/headers/ble_gap.h | 2 ++ .../nordic_sdk/components/softdevice/s130/headers/ble_types.h | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/source/nordic_sdk/components/libraries/bootloader_dfu/dfu_init_template.c b/source/nordic_sdk/components/libraries/bootloader_dfu/dfu_init_template.c index e02952d..a7dca76 100644 --- a/source/nordic_sdk/components/libraries/bootloader_dfu/dfu_init_template.c +++ b/source/nordic_sdk/components/libraries/bootloader_dfu/dfu_init_template.c @@ -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; } diff --git a/source/nordic_sdk/components/softdevice/s130/headers/ble_gap.h b/source/nordic_sdk/components/softdevice/s130/headers/ble_gap.h index 2b5931d..144eb93 100644 --- a/source/nordic_sdk/components/softdevice/s130/headers/ble_gap.h +++ b/source/nordic_sdk/components/softdevice/s130/headers/ble_gap.h @@ -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. */ diff --git a/source/nordic_sdk/components/softdevice/s130/headers/ble_types.h b/source/nordic_sdk/components/softdevice/s130/headers/ble_types.h index 065c9ed..1b2b21b 100644 --- a/source/nordic_sdk/components/softdevice/s130/headers/ble_types.h +++ b/source/nordic_sdk/components/softdevice/s130/headers/ble_types.h @@ -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 {\