forked from xuos/xiuos
ch438 on nuttx: If a port is checked, the port will be initialized. Otherwise, the interrupt of the port will be disabled.
This commit is contained in:
parent
e32ff95bbb
commit
36f5981036
|
@ -630,36 +630,54 @@ static void Ch438InitDefault(void)
|
||||||
|
|
||||||
ImxrtCH438Init();
|
ImxrtCH438Init();
|
||||||
|
|
||||||
|
/* If a port is checked, the port will be initialized. Otherwise, the interrupt of the port will be disabled. */
|
||||||
|
|
||||||
#ifdef CONFIG_CH438_EXTUART0
|
#ifdef CONFIG_CH438_EXTUART0
|
||||||
CH438PortInit(0, CONFIG_CH438_EXTUART0_BAUD);
|
CH438PortInit(0, CONFIG_CH438_EXTUART0_BAUD);
|
||||||
|
#else
|
||||||
|
WriteCH438Data(REG_IER0_ADDR, 0x00);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_CH438_EXTUART1
|
#ifdef CONFIG_CH438_EXTUART1
|
||||||
CH438PortInit(1, CONFIG_CH438_EXTUART1_BAUD);
|
CH438PortInit(1, CONFIG_CH438_EXTUART1_BAUD);
|
||||||
|
#else
|
||||||
|
WriteCH438Data(REG_IER1_ADDR, 0x00);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_CH438_EXTUART2
|
#ifdef CONFIG_CH438_EXTUART2
|
||||||
CH438PortInit(2, CONFIG_CH438_EXTUART2_BAUD);
|
CH438PortInit(2, CONFIG_CH438_EXTUART2_BAUD);
|
||||||
|
#else
|
||||||
|
WriteCH438Data(REG_IER2_ADDR, 0x00);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_CH438_EXTUART3
|
#ifdef CONFIG_CH438_EXTUART3
|
||||||
CH438PortInit(3, CONFIG_CH438_EXTUART3_BAUD);
|
CH438PortInit(3, CONFIG_CH438_EXTUART3_BAUD);
|
||||||
|
#else
|
||||||
|
WriteCH438Data(REG_IER3_ADDR, 0x00);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_CH438_EXTUART4
|
#ifdef CONFIG_CH438_EXTUART4
|
||||||
CH438PortInit(4, CONFIG_CH438_EXTUART4_BAUD);
|
CH438PortInit(4, CONFIG_CH438_EXTUART4_BAUD);
|
||||||
|
#else
|
||||||
|
WriteCH438Data(REG_IER4_ADDR, 0x00);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_CH438_EXTUART5
|
#ifdef CONFIG_CH438_EXTUART5
|
||||||
CH438PortInit(5, CONFIG_CH438_EXTUART5_BAUD);
|
CH438PortInit(5, CONFIG_CH438_EXTUART5_BAUD);
|
||||||
|
#else
|
||||||
|
WriteCH438Data(REG_IER5_ADDR, 0x00);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_CH438_EXTUART6
|
#ifdef CONFIG_CH438_EXTUART6
|
||||||
CH438PortInit(6, CONFIG_CH438_EXTUART6_BAUD);
|
CH438PortInit(6, CONFIG_CH438_EXTUART6_BAUD);
|
||||||
|
#else
|
||||||
|
WriteCH438Data(REG_IER6_ADDR, 0x00);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_CH438_EXTUART7
|
#ifdef CONFIG_CH438_EXTUART7
|
||||||
CH438PortInit(7, CONFIG_CH438_EXTUART7_BAUD);
|
CH438PortInit(7, CONFIG_CH438_EXTUART7_BAUD);
|
||||||
|
#else
|
||||||
|
WriteCH438Data(REG_IER7_ADDR, 0x00);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
up_mdelay(10);
|
up_mdelay(10);
|
||||||
|
|
Loading…
Reference in New Issue