1 /**
2   ******************************************************************************
3   * @file    tick_device.h
4   * @author  MCD Application Team
5   * @brief   Tick device definition
6    ******************************************************************************
7   * @attention
8   *
9   * <h2><center>&copy; Copyright (c) 2021 STMicroelectronics.
10   * All rights reserved.</center></h2>
11   *
12   * This software component is licensed by ST under BSD 3-Clause license,
13   * the "License"; You may not use this file except in compliance with the
14   * License. You may obtain a copy of the License at:
15   *                        opensource.org/licenses/BSD-3-Clause
16   *
17   ******************************************************************************
18   */
19 /* Define to prevent recursive inclusion -------------------------------------*/
20 
21 #ifndef TICK_DEVICE_H
22 #define TICK_DEVICE_H
23 #include "region.h"
24 REGION_DECLARE(Image$$, TFM_APP_RW_STACK_END, $$Base);
25 #define DEVICE_GET_TICK \
26     do { __IO uint32_t TickVal=0; /* TickVal is placed on stack */\
27       if ((uint32_t)&TickVal <= (uint32_t)&REGION_NAME(Image$$, TFM_APP_RW_STACK_END, $$Base))\
28       return 0 ;\
29     }while(0)
30 #endif /* TICK_DEVICE_H */
31