テスト用です。

Dependencies:   mbed

Committer:
jksoft
Date:
Tue Oct 11 11:09:42 2016 +0000
Revision:
0:8468a4403fea
SB??ver;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jksoft 0:8468a4403fea 1 /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
jksoft 0:8468a4403fea 2 *
jksoft 0:8468a4403fea 3 * The information contained herein is property of Nordic Semiconductor ASA.
jksoft 0:8468a4403fea 4 * Terms and conditions of usage are described in detail in NORDIC
jksoft 0:8468a4403fea 5 * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
jksoft 0:8468a4403fea 6 *
jksoft 0:8468a4403fea 7 * Licensees are granted free, non-transferable use of the information. NO
jksoft 0:8468a4403fea 8 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
jksoft 0:8468a4403fea 9 * the file.
jksoft 0:8468a4403fea 10 *
jksoft 0:8468a4403fea 11 */
jksoft 0:8468a4403fea 12
jksoft 0:8468a4403fea 13 /**@file
jksoft 0:8468a4403fea 14 *
jksoft 0:8468a4403fea 15 * @defgroup nrf_bootloader_types Types and definitions.
jksoft 0:8468a4403fea 16 * @{
jksoft 0:8468a4403fea 17 *
jksoft 0:8468a4403fea 18 * @ingroup nrf_bootloader
jksoft 0:8468a4403fea 19 *
jksoft 0:8468a4403fea 20 * @brief Bootloader module type and definitions.
jksoft 0:8468a4403fea 21 */
jksoft 0:8468a4403fea 22
jksoft 0:8468a4403fea 23 #ifndef BOOTLOADER_TYPES_H__
jksoft 0:8468a4403fea 24 #define BOOTLOADER_TYPES_H__
jksoft 0:8468a4403fea 25
jksoft 0:8468a4403fea 26 #include <stdint.h>
jksoft 0:8468a4403fea 27
jksoft 0:8468a4403fea 28 #define BOOTLOADER_DFU_START 0xB1
jksoft 0:8468a4403fea 29
jksoft 0:8468a4403fea 30 /**@brief DFU Bank state code, which indicates wether the bank contains: A valid image, invalid image, or an erased flash.
jksoft 0:8468a4403fea 31 */
jksoft 0:8468a4403fea 32 typedef enum
jksoft 0:8468a4403fea 33 {
jksoft 0:8468a4403fea 34 BANK_VALID_APP = 0x01,
jksoft 0:8468a4403fea 35 BANK_VALID_SD = 0xA5,
jksoft 0:8468a4403fea 36 BANK_VALID_BOOT = 0xAA,
jksoft 0:8468a4403fea 37 BANK_ERASED = 0xFE,
jksoft 0:8468a4403fea 38 BANK_INVALID_APP = 0xFF,
jksoft 0:8468a4403fea 39 } bootloader_bank_code_t;
jksoft 0:8468a4403fea 40
jksoft 0:8468a4403fea 41 /**@brief Structure holding bootloader settings for application and bank data.
jksoft 0:8468a4403fea 42 */
jksoft 0:8468a4403fea 43 typedef struct
jksoft 0:8468a4403fea 44 {
jksoft 0:8468a4403fea 45 bootloader_bank_code_t bank_0; /**< Variable to store if bank 0 contains a valid application. */
jksoft 0:8468a4403fea 46 uint16_t bank_0_crc; /**< If bank is valid, this field will contain a valid CRC of the total image. */
jksoft 0:8468a4403fea 47 bootloader_bank_code_t bank_1; /**< Variable to store if bank 1 has been erased/prepared for new image. Bank 1 is only used in Banked Update scenario. */
jksoft 0:8468a4403fea 48 uint32_t bank_0_size; /**< Size of active image in bank0 if present, otherwise 0. */
jksoft 0:8468a4403fea 49 uint32_t sd_image_size; /**< Size of SoftDevice image in bank0 if bank_0 code is \ref BANK_VALID_SD. */
jksoft 0:8468a4403fea 50 uint32_t bl_image_size; /**< Size of Bootloader image in bank0 if bank_0 code is \ref BANK_VALID_SD. */
jksoft 0:8468a4403fea 51 uint32_t app_image_size; /**< Size of Application image in bank0 if bank_0 code is \ref BANK_VALID_SD. */
jksoft 0:8468a4403fea 52 uint32_t sd_image_start; /**< Location in flash where SoftDevice image is stored for SoftDevice update. */
jksoft 0:8468a4403fea 53 } bootloader_settings_t;
jksoft 0:8468a4403fea 54
jksoft 0:8468a4403fea 55 #endif // BOOTLOADER_TYPES_H__
jksoft 0:8468a4403fea 56
jksoft 0:8468a4403fea 57 /**@} */