bugfix for duplicate symbol
Fork of nRF51822 by
nordic-sdk/components/libraries/bootloader_dfu/bootloader.h@177:7a1917171a20, 2015-05-15 (annotated)
- Committer:
- finneyj
- Date:
- Fri May 15 12:12:21 2015 +0000
- Revision:
- 177:7a1917171a20
- Parent:
- 103:138bdc859cc9
bug fix - redefined symbol
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rgrover1 | 103:138bdc859cc9 | 1 | /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. |
rgrover1 | 103:138bdc859cc9 | 2 | * |
rgrover1 | 103:138bdc859cc9 | 3 | * The information contained herein is property of Nordic Semiconductor ASA. |
rgrover1 | 103:138bdc859cc9 | 4 | * Terms and conditions of usage are described in detail in NORDIC |
rgrover1 | 103:138bdc859cc9 | 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. |
rgrover1 | 103:138bdc859cc9 | 6 | * |
rgrover1 | 103:138bdc859cc9 | 7 | * Licensees are granted free, non-transferable use of the information. NO |
rgrover1 | 103:138bdc859cc9 | 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from |
rgrover1 | 103:138bdc859cc9 | 9 | * the file. |
rgrover1 | 103:138bdc859cc9 | 10 | * |
rgrover1 | 103:138bdc859cc9 | 11 | */ |
rgrover1 | 103:138bdc859cc9 | 12 | |
rgrover1 | 103:138bdc859cc9 | 13 | /**@file |
rgrover1 | 103:138bdc859cc9 | 14 | * |
rgrover1 | 103:138bdc859cc9 | 15 | * @defgroup nrf_bootloader Bootloader API. |
rgrover1 | 103:138bdc859cc9 | 16 | * @{ |
rgrover1 | 103:138bdc859cc9 | 17 | * |
rgrover1 | 103:138bdc859cc9 | 18 | * @brief Bootloader module interface. |
rgrover1 | 103:138bdc859cc9 | 19 | */ |
rgrover1 | 103:138bdc859cc9 | 20 | |
rgrover1 | 103:138bdc859cc9 | 21 | #ifndef BOOTLOADER_H__ |
rgrover1 | 103:138bdc859cc9 | 22 | #define BOOTLOADER_H__ |
rgrover1 | 103:138bdc859cc9 | 23 | |
rgrover1 | 103:138bdc859cc9 | 24 | #include <stdbool.h> |
rgrover1 | 103:138bdc859cc9 | 25 | #include <stdint.h> |
rgrover1 | 103:138bdc859cc9 | 26 | #include "bootloader_types.h" |
rgrover1 | 103:138bdc859cc9 | 27 | #include "dfu_types.h" |
rgrover1 | 103:138bdc859cc9 | 28 | |
rgrover1 | 103:138bdc859cc9 | 29 | /**@brief Function for initializing the Bootloader. |
rgrover1 | 103:138bdc859cc9 | 30 | * |
rgrover1 | 103:138bdc859cc9 | 31 | * @retval NRF_SUCCESS If bootloader was succesfully initialized. |
rgrover1 | 103:138bdc859cc9 | 32 | */ |
rgrover1 | 103:138bdc859cc9 | 33 | uint32_t bootloader_init(void); |
rgrover1 | 103:138bdc859cc9 | 34 | |
rgrover1 | 103:138bdc859cc9 | 35 | /**@brief Function for validating application region in flash. |
rgrover1 | 103:138bdc859cc9 | 36 | * |
rgrover1 | 103:138bdc859cc9 | 37 | * @param[in] app_addr Address to the region in flash where the application is stored. |
rgrover1 | 103:138bdc859cc9 | 38 | * |
rgrover1 | 103:138bdc859cc9 | 39 | * @retval true If Application region is valid. |
rgrover1 | 103:138bdc859cc9 | 40 | * @retval false If Application region is not valid. |
rgrover1 | 103:138bdc859cc9 | 41 | */ |
rgrover1 | 103:138bdc859cc9 | 42 | bool bootloader_app_is_valid(uint32_t app_addr); |
rgrover1 | 103:138bdc859cc9 | 43 | |
rgrover1 | 103:138bdc859cc9 | 44 | /**@brief Function for starting the Device Firmware Update. |
rgrover1 | 103:138bdc859cc9 | 45 | * |
rgrover1 | 103:138bdc859cc9 | 46 | * @retval NRF_SUCCESS If new application image was successfully transferred. |
rgrover1 | 103:138bdc859cc9 | 47 | */ |
rgrover1 | 103:138bdc859cc9 | 48 | uint32_t bootloader_dfu_start(void); |
rgrover1 | 103:138bdc859cc9 | 49 | |
rgrover1 | 103:138bdc859cc9 | 50 | /**@brief Function for exiting bootloader and booting into application. |
rgrover1 | 103:138bdc859cc9 | 51 | * |
rgrover1 | 103:138bdc859cc9 | 52 | * @details This function will disable SoftDevice and all interrupts before jumping to application. |
rgrover1 | 103:138bdc859cc9 | 53 | * The SoftDevice vector table base for interrupt forwarding will be set the application |
rgrover1 | 103:138bdc859cc9 | 54 | * address. |
rgrover1 | 103:138bdc859cc9 | 55 | * |
rgrover1 | 103:138bdc859cc9 | 56 | * @param[in] app_addr Address to the region where the application is stored. |
rgrover1 | 103:138bdc859cc9 | 57 | */ |
rgrover1 | 103:138bdc859cc9 | 58 | void bootloader_app_start(uint32_t app_addr); |
rgrover1 | 103:138bdc859cc9 | 59 | |
rgrover1 | 103:138bdc859cc9 | 60 | /**@brief Function for retrieving the bootloader settings. |
rgrover1 | 103:138bdc859cc9 | 61 | * |
rgrover1 | 103:138bdc859cc9 | 62 | * @param[out] p_settings A copy of the current bootloader settings is returned in the structure |
rgrover1 | 103:138bdc859cc9 | 63 | * provided. |
rgrover1 | 103:138bdc859cc9 | 64 | */ |
rgrover1 | 103:138bdc859cc9 | 65 | void bootloader_settings_get(bootloader_settings_t * const p_settings); |
rgrover1 | 103:138bdc859cc9 | 66 | |
rgrover1 | 103:138bdc859cc9 | 67 | /**@brief Function for processing DFU status update. |
rgrover1 | 103:138bdc859cc9 | 68 | * |
rgrover1 | 103:138bdc859cc9 | 69 | * @param[in] update_status DFU update status. |
rgrover1 | 103:138bdc859cc9 | 70 | */ |
rgrover1 | 103:138bdc859cc9 | 71 | void bootloader_dfu_update_process(dfu_update_status_t update_status); |
rgrover1 | 103:138bdc859cc9 | 72 | |
rgrover1 | 103:138bdc859cc9 | 73 | /**@brief Function getting state of SoftDevice update in progress. |
rgrover1 | 103:138bdc859cc9 | 74 | * After a successfull SoftDevice transfer the system restarts in orderto disable SoftDevice |
rgrover1 | 103:138bdc859cc9 | 75 | * and complete the update. |
rgrover1 | 103:138bdc859cc9 | 76 | * |
rgrover1 | 103:138bdc859cc9 | 77 | * @retval true A SoftDevice update is in progress. This indicates that second stage |
rgrover1 | 103:138bdc859cc9 | 78 | * of a SoftDevice update procedure can be initiated. |
rgrover1 | 103:138bdc859cc9 | 79 | * @retval false No SoftDevice update is in progress. |
rgrover1 | 103:138bdc859cc9 | 80 | */ |
rgrover1 | 103:138bdc859cc9 | 81 | bool bootloader_dfu_sd_in_progress(void); |
rgrover1 | 103:138bdc859cc9 | 82 | |
rgrover1 | 103:138bdc859cc9 | 83 | /**@brief Function for continuing the Device Firmware Update of a SoftDevice. |
rgrover1 | 103:138bdc859cc9 | 84 | * |
rgrover1 | 103:138bdc859cc9 | 85 | * @retval NRF_SUCCESS If the final stage of SoftDevice update was successful. |
rgrover1 | 103:138bdc859cc9 | 86 | */ |
rgrover1 | 103:138bdc859cc9 | 87 | uint32_t bootloader_dfu_sd_update_continue(void); |
rgrover1 | 103:138bdc859cc9 | 88 | |
rgrover1 | 103:138bdc859cc9 | 89 | /**@brief Function for finalizing the Device Firmware Update of a SoftDevice. |
rgrover1 | 103:138bdc859cc9 | 90 | * |
rgrover1 | 103:138bdc859cc9 | 91 | * @retval NRF_SUCCESS If the final stage of SoftDevice update was successful. |
rgrover1 | 103:138bdc859cc9 | 92 | */ |
rgrover1 | 103:138bdc859cc9 | 93 | uint32_t bootloader_dfu_sd_update_finalize(void); |
rgrover1 | 103:138bdc859cc9 | 94 | |
rgrover1 | 103:138bdc859cc9 | 95 | #endif // BOOTLOADER_H__ |
rgrover1 | 103:138bdc859cc9 | 96 | |
rgrover1 | 103:138bdc859cc9 | 97 | /**@} */ |