S32 SDK
trgmux_driver.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_DRIVER_H
20 #define TRGMUX_DRIVER_H
21 
24 #include "trgmux_hal.h"
25 
31 /*******************************************************************************
32  * Variables
33  ******************************************************************************/
34 
35 /*******************************************************************************
36  * Definitions
37  ******************************************************************************/
38 
47 typedef struct
48 {
55 
56 
65 typedef struct
66 {
70 
71 /*******************************************************************************
72  * API
73  ******************************************************************************/
74 
75 #if defined(__cplusplus)
76 extern "C" {
77 #endif
78 
79 
108 status_t TRGMUX_DRV_Init(const uint32_t instance,
109  const trgmux_user_config_t * const trgmuxUserConfig);
110 
120 status_t TRGMUX_DRV_Deinit(const uint32_t instance);
121 
134 status_t TRGMUX_DRV_SetTrigSourceForTargetModule(const uint32_t instance,
135  const trgmux_trigger_source_t triggerSource,
136  const trgmux_target_module_t targetModule);
137 
149  const trgmux_target_module_t targetModule);
150 
163 void TRGMUX_DRV_SetLockForTargetModule(const uint32_t instance,
164  const trgmux_target_module_t targetModule);
165 
177 bool TRGMUX_DRV_GetLockForTargetModule(const uint32_t instance,
178  const trgmux_target_module_t targetModule);
179 
180 #if defined(__cplusplus)
181 }
182 #endif
183 
186 #endif /* TRGMUX_DRIVER_H */
187 /*******************************************************************************
188  * EOF
189  ******************************************************************************/
trgmux_trigger_source_t TRGMUX_DRV_GetTrigSourceForTargetModule(const uint32_t instance, const trgmux_target_module_t targetModule)
Get the source trigger configured for a target module.
User configuration structure for the TRGMUX driver.
Definition: trgmux_driver.h:65
status_t TRGMUX_DRV_SetTrigSourceForTargetModule(const uint32_t instance, const trgmux_trigger_source_t triggerSource, const trgmux_target_module_t targetModule)
Configure a source trigger for a selected target module.
status_t TRGMUX_DRV_Deinit(const uint32_t instance)
Reset to default values the source triggers corresponding to all target modules, if none of the targe...
bool TRGMUX_DRV_GetLockForTargetModule(const uint32_t instance, const trgmux_target_module_t targetModule)
Get the Lock bit status of the TRGMUX register of a target module.
const trgmux_inout_mapping_config_t * inOutMappingConfig
Definition: trgmux_driver.h:68
uint8_t numInOutMappingConfigs
Definition: trgmux_driver.h:67
trgmux_target_module_t
Describes all possible outputs (target modules) of the TRGMUX IP.
Definition: trgmux_hal.h:125
Configuration structure for pairing source triggers with target modules.
Definition: trgmux_driver.h:47
trgmux_trigger_source_t triggerSource
Definition: trgmux_driver.h:49
status_t
Status return codes. Common error codes will be a unified enumeration (C enum) that will contain all ...
Definition: status.h:31
status_t TRGMUX_DRV_Init(const uint32_t instance, const trgmux_user_config_t *const trgmuxUserConfig)
Initialize a TRGMUX instance for operation.
Definition: trgmux_driver.c:76
trgmux_trigger_source_t
Describes all possible inputs (trigger sources) of the TRGMUX IP.
Definition: trgmux_hal.h:62
trgmux_target_module_t targetModule
Definition: trgmux_driver.h:50
void TRGMUX_DRV_SetLockForTargetModule(const uint32_t instance, const trgmux_target_module_t targetModule)
Locks the TRGMUX register of a target module.