]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - sub1ghz-sensor-to-cloud/tida01476.git/blob - sensor_cc1310lp/Application/MAC/HAL/common/hal_appasrt.c
Initial Commit
[sub1ghz-sensor-to-cloud/tida01476.git] / sensor_cc1310lp / Application / MAC / HAL / common / hal_appasrt.c
1 /******************************************************************************
3  @file  hal_appasrt.c
5  @brief This module contains the application assert functions.
7  Group: WCS, LPC, BTS
8  Target Device: CC13xx
10  ******************************************************************************
11  
12  Copyright (c) 2015-2017, Texas Instruments Incorporated
13  All rights reserved.
15  Redistribution and use in source and binary forms, with or without
16  modification, are permitted provided that the following conditions
17  are met:
19  *  Redistributions of source code must retain the above copyright
20     notice, this list of conditions and the following disclaimer.
22  *  Redistributions in binary form must reproduce the above copyright
23     notice, this list of conditions and the following disclaimer in the
24     documentation and/or other materials provided with the distribution.
26  *  Neither the name of Texas Instruments Incorporated nor the names of
27     its contributors may be used to endorse or promote products derived
28     from this software without specific prior written permission.
30  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
31  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
32  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
33  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
34  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
35  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
36  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
37  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
38  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
39  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
40  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42  ******************************************************************************
43  Release Name: simplelink_cc13x0_sdk_1_30_00_06"
44  Release Date: 2017-03-08 14:43:25
45  *****************************************************************************/
47 /*******************************************************************************
48  * INCLUDES
49  */
51 #include "hal_appasrt.h"
53 /*******************************************************************************
54  * LOCAL VARIABLES
55  */
56  
57 /* Pointers to App Assert Handler function */
58 static APPASRTINTF_assrtHndlerFunc_t *pAssrtFunc = NULL;
60 /*******************************************************************************
61  * FUNCTIONS
62  */
64 /*******************************************************************************
65  * @brief   See header file for details.
66  */
67 uint8_t HAL_APPASRT_register(APPASRTINTF_assrtHndlerFunc_t *pFptr)
68 {
69   uint8_t status;
71   //! Store parameters
72   pAssrtFunc = pFptr;
74   //! Make sure we have valid function pointers
75   if ((pAssrtFunc != NULL) && (pAssrtFunc->callAssrtHndler))
76   {
77     status = APPASRTINTF_SUCCESS;
78   }
79   else
80   {
81     status = APPASRTINTF_FAILURE;
82   }
84   return status;
85 }
87 /*******************************************************************************
88  * @brief   See header file for details.
89  */
90 void HAL_APPASRT_callAssrtHanlder(void)
91 {
92   pAssrtFunc->callAssrtHndler();
93 }
95 /*******************************************************************************
96 *******************************************************************************/