MAX32665 SDK Documentation  0.2
Software Development Kit Overview and API Documentation
mxc_delay.h
1 
6 /* ****************************************************************************
7  * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining a
10  * copy of this software and associated documentation files (the "Software"),
11  * to deal in the Software without restriction, including without limitation
12  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13  * and/or sell copies of the Software, and to permit persons to whom the
14  * Software is furnished to do so, subject to the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be included
17  * in all copies or substantial portions of the Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22  * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
23  * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25  * OTHER DEALINGS IN THE SOFTWARE.
26  *
27  * Except as contained in this notice, the name of Maxim Integrated
28  * Products, Inc. shall not be used except as stated in the Maxim Integrated
29  * Products, Inc. Branding Policy.
30  *
31  * The mere transfer of this software does not imply any licenses
32  * of trade secrets, proprietary technology, copyrights, patents,
33  * trademarks, maskwork rights, or any other form of intellectual
34  * property whatsoever. Maxim Integrated Products, Inc. retains all
35  * ownership rights.
36  *
37  * $Date: 2020-09-28 09:41:57 -0500 (Mon, 28 Sep 2020) $
38  * $Revision: 55932 $
39  *
40  *************************************************************************** */
41 
42 /* Define to prevent redundant inclusion */
43 #ifndef _DELAY_H_
44 #define _DELAY_H_
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
57 /***** Definitions *****/
64 #define MXC_DELAY_SEC(s) (((unsigned long)s) * 1000000UL)
65 
71 #define MXC_DELAY_MSEC(ms) (ms * 1000UL)
72 
78 #define MXC_DELAY_USEC(us) (us)
79 
80 /***** Function Prototypes *****/
81 
90 int mxc_delay(unsigned long us);
91 
104 int mxc_delay_start(unsigned long us);
105 
111 int mxc_delay_check(void);
112 
117 void mxc_delay_stop(void);
118 
124 void mxc_delay_handler(void);
125 
128 #ifdef __cplusplus
129 }
130 #endif
131 
132 #endif /* _DELAY_H_ */
void mxc_delay_handler(void)
Processes the delay interrupt.
int mxc_delay_start(unsigned long us)
Starts a non-blocking delay for the specified number of microseconds.
void mxc_delay_stop(void)
Stops an asynchronous delay previously started.
int mxc_delay_check(void)
Returns the status of a non-blocking delay request.
int mxc_delay(unsigned long us)
Blocks and delays for the specified number of microseconds.