BLE FOTA APP

Dependencies:   BLE_API mbed

It doesn't work with the default FOTA bootloader. It use NVIC_SystemReset() to enter a bootloader.

Committer:
yihui
Date:
Fri Oct 10 03:36:28 2014 +0000
Revision:
1:a607cd9655d7
use NVIC_SystemReset() to run bootloader

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yihui 1:a607cd9655d7 1 /*
yihui 1:a607cd9655d7 2 Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
yihui 1:a607cd9655d7 3
yihui 1:a607cd9655d7 4 The information contained herein is confidential property of Nordic Semiconductor. The use,
yihui 1:a607cd9655d7 5 copying, transfer or disclosure of such information is prohibited except by express written
yihui 1:a607cd9655d7 6 agreement with Nordic Semiconductor.
yihui 1:a607cd9655d7 7 */
yihui 1:a607cd9655d7 8 /**
yihui 1:a607cd9655d7 9 @addtogroup BLE_COMMON
yihui 1:a607cd9655d7 10 @{
yihui 1:a607cd9655d7 11 @defgroup ble_ranges Module specific SVC and event number subranges
yihui 1:a607cd9655d7 12 @{
yihui 1:a607cd9655d7 13
yihui 1:a607cd9655d7 14 @brief Definition of SVC and event number subranges for each API module.
yihui 1:a607cd9655d7 15
yihui 1:a607cd9655d7 16 @note
yihui 1:a607cd9655d7 17 SVCs and event numbers are split into subranges for each API module.
yihui 1:a607cd9655d7 18 Each module receives its entire allocated range of SVC calls, whether implemented or not,
yihui 1:a607cd9655d7 19 but return BLE_ERROR_NOT_SUPPORTED for unimplemented or undefined calls in its range.
yihui 1:a607cd9655d7 20
yihui 1:a607cd9655d7 21 Note that the symbols BLE_<module>_SVC_LAST is the end of the allocated SVC range,
yihui 1:a607cd9655d7 22 rather than the last SVC function call actually defined and implemented.
yihui 1:a607cd9655d7 23
yihui 1:a607cd9655d7 24 Specific SVC and event values are defined in each module's ble_<module>.h file,
yihui 1:a607cd9655d7 25 which defines names of each individual SVC code based on the range start value.
yihui 1:a607cd9655d7 26 */
yihui 1:a607cd9655d7 27
yihui 1:a607cd9655d7 28 #ifndef BLE_RANGES_H__
yihui 1:a607cd9655d7 29 #define BLE_RANGES_H__
yihui 1:a607cd9655d7 30
yihui 1:a607cd9655d7 31 #define BLE_SVC_BASE 0x60
yihui 1:a607cd9655d7 32 #define BLE_SVC_LAST 0x6B /* Total: 12. */
yihui 1:a607cd9655d7 33
yihui 1:a607cd9655d7 34 #define BLE_RESERVED_SVC_BASE 0x6C
yihui 1:a607cd9655d7 35 #define BLE_RESERVED_SVC_LAST 0x6F /* Total: 4. */
yihui 1:a607cd9655d7 36
yihui 1:a607cd9655d7 37 #define BLE_GAP_SVC_BASE 0x70
yihui 1:a607cd9655d7 38 #define BLE_GAP_SVC_LAST 0x8F /* Total: 32. */
yihui 1:a607cd9655d7 39
yihui 1:a607cd9655d7 40 #define BLE_GATTC_SVC_BASE 0x90
yihui 1:a607cd9655d7 41 #define BLE_GATTC_SVC_LAST 0x9F /* Total: 16. */
yihui 1:a607cd9655d7 42
yihui 1:a607cd9655d7 43 #define BLE_GATTS_SVC_BASE 0xA0
yihui 1:a607cd9655d7 44 #define BLE_GATTS_SVC_LAST 0xAF /* Total: 16. */
yihui 1:a607cd9655d7 45
yihui 1:a607cd9655d7 46 #define BLE_L2CAP_SVC_BASE 0xB0
yihui 1:a607cd9655d7 47 #define BLE_L2CAP_SVC_LAST 0xBF /* Total: 16. */
yihui 1:a607cd9655d7 48
yihui 1:a607cd9655d7 49
yihui 1:a607cd9655d7 50 #define BLE_EVT_INVALID 0x00
yihui 1:a607cd9655d7 51
yihui 1:a607cd9655d7 52 #define BLE_EVT_BASE 0x01
yihui 1:a607cd9655d7 53 #define BLE_EVT_LAST 0x0F /* Total: 15. */
yihui 1:a607cd9655d7 54
yihui 1:a607cd9655d7 55 #define BLE_GAP_EVT_BASE 0x10
yihui 1:a607cd9655d7 56 #define BLE_GAP_EVT_LAST 0x2F /* Total: 32. */
yihui 1:a607cd9655d7 57
yihui 1:a607cd9655d7 58 #define BLE_GATTC_EVT_BASE 0x30
yihui 1:a607cd9655d7 59 #define BLE_GATTC_EVT_LAST 0x4F /* Total: 32. */
yihui 1:a607cd9655d7 60
yihui 1:a607cd9655d7 61 #define BLE_GATTS_EVT_BASE 0x50
yihui 1:a607cd9655d7 62 #define BLE_GATTS_EVT_LAST 0x6F /* Total: 32. */
yihui 1:a607cd9655d7 63
yihui 1:a607cd9655d7 64 #define BLE_L2CAP_EVT_BASE 0x70
yihui 1:a607cd9655d7 65 #define BLE_L2CAP_EVT_LAST 0x8F /* Total: 32. */
yihui 1:a607cd9655d7 66
yihui 1:a607cd9655d7 67 #define BLE_OPT_INVALID 0x00 /**< Invalid BLE Option. */
yihui 1:a607cd9655d7 68
yihui 1:a607cd9655d7 69 #define BLE_OPT_BASE 0x01 /**< Common BLE Option base. */
yihui 1:a607cd9655d7 70 #define BLE_OPT_LAST 0x1F /**< Total: 31. */
yihui 1:a607cd9655d7 71
yihui 1:a607cd9655d7 72 #define BLE_GAP_OPT_BASE 0x20 /**< GAP BLE Option base. */
yihui 1:a607cd9655d7 73 #define BLE_GAP_OPT_LAST 0x3F /**< Total: 32. */
yihui 1:a607cd9655d7 74
yihui 1:a607cd9655d7 75 #define BLE_GATTC_OPT_BASE 0x40 /**< GATTC BLE Option base. */
yihui 1:a607cd9655d7 76 #define BLE_GATTC_OPT_LAST 0x5F /**< Total: 32. */
yihui 1:a607cd9655d7 77
yihui 1:a607cd9655d7 78 #define BLE_GATTS_OPT_BASE 0x60 /**< GATTS BLE Option base. */
yihui 1:a607cd9655d7 79 #define BLE_GATTS_OPT_LAST 0x7F /**< Total: 32. */
yihui 1:a607cd9655d7 80
yihui 1:a607cd9655d7 81 #define BLE_L2CAP_OPT_BASE 0x80 /**< L2CAP BLE Option base. */
yihui 1:a607cd9655d7 82 #define BLE_L2CAP_OPT_LAST 0x9F /**< Total: 32. */
yihui 1:a607cd9655d7 83
yihui 1:a607cd9655d7 84 #endif /* BLE_RANGES_H__ */
yihui 1:a607cd9655d7 85
yihui 1:a607cd9655d7 86 /**
yihui 1:a607cd9655d7 87 @}
yihui 1:a607cd9655d7 88 @}
yihui 1:a607cd9655d7 89 */