RTEMS 6.1-rc2
Loading...
Searching...
No Matches
fsl_xbara.h
1/*
2 * Copyright (c) 2015, Freescale Semiconductor, Inc.
3 * Copyright 2016-2019, 2022 NXP
4 * All rights reserved.
5 *
6 * SPDX-License-Identifier: BSD-3-Clause
7 */
8
9#ifndef _FSL_XBARA_H_
10#define _FSL_XBARA_H_
11
12#include "fsl_common.h"
13
19/*******************************************************************************
20 * Definitions
21 ******************************************************************************/
22
23#define FSL_XBARA_DRIVER_VERSION (MAKE_VERSION(2, 0, 5))
24
25/* Macros for entire XBARA_SELx register. */
26#define XBARA_SELx(base, output) (((volatile uint16_t *)(&((base)->SEL0)))[(uint32_t)(output) / 2UL])
27
28/* Set the XBARA_SELx_SELx field to a new value. */
29#define XBARA_WR_SELx_SELx(base, input, output) XBARA_SetSignalsConnection((base), (input), (output))
30
31/* For driver backward compatibility. */
32#define kXBARA_RequestInterruptEnalbe kXBARA_RequestInterruptEnable
33
38{
44
48typedef enum _xbar_request
49{
54
61{
63 (XBARA_CTRL0_STS0_MASK),
65 (XBARA_CTRL0_STS1_MASK),
67 (XBARA_CTRL1_STS2_MASK << 16U),
69 (XBARA_CTRL1_STS3_MASK << 16U),
71
79typedef struct XBARAControlConfig
80{
84
85/*******************************************************************************
86 * API
87 ******************************************************************************/
88
89#if defined(__cplusplus)
90extern "C" {
91#endif /* __cplusplus */
92
105void XBARA_Init(XBARA_Type *base);
106
114void XBARA_Deinit(XBARA_Type *base);
115
132void XBARA_SetSignalsConnection(XBARA_Type *base, xbar_input_signal_t input, xbar_output_signal_t output);
133
146uint32_t XBARA_GetStatusFlags(XBARA_Type *base);
147
154void XBARA_ClearStatusFlags(XBARA_Type *base, uint32_t mask);
155
175 xbar_output_signal_t output,
176 const xbara_control_config_t *controlConfig);
177
178#if defined(__cplusplus)
179}
180#endif /* __cplusplus */
181
184/*!* @} */
185
186#endif /* _FSL_XBARA_H_ */
uint32_t XBARA_GetStatusFlags(XBARA_Type *base)
Gets the active edge detection status.
Definition: fsl_xbara.c:148
_xbara_status_flag_t
XBARA status flags.
Definition: fsl_xbara.h:61
void XBARA_Init(XBARA_Type *base)
Initializes the XBARA module.
Definition: fsl_xbara.c:82
_xbara_active_edge
XBARA active edge for detection.
Definition: fsl_xbara.h:38
struct XBARAControlConfig xbara_control_config_t
Defines the configuration structure of the XBARA control register.
_xbar_request
Defines the XBARA DMA and interrupt configurations.
Definition: fsl_xbara.h:49
void XBARA_Deinit(XBARA_Type *base)
Shuts down the XBARA module.
Definition: fsl_xbara.c:97
void XBARA_SetOutputSignalConfig(XBARA_Type *base, xbar_output_signal_t output, const xbara_control_config_t *controlConfig)
Configures the XBARA control register.
Definition: fsl_xbara.c:206
void XBARA_SetSignalsConnection(XBARA_Type *base, xbar_input_signal_t input, xbar_output_signal_t output)
Sets a connection between the selected XBARA_IN[*] input and the XBARA_OUT[*] output signal.
Definition: fsl_xbara.c:121
enum _xbara_status_flag_t xbara_status_flag_t
XBARA status flags.
enum _xbara_active_edge xbara_active_edge_t
XBARA active edge for detection.
void XBARA_ClearStatusFlags(XBARA_Type *base, uint32_t mask)
Clears the edge detection status flags of relative mask.
Definition: fsl_xbara.c:165
enum _xbar_request xbara_request_t
Defines the XBARA DMA and interrupt configurations.
@ kXBARA_EdgeDetectionOut2
Definition: fsl_xbara.h:66
@ kXBARA_EdgeDetectionOut0
Definition: fsl_xbara.h:62
@ kXBARA_EdgeDetectionOut3
Definition: fsl_xbara.h:68
@ kXBARA_EdgeDetectionOut1
Definition: fsl_xbara.h:64
@ kXBARA_EdgeNone
Definition: fsl_xbara.h:39
@ kXBARA_EdgeRising
Definition: fsl_xbara.h:40
@ kXBARA_EdgeRisingAndFalling
Definition: fsl_xbara.h:42
@ kXBARA_EdgeFalling
Definition: fsl_xbara.h:41
@ kXBARA_RequestDMAEnable
Definition: fsl_xbara.h:51
@ kXBARA_RequestDisable
Definition: fsl_xbara.h:50
@ kXBARA_RequestInterruptEnable
Definition: fsl_xbara.h:52
Defines the configuration structure of the XBARA control register.
Definition: fsl_xbara.h:80
xbara_request_t requestType
Definition: fsl_xbara.h:82
xbara_active_edge_t activeEdge
Definition: fsl_xbara.h:81
Definition: MIMXRT1052.h:51177