MAX32665 SDK Documentation  0.2
Software Development Kit Overview and API Documentation
sema.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: 2018-09-10 16:20:17 -0500 (Mon, 10 Sep 2018) $
38  * $Revision: 37771 $
39  *
40  *************************************************************************** */
41 
42 /* Define to prevent redundant inclusion */
43 #ifndef _SEMA_H_
44 #define _SEMA_H_
45 
46 /* **** Includes **** */
47 #include "mxc_config.h"
48 #include "mxc_sys.h"
49 #include "sema_regs.h"
50 
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54 
61 /* **** Definitions **** */
62 
63 /* **** Function Prototypes **** */
64 
69 int SEMA_Init(sys_cfg_sema_t * sys_cfg);
70 
77 int SEMA_GetSema(unsigned sema);
78 
86 int SEMA_CheckSema(unsigned sema);
87 
93 uint32_t SEMA_Status(void);
94 
99 void SEMA_FreeSema(unsigned sema);
100 
105 int SEMA_Shutdown(void);
106 
107 
108 
111 #ifdef __cplusplus
112 }
113 #endif
114 
115 #endif /* _SEMA_H_ */
int SEMA_CheckSema(unsigned sema)
Check a semaphore.
void SEMA_FreeSema(unsigned sema)
Frees the semaphore.
int SEMA_GetSema(unsigned sema)
Attempt to get a semaphore.
int SEMA_Init(sys_cfg_sema_t *sys_cfg)
Initialize the semaphore peripheral.
uint32_t SEMA_Status(void)
Check all semaphores.
int SEMA_Shutdown(void)
Shutdown the semaphore peripheral.