Repostiory containing DAPLink source code with Reset Pin workaround for HANI_IOT board.

Upstream: https://github.com/ARMmbed/DAPLink

Committer:
Pawel Zarembski
Date:
Tue Apr 07 12:55:42 2020 +0200
Revision:
0:01f31e923fe2
hani: DAPLink with reset workaround

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Pawel Zarembski 0:01f31e923fe2 1 /**
Pawel Zarembski 0:01f31e923fe2 2 * @file settings.h
Pawel Zarembski 0:01f31e923fe2 3 * @brief Access to read user configuration settings
Pawel Zarembski 0:01f31e923fe2 4 *
Pawel Zarembski 0:01f31e923fe2 5 * DAPLink Interface Firmware
Pawel Zarembski 0:01f31e923fe2 6 * Copyright (c) 2009-2016, ARM Limited, All Rights Reserved
Pawel Zarembski 0:01f31e923fe2 7 * Copyright 2019, Cypress Semiconductor Corporation
Pawel Zarembski 0:01f31e923fe2 8 * or a subsidiary of Cypress Semiconductor Corporation.
Pawel Zarembski 0:01f31e923fe2 9 * SPDX-License-Identifier: Apache-2.0
Pawel Zarembski 0:01f31e923fe2 10 *
Pawel Zarembski 0:01f31e923fe2 11 * Licensed under the Apache License, Version 2.0 (the "License"); you may
Pawel Zarembski 0:01f31e923fe2 12 * not use this file except in compliance with the License.
Pawel Zarembski 0:01f31e923fe2 13 * You may obtain a copy of the License at
Pawel Zarembski 0:01f31e923fe2 14 *
Pawel Zarembski 0:01f31e923fe2 15 * http://www.apache.org/licenses/LICENSE-2.0
Pawel Zarembski 0:01f31e923fe2 16 *
Pawel Zarembski 0:01f31e923fe2 17 * Unless required by applicable law or agreed to in writing, software
Pawel Zarembski 0:01f31e923fe2 18 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
Pawel Zarembski 0:01f31e923fe2 19 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Pawel Zarembski 0:01f31e923fe2 20 * See the License for the specific language governing permissions and
Pawel Zarembski 0:01f31e923fe2 21 * limitations under the License.
Pawel Zarembski 0:01f31e923fe2 22 */
Pawel Zarembski 0:01f31e923fe2 23 #ifndef SETTINGS_H
Pawel Zarembski 0:01f31e923fe2 24 #define SETTINGS_H
Pawel Zarembski 0:01f31e923fe2 25
Pawel Zarembski 0:01f31e923fe2 26 #include <stdint.h>
Pawel Zarembski 0:01f31e923fe2 27 #include <stdbool.h>
Pawel Zarembski 0:01f31e923fe2 28
Pawel Zarembski 0:01f31e923fe2 29 #ifdef __cplusplus
Pawel Zarembski 0:01f31e923fe2 30 extern "C" {
Pawel Zarembski 0:01f31e923fe2 31 #endif
Pawel Zarembski 0:01f31e923fe2 32
Pawel Zarembski 0:01f31e923fe2 33 typedef enum {
Pawel Zarembski 0:01f31e923fe2 34 ASSERT_SOURCE_NONE = 0,
Pawel Zarembski 0:01f31e923fe2 35 ASSERT_SOURCE_BL = 1,
Pawel Zarembski 0:01f31e923fe2 36 ASSERT_SOURCE_APP = 2
Pawel Zarembski 0:01f31e923fe2 37 } assert_source_t;
Pawel Zarembski 0:01f31e923fe2 38
Pawel Zarembski 0:01f31e923fe2 39 void config_init(void);
Pawel Zarembski 0:01f31e923fe2 40
Pawel Zarembski 0:01f31e923fe2 41 // Get/set settings residing in flash
Pawel Zarembski 0:01f31e923fe2 42 void config_set_auto_rst(bool on);
Pawel Zarembski 0:01f31e923fe2 43 void config_set_automation_allowed(bool on);
Pawel Zarembski 0:01f31e923fe2 44 void config_set_overflow_detect(bool on);
Pawel Zarembski 0:01f31e923fe2 45 bool config_get_auto_rst(void);
Pawel Zarembski 0:01f31e923fe2 46 bool config_get_automation_allowed(void);
Pawel Zarembski 0:01f31e923fe2 47 bool config_get_overflow_detect(void);
Pawel Zarembski 0:01f31e923fe2 48
Pawel Zarembski 0:01f31e923fe2 49 // Get/set settings residing in shared ram
Pawel Zarembski 0:01f31e923fe2 50 void config_ram_set_hold_in_bl(bool hold);
Pawel Zarembski 0:01f31e923fe2 51 void config_ram_set_assert(const char *file, uint16_t line);
Pawel Zarembski 0:01f31e923fe2 52 void config_ram_clear_assert(void);
Pawel Zarembski 0:01f31e923fe2 53 bool config_ram_get_hold_in_bl(void);
Pawel Zarembski 0:01f31e923fe2 54 bool config_ram_get_initial_hold_in_bl(void);
Pawel Zarembski 0:01f31e923fe2 55 bool config_ram_get_assert(char *buf, uint16_t buf_size, uint16_t *line, assert_source_t *source);
Pawel Zarembski 0:01f31e923fe2 56 uint8_t config_ram_add_hexdump(uint32_t hexdump);
Pawel Zarembski 0:01f31e923fe2 57 uint8_t config_ram_get_hexdumps(uint32_t **hexdumps);
Pawel Zarembski 0:01f31e923fe2 58 void config_ram_set_disable_msd(bool disable_msd);
Pawel Zarembski 0:01f31e923fe2 59 uint8_t config_ram_get_disable_msd(void);
Pawel Zarembski 0:01f31e923fe2 60 void config_ram_set_page_erase(bool page_erase_enable);
Pawel Zarembski 0:01f31e923fe2 61 bool config_ram_get_page_erase(void);
Pawel Zarembski 0:01f31e923fe2 62
Pawel Zarembski 0:01f31e923fe2 63 // Private - should only be called from settings.c
Pawel Zarembski 0:01f31e923fe2 64 void config_rom_init(void);
Pawel Zarembski 0:01f31e923fe2 65
Pawel Zarembski 0:01f31e923fe2 66 #ifdef __cplusplus
Pawel Zarembski 0:01f31e923fe2 67 }
Pawel Zarembski 0:01f31e923fe2 68 #endif
Pawel Zarembski 0:01f31e923fe2 69
Pawel Zarembski 0:01f31e923fe2 70 #endif