Change script for apply upstream code
[platform/upstream/connectedhomeip.git] / third_party / openthread / repo / third_party / NordicSemiconductor / libraries / nrf_security / nrf_cc310_plat / src / nrf_cc310_platform_abort_freertos.c
1 /**
2  * Copyright (c) 2019 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
5  */
6 #include <stdint.h>
7 #include <stddef.h>
8
9 #include "nrf_cc310_platform_abort.h"
10 #include "FreeRTOS.h"
11
12 /** @brief Definition of platform handle used during abort in FreeRTOS
13  *
14  * @note Currently not used
15  */
16 static nrf_cc310_platform_abort_handle_t platform_abort_handle;
17
18
19 /** @brief Definition of abort function used for FreeRTOS
20  */
21 static void abort_function(char const * const reason)
22 {
23     configASSERT(!reason);
24 }
25
26
27 /** @brief Definition of abort API to set in nrf_cc310_platform
28  */
29 static const nrf_cc310_platform_abort_apis_t apis =
30 {
31     .abort_handle = &platform_abort_handle,
32     .abort_fn = abort_function
33 };
34
35 /** @brief Function to initialize the nrf_cc310_platform abort APIs.
36  */
37 void nrf_cc310_platform_abort_init(void)
38 {
39     nrf_cc310_platform_set_abort(&apis);
40 }