ARMmbed / nrf51-sdk

Module to contain files provided by the nordic nRF51 SDK
Other
13 stars 17 forks source link

Need to keep previous improvements while moving to nrf51-sdk #2

Closed rgrover closed 8 years ago

rgrover commented 8 years ago

In some cases, we've change config constants to suit mbed OS memory constraints. We need to keep them unchanged in many cases. Please discuss these changes carefully with me. We can't simply replace our current state with the latest from the nordic SDK.

examples: device_manager_cnfg.h : DEVICE_MANAGER_MAX_BONDS should be 2 device_manager_peripheral.c: DM_DISABLE_LOGS should be nDM_DISABLE_LOGS

device_manager_peripheral.c:

   DM_TRC("[DM]: Searching for device 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X.\r\n",
           p_addr->addr[0], 
           p_addr->addr[1], 
           p_addr->addr[2], 
           p_addr->addr[3],
           p_addr->addr[4], 
           p_addr->addr[5]);

should be

    if (NULL != p_addr)
    {
        DM_TRC("[DM]: Searching for device 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X.\r\n",
               p_addr->addr[0],
               p_addr->addr[1],
               p_addr->addr[2],
               p_addr->addr[3],
               p_addr->addr[4],
               p_addr->addr[5]);
    }

pstorage_platform.h: PSTORAGE_CMD_QUEUE_SIZE should be 2

I find differences in pstorage.c. Are we sure these are safe?

the following in hci_mem_pool_internal.h are necessary for the bootloader to function correctly:

#define TX_BUF_SIZE       4u    /**< TX buffer size in bytes. */
#define RX_BUF_SIZE       32u   /**< RX buffer size in bytes. */

#define RX_BUF_QUEUE_SIZE 8u     /**< RX buffer element size. */

in dfu_app_handler.c, there are several modifications which were made intentionally, and these need to be preserved. Anything within #if NEEDED should be kept.

In dfu_init_template.c, we need to disable CRC checks within dfu_init_postvalidate

In ble_gap.h, there is an important check relating to the compatibility between s130 and s110: #if !defined(TARGET_MCU_NRF51_16K_S110) && !defined(TARGET_MCU_NRF51_32K_S110). This needs to be preserved.

In ble_types.h, there are blocks of error codes which has been commented out because it is duplicated. This needs to be preserved.

with this module, we are adding system_nrf51.c; is that reasonable? or necessary?

rgrover commented 8 years ago

ble_conn_params.c has some significant changes regarding replacing Nordic's AppTimer module with our own Ticker. This needs to be preserved.

rgrover commented 8 years ago

device_manager_peripheral.c: disable include of app_trace.h

LiyouZhou commented 8 years ago

changes ported.