X BAR多路复用
1、static inline void XBAR_enableOutputMux(XBAR_OutputNum output, uint32_t muxes)
- function description: Enables the multiplexer of the output channel of the output X-BAR.
- parameter description:
- input parameters: output: select the output channel to be set; muxes: select the output X-BAR multiplexer to be set, each bit of muxes represents the corresponding multiplexer, bit0 represents the multiplexer 0, and bit1 represents the multiplexer 1.
- return parameter: None.
2、static inline void XBAR_disableOutputMux(XBAR_OutputNum output, uint32_t muxes)
- function description: Disable the multiplexer of the output channel of the output X-BAR.
- parameter description:
- input parameters: output: select the output channel to be set; muxes: select the output X-BAR multiplexer to be set, each bit of muxes represents the corresponding multiplexer, bit0 represents the multiplexer 0, and bit1 represents the multiplexer 1.
- return parameter: None.
3、static inline void XBAR_setOutputLatchMode(XBAR_OutputNum output, bool enable)
- function description: Enables or disables the latch of the output channel of the output X-BAR.
- parameter description:
- input parameters: output: select the output channel to be set; enable: set the enable or disable latch, 1: enable, 0: disable.
- return parameter: None.
4、static inline bool XBAR_getOutputLatchStatus(XBAR_OutputNum output)
- function description: Reads the state of the latch that outputs the X-BAR output channel.
- parameter description:
- input parameter: output: select the output channel to be read;
- return parameter: return 1 to indicate that the latch of the specified channel is enabled, and return 0 to indicate that the latch of the specified channel is disabled.
5、static inline void XBAR_clearOutputLatch(XBAR_OutputNum output)
- function description: Clears the output latch bit of the latch that outputs the X-BAR output channel.
- parameter description:
- input parameter: output: select the output channel to be set;
- return parameter: None.
6、static inline void XBAR_forceOutputLatch(XBAR_OutputNum output)
- function description: The output latch bit of the latch for the output X-BAR output channel is set.
- parameter description:
- input parameter: output: select the output channel to be set;
- return parameter: None.
7、static inline void XBAR_invertOutputSignal(XBAR_OutputNum output, bool invert)
- function description: Invert the output signal of the output X-BAR output channel.
- parameter description:
- input parameters: output: select the output channel to be set; invert: 1: invert the output signal; 0: do not invert the output signal.
- return parameter: None.
8、static inline void XBAR_enableEPWMMux(XBAR_TripNum trip, uint32_t muxes)
- function description: Enables the multiplexer for the TRIP channel of the ePWM X-BAR.
- parameter description:
- input parameters: trip: select the trip channel to be set; muxes: select the ePWM X-BAR multiplexer to be set, each bit of muxes represents the corresponding multiplexer, bit0 represents the multiplexer 0, and bit1 represents the multiplexer 1.
- return parameter: None.
9、static inline void XBAR_disableEPWMMux(XBAR_TripNum trip, uint32_t muxes)
- function description: Disable the multiplexer of the TRIP channel of the ePWM X-BAR.
- parameter description:
- input parameters: trip: select the trip channel to be set; muxes: select the ePWM X-BAR multiplexer to be set, each bit of muxes represents the corresponding multiplexer, bit0 represents the multiplexer 0, and bit1 represents the multiplexer 1.
- return parameter: None.
10、static inline void XBAR_invertEPWMSignal(XBAR_TripNum trip, bool invert)
- function description: Invert the output signal of the TRIP channel of the ePWM X-BAR.
- parameter description:
- input parameters: output: select the TRIP channel to be set; invert: 1: invert the output signal; 0: do not invert the output signal.
- return parameter: None.
11、static inline void XBAR_setInputPin(XBAR_InputNum input, XBAR_InputGpio pin)
- function description: Sets the specified input channel of the input X-BAR to the specified GPIO.
- parameter description:
- input parameter: input: select the input channel to be set, the effective value is 0 ~ 15, representing the input channel 1 ~ 16 respectively. Pin: selects the GPIO connected to the specified input channel. 0 x0: selects GPIO0. 0x1: selects GPIO1. 0x2: selects GPIO2. Values greater than 15 and less than 0xFFFF cause the destination module to be driven to 1. 0xFFFF causes the destination module to be driven to 0.
- return parameter: None.
12、static inline void XBAR_lockInput(XBAR_InputNum input)
- function description: The register configuration of the input channel of the input X-BAR is locked.
- parameter description:
- input parameter: input: select the input channel to be set, the effective value is 0 ~ 15, representing the input channel 1 ~ 16 respectively.
- return parameter: None.
13、static inline void XBAR_lockOutput(void)
- function description: Locks the register configuration of the output X-BAR. The locked registers are: OUTPUT-XBAROUTYMUX0TO15CFG, OUTPUT-XBAROUTYMUX16TO31CFG, OUTPUT-xbaroutymuxenable, outPUT-xbaroutlatenable, OUTPUT-XBAROUTINV。
- parameter description:
- input parameter: none
- return parameter: None.
14、static inline void XBAR_lockEPWM(void)
- function description: Locks the register configuration of ePWM X-BAR. The locked registers are: EPWM-XBAROUTyMUX0TO15CFG, EPWM-XBAROUTyMUX16TO31CFG, EPWM-xbaroutymuxenable, epwm-xbaroutlaten, epwm-xbaroutinv.
- parameter description:
- input parameter: none
- return parameter: None.
15、extern void XBAR_setOutputMuxConfig(XBAR_OutputNum output, XBAR_OutputMuxConfig muxConfig)
- function description: Sets the signal connected to the output channel multiplexer that selects the output X-BAR.
- parameter description:
- input parameter: output: select the output channel to be set. MuxConfig: Selects the signal connected to the output channel multiplexer.
- return parameter: None.
16、extern void XBAR_setEPWMMuxConfig(XBAR_TripNum trip, XBAR_EPWMMuxConfig muxConfig)
- function description: Sets the signal connected to the trip output channel multiplexer that selects the ePWM X-BAR.
- parameter description:
- input parameter: output: select the trip output channel to be set. MuxConfig: selects the signal to which the trip output channel multiplexer is connected.
- return parameter: None.
17、extern bool XBAR_getInputFlagStatus(XBAR_InputFlag inputFlag)
- function description: Obtain whether the input source of X-BAR is triggered.
- parameter description:
- input parameter: inputFlag: Select the input source to obtain the status.
- return parameters: 1: The specified input source is triggered. 0: The specified input source is not triggered.
18、void XBAR_clearInputFlag(XBAR_InputFlag inputFlag)
- function description: Clears the status of the X-BAR input source status register.
- parameter description:
- input parameter: inputFlag: Select the input source to clear the status.
- return parameter: None.