LCOV - code coverage report
Current view: top level - home/jason/ncs-2.0.0/nrfxlib/crypto/nrf_cc312_platform/src - nrf_cc3xx_platform_abort_zephyr.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 2 4 50.0 %
Date: 2022-08-18 11:36:24 Functions: 0 1 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /**
       2                 :            :  * Copyright (c) 2019 Nordic Semiconductor ASA
       3                 :            :  *
       4                 :            :  * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
       5                 :            :  */
       6                 :            : #include <kernel.h>
       7                 :            : #include <sys/reboot.h>
       8                 :            : //#include <logging/log.h>
       9                 :            : //LOG_MODULE_DECLARE(nrf_cc3xx_platform);
      10                 :            : 
      11                 :            : #include "nrf_cc3xx_platform_abort.h"
      12                 :            : 
      13                 :            : 
      14                 :            : /** @brief Definition of abort function used for Zephyr
      15                 :            :  */
      16                 :          0 : static void abort_function(char const * const reason)
      17                 :            : {
      18                 :            :         //LOG_ERR("Reason: %s", reason);
      19                 :            : #ifdef CONFIG_REBOOT
      20                 :            :         //LOG_ERR("Rebooting");
      21                 :            :         sys_reboot(SYS_REBOOT_WARM);
      22                 :            : #else
      23                 :            :         //LOG_ERR("Halted");
      24                 :          0 :         while(1);
      25                 :            : #endif
      26                 :            : }
      27                 :            : 
      28                 :            : 
      29                 :            : /** @brief Definition of abort API to set in nrf_cc3xx_platform
      30                 :            :  */
      31                 :            : static const nrf_cc3xx_platform_abort_apis_t apis =
      32                 :            : {
      33                 :            :         .abort_handle = NULL,
      34                 :            :         .abort_fn = abort_function,
      35                 :            : };
      36                 :            : 
      37                 :            : /** @brief Function to initialize the nrf_cc3xx_platform abort APIs.
      38                 :            :  */
      39                 :            : void nrf_cc3xx_platform_abort_init(void)
      40                 :            : {
      41                 :          1 :         nrf_cc3xx_platform_set_abort(&apis);
      42                 :          1 : }

Generated by: LCOV version 1.14