1 /* 2 * Copyright (c) 2020 - 2024 Renesas Electronics Corporation and/or its affiliates 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef BSP_DELAY_H 8 #define BSP_DELAY_H 9 10 /*********************************************************************************************************************** 11 * Includes <System Includes> , "Project Includes" 12 **********************************************************************************************************************/ 13 #if defined(BSP_CFG_CORE_CR52) 14 #include "cr/bsp_delay_core.h" 15 #elif defined(BSP_CFG_CORE_CA55) 16 #include "ca/bsp_delay_core.h" 17 #endif 18 19 #include "bsp_compiler_support.h" 20 21 /** Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */ 22 FSP_HEADER 23 24 /*******************************************************************************************************************//** 25 * @addtogroup BSP_MCU 26 * @{ 27 **********************************************************************************************************************/ 28 29 /*********************************************************************************************************************** 30 * Macro definitions 31 **********************************************************************************************************************/ 32 33 /*********************************************************************************************************************** 34 * Typedef definitions 35 **********************************************************************************************************************/ 36 37 /** Available delay units for R_BSP_SoftwareDelay(). These are ultimately used to calculate a total # of microseconds */ 38 typedef enum 39 { 40 BSP_DELAY_UNITS_SECONDS = 1000000, ///< Requested delay amount is in seconds 41 BSP_DELAY_UNITS_MILLISECONDS = 1000, ///< Requested delay amount is in milliseconds 42 BSP_DELAY_UNITS_MICROSECONDS = 1 ///< Requested delay amount is in microseconds 43 } bsp_delay_units_t; 44 45 /** @} (end addtogroup BSP_MCU) */ 46 47 /*********************************************************************************************************************** 48 * Exported global variables 49 **********************************************************************************************************************/ 50 51 /*********************************************************************************************************************** 52 * Exported global functions (to be accessed by other files) 53 **********************************************************************************************************************/ 54 void bsp_prv_software_delay_loop(uint32_t loop_cnt); 55 56 /** Common macro for FSP header files. There is also a corresponding FSP_HEADER macro at the top of this file. */ 57 FSP_FOOTER 58 59 #endif 60