MAX32665 SDK Documentation  0.2
Software Development Kit Overview and API Documentation
htmr.h
1 
6 /* ****************************************************************************
7  * Copyright (C) 2017 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  *
38  * $Date: 2018-11-08 15:08:58 -0600 (Thu, 08 Nov 2018) $
39  * $Revision: 39056 $
40  *************************************************************************** */
41 
42 /* Define to prevent redundant inclusion */
43 #ifndef _HTMR_H_
44 #define _HTMR_H_
45 
46 /* **** Includes **** */
47 #include <stdint.h>
48 #include "mxc_config.h"
49 #include "htmr_regs.h"
50 #include "mxc_sys.h"
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
62 /* **** Definitions **** */
63 
71 
79 
87 
95 
104 int HTMR_SetLongIntAlarm(mxc_htmr_regs_t *htmr, uint32_t ras);
105 
113 int HTMR_SetShortIntAlarm(mxc_htmr_regs_t *htmr, uint32_t rssa);
114 
121 int HTMR_Enable(mxc_htmr_regs_t *htmr);
122 
129 int HTMR_Disable(mxc_htmr_regs_t *htmr);
130 
140 int HTMR_Init(mxc_htmr_regs_t *htmr, uint32_t sec, uint8_t ssec, sys_cfg_htmr_t *sys_cfg);
141 
149 
156 int HTMR_GetFlags(mxc_htmr_regs_t *htmr);
162 int HTMR_ClearFlags(mxc_htmr_regs_t *htmr, int flags);
163 
170 
177 
178 #ifdef __cplusplus
179 }
180 #endif
181 
182 #endif /* _HTMR_H_ */
int HTMR_GetLongCount(mxc_htmr_regs_t *htmr)
Gets value in long interval register.
Structure type to access the HTMR Registers.
Definition: htmr_regs.h:88
int HTMR_ClearFlags(mxc_htmr_regs_t *htmr, int flags)
Clear Interrupt flag.
int HTMR_SetShortIntAlarm(mxc_htmr_regs_t *htmr, uint32_t rssa)
Set Short Interval alarm value and enable interrupt,.
int HTMR_Disable(mxc_htmr_regs_t *htmr)
Disable/Stop the High Speed Timer.
int HTMR_GetShortCount(mxc_htmr_regs_t *htmr)
Gets value in short interval register.
int HTMR_DisableShortIntInterrupt(mxc_htmr_regs_t *htmr)
Disable Short Interval&#39;s Alarm Interrupt.
int HTMR_DisableLongIntInterrupt(mxc_htmr_regs_t *htmr)
Disable Long Interval Counter&#39;s Alarm Interrupt.
int HTMR_EnableLongIntInterrupt(mxc_htmr_regs_t *htmr)
Enables Long Interval Counter&#39;s Alarm Interrupt.
int HTMR_SetLongIntAlarm(mxc_htmr_regs_t *htmr, uint32_t ras)
Set Long Interval alarm value and enable Interrupt.
int HTMR_GetFlags(mxc_htmr_regs_t *htmr)
Gets Interrupt flags.
int HTMR_EnableShortIntInterrupt(mxc_htmr_regs_t *htmr)
Enables Short Interval Counter&#39;s Alarm Interrupt.
int HTMR_Enable(mxc_htmr_regs_t *htmr)
Enable/Start the High Speed Timer.
int HTMR_CheckBusy(mxc_htmr_regs_t *htmr)
Check if BUSY bit is 0.
int HTMR_Init(mxc_htmr_regs_t *htmr, uint32_t sec, uint8_t ssec, sys_cfg_htmr_t *sys_cfg)
Initialize the sec and ssec registers and enable HTMR.