Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
platform_drivers/inc/delay.h@8:ca65a811c522, 2021-10-27 (annotated)
- Committer:
- nsheth
- Date:
- Wed Oct 27 07:36:03 2021 +0000
- Revision:
- 8:ca65a811c522
Convert platform drivers away from library
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| nsheth | 8:ca65a811c522 | 1 | /***************************************************************************//** |
| nsheth | 8:ca65a811c522 | 2 | * @file delay.h |
| nsheth | 8:ca65a811c522 | 3 | * @author DBogdan (dragos.bogdan@analog.com) |
| nsheth | 8:ca65a811c522 | 4 | ******************************************************************************** |
| nsheth | 8:ca65a811c522 | 5 | * Copyright 2019(c) Analog Devices, Inc. |
| nsheth | 8:ca65a811c522 | 6 | * |
| nsheth | 8:ca65a811c522 | 7 | * All rights reserved. |
| nsheth | 8:ca65a811c522 | 8 | * |
| nsheth | 8:ca65a811c522 | 9 | * Redistribution and use in source and binary forms, with or without |
| nsheth | 8:ca65a811c522 | 10 | * modification, are permitted provided that the following conditions are met: |
| nsheth | 8:ca65a811c522 | 11 | * - Redistributions of source code must retain the above copyright |
| nsheth | 8:ca65a811c522 | 12 | * notice, this list of conditions and the following disclaimer. |
| nsheth | 8:ca65a811c522 | 13 | * - Redistributions in binary form must reproduce the above copyright |
| nsheth | 8:ca65a811c522 | 14 | * notice, this list of conditions and the following disclaimer in |
| nsheth | 8:ca65a811c522 | 15 | * the documentation and/or other materials provided with the |
| nsheth | 8:ca65a811c522 | 16 | * distribution. |
| nsheth | 8:ca65a811c522 | 17 | * - Neither the name of Analog Devices, Inc. nor the names of its |
| nsheth | 8:ca65a811c522 | 18 | * contributors may be used to endorse or promote products derived |
| nsheth | 8:ca65a811c522 | 19 | * from this software without specific prior written permission. |
| nsheth | 8:ca65a811c522 | 20 | * - The use of this software may or may not infringe the patent rights |
| nsheth | 8:ca65a811c522 | 21 | * of one or more patent holders. This license does not release you |
| nsheth | 8:ca65a811c522 | 22 | * from the requirement that you obtain separate licenses from these |
| nsheth | 8:ca65a811c522 | 23 | * patent holders to use this software. |
| nsheth | 8:ca65a811c522 | 24 | * - Use of the software either in source or binary form, must be run |
| nsheth | 8:ca65a811c522 | 25 | * on or directly connected to an Analog Devices Inc. component. |
| nsheth | 8:ca65a811c522 | 26 | * |
| nsheth | 8:ca65a811c522 | 27 | * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR |
| nsheth | 8:ca65a811c522 | 28 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, |
| nsheth | 8:ca65a811c522 | 29 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| nsheth | 8:ca65a811c522 | 30 | * IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, |
| nsheth | 8:ca65a811c522 | 31 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| nsheth | 8:ca65a811c522 | 32 | * LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR |
| nsheth | 8:ca65a811c522 | 33 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| nsheth | 8:ca65a811c522 | 34 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| nsheth | 8:ca65a811c522 | 35 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| nsheth | 8:ca65a811c522 | 36 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| nsheth | 8:ca65a811c522 | 37 | *******************************************************************************/ |
| nsheth | 8:ca65a811c522 | 38 | |
| nsheth | 8:ca65a811c522 | 39 | #ifndef DELAY_H_ |
| nsheth | 8:ca65a811c522 | 40 | #define DELAY_H_ |
| nsheth | 8:ca65a811c522 | 41 | |
| nsheth | 8:ca65a811c522 | 42 | /******************************************************************************/ |
| nsheth | 8:ca65a811c522 | 43 | /***************************** Include Files **********************************/ |
| nsheth | 8:ca65a811c522 | 44 | /******************************************************************************/ |
| nsheth | 8:ca65a811c522 | 45 | |
| nsheth | 8:ca65a811c522 | 46 | #include <stdint.h> |
| nsheth | 8:ca65a811c522 | 47 | |
| nsheth | 8:ca65a811c522 | 48 | /******************************************************************************/ |
| nsheth | 8:ca65a811c522 | 49 | /************************ Functions Declarations ******************************/ |
| nsheth | 8:ca65a811c522 | 50 | /******************************************************************************/ |
| nsheth | 8:ca65a811c522 | 51 | |
| nsheth | 8:ca65a811c522 | 52 | /* Generate microseconds delay. */ |
| nsheth | 8:ca65a811c522 | 53 | void udelay(uint32_t usecs); |
| nsheth | 8:ca65a811c522 | 54 | |
| nsheth | 8:ca65a811c522 | 55 | /* Generate miliseconds delay. */ |
| nsheth | 8:ca65a811c522 | 56 | void mdelay(uint32_t msecs); |
| nsheth | 8:ca65a811c522 | 57 | |
| nsheth | 8:ca65a811c522 | 58 | #endif // DELAY_H_ |