Platform drivers for Mbed.

Dependents:   EVAL-CN0535-FMCZ EVAL-CN0535-FMCZ EVAL-AD568x-AD569x EVAL-AD7606 ... more

Committer:
mahphalke
Date:
Wed Feb 26 06:09:13 2020 +0000
Revision:
8:70fc373a5f46
Child:
9:9e247b9c9abf
Structured platform drivers similar to github version by splitting functionality from single file into multiple modules.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mahphalke 8:70fc373a5f46 1 /***************************************************************************//**
mahphalke 8:70fc373a5f46 2 * @file delay.cpp
mahphalke 8:70fc373a5f46 3 * @brief Implementation of delay functionality
mahphalke 8:70fc373a5f46 4 ********************************************************************************
mahphalke 8:70fc373a5f46 5 * Copyright (c) 2019, 2020 Analog Devices, Inc.
mahphalke 8:70fc373a5f46 6 *
mahphalke 8:70fc373a5f46 7 * All rights reserved.
mahphalke 8:70fc373a5f46 8 *
mahphalke 8:70fc373a5f46 9 * This software is proprietary to Analog Devices, Inc. and its licensors.
mahphalke 8:70fc373a5f46 10 * By using this software you agree to the terms of the associated
mahphalke 8:70fc373a5f46 11 * Analog Devices Software License Agreement.
mahphalke 8:70fc373a5f46 12 *******************************************************************************/
mahphalke 8:70fc373a5f46 13
mahphalke 8:70fc373a5f46 14 /******************************************************************************/
mahphalke 8:70fc373a5f46 15 /***************************** Include Files **********************************/
mahphalke 8:70fc373a5f46 16 /******************************************************************************/
mahphalke 8:70fc373a5f46 17
mahphalke 8:70fc373a5f46 18 #include <mbed.h>
mahphalke 8:70fc373a5f46 19 #include "platform_drivers.h"
mahphalke 8:70fc373a5f46 20
mahphalke 8:70fc373a5f46 21 /******************************************************************************/
mahphalke 8:70fc373a5f46 22 /********************** Macros and Constants Definitions **********************/
mahphalke 8:70fc373a5f46 23 /******************************************************************************/
mahphalke 8:70fc373a5f46 24
mahphalke 8:70fc373a5f46 25 /******************************************************************************/
mahphalke 8:70fc373a5f46 26 /************************ Functions Definitions *******************************/
mahphalke 8:70fc373a5f46 27 /******************************************************************************/
mahphalke 8:70fc373a5f46 28
mahphalke 8:70fc373a5f46 29 /**
mahphalke 8:70fc373a5f46 30 * @brief Generate microseconds delay.
mahphalke 8:70fc373a5f46 31 * @param usecs - Delay in microseconds.
mahphalke 8:70fc373a5f46 32 * @return None.
mahphalke 8:70fc373a5f46 33 */
mahphalke 8:70fc373a5f46 34 void udelay(uint32_t usecs)
mahphalke 8:70fc373a5f46 35 {
mahphalke 8:70fc373a5f46 36 if (usecs) {
mahphalke 8:70fc373a5f46 37 // Unused variable - fix compiler warning
mahphalke 8:70fc373a5f46 38 }
mahphalke 8:70fc373a5f46 39 }
mahphalke 8:70fc373a5f46 40
mahphalke 8:70fc373a5f46 41 /**
mahphalke 8:70fc373a5f46 42 * @brief Generate miliseconds delay.
mahphalke 8:70fc373a5f46 43 * @param msecs - Delay in miliseconds.
mahphalke 8:70fc373a5f46 44 * @return None.
mahphalke 8:70fc373a5f46 45 */
mahphalke 8:70fc373a5f46 46 void mdelay(uint32_t msecs)
mahphalke 8:70fc373a5f46 47 {
mahphalke 8:70fc373a5f46 48 if (msecs) {
mahphalke 8:70fc373a5f46 49 HAL_Delay(msecs);
mahphalke 8:70fc373a5f46 50 }
mahphalke 8:70fc373a5f46 51 }