S32 SDK
trgmux_hal.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 - 2015, Freescale Semiconductor, Inc.
3  * Copyright 2016-2017 NXP
4  * All rights reserved.
5  *
6  * THIS SOFTWARE IS PROVIDED BY NXP "AS IS" AND ANY EXPRESSED OR
7  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
8  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
9  * IN NO EVENT SHALL NXP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
10  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
11  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
12  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
15  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
16  * THE POSSIBILITY OF SUCH DAMAGE.
17  */
18 
19 #ifndef TRGMUX_HAL_H
20 #define TRGMUX_HAL_H
21 
44 #include <stdint.h>
45 #include <stdbool.h>
46 #include "device_registers.h"
47 #include "status.h"
48 
54 /*******************************************************************************
55  * Definitions
56  *******************************************************************************/
57 
62 typedef enum
63 {
120 
125 typedef enum
126 {
181 
182 
183 /*******************************************************************************
184  * API
185  *******************************************************************************/
186 
187 #if defined(__cplusplus)
188 extern "C" {
189 #endif
190 
191 
202 status_t TRGMUX_HAL_Init(TRGMUX_Type * const base);
203 
215  const trgmux_trigger_source_t triggerSource,
216  const trgmux_target_module_t targetModule);
217 
229  const trgmux_target_module_t targetModule);
230 
244  const trgmux_target_module_t targetModule);
245 
256 bool TRGMUX_HAL_GetLockForTargetModule(const TRGMUX_Type * const base,
257  const trgmux_target_module_t targetModule);
258 
259 #if defined(__cplusplus)
260 }
261 #endif
262 
265 #endif /* TRGMUX_HAL_H */
266 /*******************************************************************************
267  * EOF
268  *******************************************************************************/
status_t TRGMUX_HAL_Init(TRGMUX_Type *const base)
Restore the TRGMUX module to reset value.
Definition: trgmux_hal.c:58
bool TRGMUX_HAL_GetLockForTargetModule(const TRGMUX_Type *const base, const trgmux_target_module_t targetModule)
Get the Lock bit status of the TRGMUX register of a target module.
Definition: trgmux_hal.c:241
void TRGMUX_HAL_SetLockForTargetModule(TRGMUX_Type *const base, const trgmux_target_module_t targetModule)
Lock the TRGMUX register of a target module.
Definition: trgmux_hal.c:222
trgmux_target_module_t
Describes all possible outputs (target modules) of the TRGMUX IP.
Definition: trgmux_hal.h:125
status_t
Status return codes. Common error codes will be a unified enumeration (C enum) that will contain all ...
Definition: status.h:31
void TRGMUX_HAL_SetTrigSourceForTargetModule(TRGMUX_Type *const base, const trgmux_trigger_source_t triggerSource, const trgmux_target_module_t targetModule)
Configures a source trigger for a target module.
Definition: trgmux_hal.c:166
trgmux_trigger_source_t
Describes all possible inputs (trigger sources) of the TRGMUX IP.
Definition: trgmux_hal.h:62
trgmux_trigger_source_t TRGMUX_HAL_GetTrigSourceForTargetModule(const TRGMUX_Type *const base, const trgmux_target_module_t targetModule)
Get the source trigger configured for a target module.
Definition: trgmux_hal.c:197