![](/media/cache/profiles/312e53ccba0b2ddfefd4a1f05b55bcdd.jpg.50x50_q85.jpg)
BLE FOTA APP
It doesn't work with the default FOTA bootloader. It use NVIC_SystemReset() to enter a bootloader.
nRF51822/nordic/nrf-sdk/s110/softdevice_assert.h@1:a607cd9655d7, 2014-10-10 (annotated)
- 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?
User | Revision | Line number | New 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 | |
yihui | 1:a607cd9655d7 | 10 | /** @brief Utilities for verifying program logic |
yihui | 1:a607cd9655d7 | 11 | */ |
yihui | 1:a607cd9655d7 | 12 | |
yihui | 1:a607cd9655d7 | 13 | #ifndef SOFTDEVICE_ASSERT_H_ |
yihui | 1:a607cd9655d7 | 14 | #define SOFTDEVICE_ASSERT_H_ |
yihui | 1:a607cd9655d7 | 15 | |
yihui | 1:a607cd9655d7 | 16 | #include <stdint.h> |
yihui | 1:a607cd9655d7 | 17 | |
yihui | 1:a607cd9655d7 | 18 | /** @brief This function handles assertions. |
yihui | 1:a607cd9655d7 | 19 | * |
yihui | 1:a607cd9655d7 | 20 | * |
yihui | 1:a607cd9655d7 | 21 | * @note |
yihui | 1:a607cd9655d7 | 22 | * This function is called when an assertion has triggered. |
yihui | 1:a607cd9655d7 | 23 | * |
yihui | 1:a607cd9655d7 | 24 | * |
yihui | 1:a607cd9655d7 | 25 | * @param line_num The line number where the assertion is called |
yihui | 1:a607cd9655d7 | 26 | * @param file_name Pointer to the file name |
yihui | 1:a607cd9655d7 | 27 | */ |
yihui | 1:a607cd9655d7 | 28 | void assert_softdevice_callback(uint16_t line_num, const uint8_t *file_name); |
yihui | 1:a607cd9655d7 | 29 | |
yihui | 1:a607cd9655d7 | 30 | |
yihui | 1:a607cd9655d7 | 31 | /*lint -emacro(506, ASSERT) */ /* Suppress "Constant value Boolean */ |
yihui | 1:a607cd9655d7 | 32 | /*lint -emacro(774, ASSERT) */ /* Suppress "Boolean within 'if' always evaluates to True" */ \ |
yihui | 1:a607cd9655d7 | 33 | /** @brief Check intended for production code |
yihui | 1:a607cd9655d7 | 34 | * |
yihui | 1:a607cd9655d7 | 35 | * Check passes if "expr" evaluates to true. */ |
yihui | 1:a607cd9655d7 | 36 | #define ASSERT(expr) \ |
yihui | 1:a607cd9655d7 | 37 | if (expr) \ |
yihui | 1:a607cd9655d7 | 38 | { \ |
yihui | 1:a607cd9655d7 | 39 | } \ |
yihui | 1:a607cd9655d7 | 40 | else \ |
yihui | 1:a607cd9655d7 | 41 | { \ |
yihui | 1:a607cd9655d7 | 42 | assert_softdevice_callback((uint16_t)__LINE__, (uint8_t *)__FILE__); \ |
yihui | 1:a607cd9655d7 | 43 | /*lint -unreachable */ \ |
yihui | 1:a607cd9655d7 | 44 | } |
yihui | 1:a607cd9655d7 | 45 | |
yihui | 1:a607cd9655d7 | 46 | #endif /* SOFTDEVICE_ASSERT_H_ */ |