forked from xuos/xiuos
add CH438_EXTUART_BAUD to menuconfig
This commit is contained in:
parent
00e0a48ee7
commit
b6407cb68b
|
@ -6,80 +6,80 @@
|
|||
if ARCH_BOARD_XIDATONG
|
||||
|
||||
choice
|
||||
prompt "Boot Flash"
|
||||
default XIDATONG_QSPI_FLASH
|
||||
prompt "Boot Flash"
|
||||
default XIDATONG_QSPI_FLASH
|
||||
|
||||
config XIDATONG_HYPER_FLASH
|
||||
bool "HYPER Flash"
|
||||
bool "HYPER Flash"
|
||||
|
||||
config XIDATONG_QSPI_FLASH
|
||||
bool "QSPI Flash"
|
||||
bool "QSPI Flash"
|
||||
|
||||
endchoice # Boot Flash
|
||||
|
||||
config XIDATONG_SDRAM
|
||||
bool "Enable SDRAM"
|
||||
default y
|
||||
select IMXRT_SEMC_INIT_DONE
|
||||
---help---
|
||||
Activate DCD configuration of SDRAM
|
||||
bool "Enable SDRAM"
|
||||
default y
|
||||
select IMXRT_SEMC_INIT_DONE
|
||||
---help---
|
||||
Activate DCD configuration of SDRAM
|
||||
|
||||
config XIDATONG_SDIO_AUTOMOUNT
|
||||
bool "SD card automounter"
|
||||
default n
|
||||
depends on FS_AUTOMOUNTER && IMXRT_USDHC
|
||||
bool "SD card automounter"
|
||||
default n
|
||||
depends on FS_AUTOMOUNTER && IMXRT_USDHC
|
||||
|
||||
if XIDATONG_SDIO_AUTOMOUNT
|
||||
|
||||
config XIDATONG_SDIO_AUTOMOUNT_FSTYPE
|
||||
string "SD card file system type"
|
||||
default "vfat"
|
||||
string "SD card file system type"
|
||||
default "vfat"
|
||||
|
||||
config XIDATONG_SDIO_AUTOMOUNT_BLKDEV
|
||||
string "SD card block device"
|
||||
default "/dev/mmcsd0"
|
||||
string "SD card block device"
|
||||
default "/dev/mmcsd0"
|
||||
|
||||
config XIDATONG_SDIO_AUTOMOUNT_MOUNTPOINT
|
||||
string "SD card mount point"
|
||||
default "/mnt/sdcard"
|
||||
string "SD card mount point"
|
||||
default "/mnt/sdcard"
|
||||
|
||||
config XIDATONG_SDIO_AUTOMOUNT_DDELAY
|
||||
int "SD card debounce delay (milliseconds)"
|
||||
default 1000
|
||||
int "SD card debounce delay (milliseconds)"
|
||||
default 1000
|
||||
|
||||
config XIDATONG_SDIO_AUTOMOUNT_UDELAY
|
||||
int "SD card unmount retry delay (milliseconds)"
|
||||
default 2000
|
||||
int "SD card unmount retry delay (milliseconds)"
|
||||
default 2000
|
||||
|
||||
endif # XIDATONG_SDIO_AUTOMOUNT
|
||||
|
||||
config XIDATONG_USB_AUTOMOUNT
|
||||
bool "USB Mass Storage automounter"
|
||||
default n
|
||||
depends on USBHOST_MSC && USBHOST_MSC_NOTIFIER
|
||||
bool "USB Mass Storage automounter"
|
||||
default n
|
||||
depends on USBHOST_MSC && USBHOST_MSC_NOTIFIER
|
||||
|
||||
if XIDATONG_USB_AUTOMOUNT
|
||||
|
||||
config XIDATONG_USB_AUTOMOUNT_FSTYPE
|
||||
string "USB file system type"
|
||||
default "vfat"
|
||||
string "USB file system type"
|
||||
default "vfat"
|
||||
|
||||
config XIDATONG_USB_AUTOMOUNT_BLKDEV
|
||||
string "USB block device prefix"
|
||||
default "/dev/sd"
|
||||
string "USB block device prefix"
|
||||
default "/dev/sd"
|
||||
|
||||
config XIDATONG_USB_AUTOMOUNT_MOUNTPOINT
|
||||
string "USB mount point prefix"
|
||||
default "/mnt/usb"
|
||||
string "USB mount point prefix"
|
||||
default "/mnt/usb"
|
||||
|
||||
config XIDATONG_USB_AUTOMOUNT_NUM_BLKDEV
|
||||
int "Number of block devices to monitor."
|
||||
range 1 26
|
||||
default 4
|
||||
int "Number of block devices to monitor."
|
||||
range 1 26
|
||||
default 4
|
||||
|
||||
config XIDATONG_USB_AUTOMOUNT_UDELAY
|
||||
int "USB unmount retry delay (milliseconds)"
|
||||
default 2000
|
||||
int "USB unmount retry delay (milliseconds)"
|
||||
default 2000
|
||||
|
||||
endif # XIDATONG_USB_AUTOMOUNT
|
||||
|
||||
|
@ -89,36 +89,116 @@ menuconfig BSP_USING_CH438
|
|||
|
||||
if BSP_USING_CH438
|
||||
config CH438_EXTUART0
|
||||
bool "using ch438 port 0"
|
||||
default n
|
||||
bool "Using Ch438 Port 0"
|
||||
default n
|
||||
|
||||
menu "Ch438 Port 0 Configuration"
|
||||
depends on CH438_EXTUART0
|
||||
|
||||
config CH438_EXTUART0_BAUD
|
||||
int "Ch438 Port 0 Baud Rate."
|
||||
default 115200
|
||||
---help---
|
||||
The configured BAUD of the CH438 EXTUART0.
|
||||
endmenu
|
||||
|
||||
config CH438_EXTUART1
|
||||
bool "using ch438 port 1"
|
||||
default n
|
||||
bool "Using Ch438 Port 1"
|
||||
default n
|
||||
|
||||
menu "Ch438 Port 1 Configuration"
|
||||
depends on CH438_EXTUART1
|
||||
|
||||
config CH438_EXTUART1_BAUD
|
||||
int "Ch438 Port 1 Baud Rate."
|
||||
default 115200
|
||||
---help---
|
||||
The configured BAUD of the CH438 EXTUART1.
|
||||
endmenu
|
||||
|
||||
config CH438_EXTUART2
|
||||
bool "using ch438 port 2"
|
||||
default n
|
||||
bool "Using Ch438 Port 2"
|
||||
default n
|
||||
|
||||
menu "Ch438 Port 2 Configuration"
|
||||
depends on CH438_EXTUART2
|
||||
|
||||
config CH438_EXTUART2_BAUD
|
||||
int "Ch438 Port 2 Baud Rate."
|
||||
default 115200
|
||||
---help---
|
||||
The configured BAUD of the CH438 EXTUART2.
|
||||
endmenu
|
||||
|
||||
config CH438_EXTUART3
|
||||
bool "using ch438 port 3"
|
||||
default n
|
||||
bool "Using Ch438 Port 3"
|
||||
default n
|
||||
|
||||
menu "Ch438 Port 3 Configuration"
|
||||
depends on CH438_EXTUART3
|
||||
|
||||
config CH438_EXTUART3_BAUD
|
||||
int "Ch438 Port 3 Baud Rate."
|
||||
default 115200
|
||||
---help---
|
||||
The configured BAUD of the CH438 EXTUART3.
|
||||
endmenu
|
||||
|
||||
config CH438_EXTUART4
|
||||
bool "using ch438 port 4"
|
||||
default n
|
||||
bool "Using Ch438 Port 4"
|
||||
default n
|
||||
|
||||
menu "Ch438 Port 4 Configuration"
|
||||
depends on CH438_EXTUART4
|
||||
|
||||
config CH438_EXTUART4_BAUD
|
||||
int "Ch438 Port 4 Baud Rate."
|
||||
default 115200
|
||||
---help---
|
||||
The configured BAUD of the CH438 EXTUART4.
|
||||
endmenu
|
||||
|
||||
config CH438_EXTUART5
|
||||
bool "using ch438 port 5"
|
||||
default n
|
||||
bool "Using Ch438 Port 5"
|
||||
default n
|
||||
|
||||
menu "Ch438 Port 5 Configuration"
|
||||
depends on CH438_EXTUART5
|
||||
|
||||
config CH438_EXTUART5_BAUD
|
||||
int "Ch438 Port 5 Baud Rate."
|
||||
default 115200
|
||||
---help---
|
||||
The configured BAUD of the CH438 EXTUART5.
|
||||
endmenu
|
||||
|
||||
config CH438_EXTUART6
|
||||
bool "using ch438 port 6"
|
||||
default n
|
||||
bool "Using Ch438 Port 6"
|
||||
default n
|
||||
|
||||
menu "Ch438 Port 6 Configuration"
|
||||
depends on CH438_EXTUART6
|
||||
|
||||
config CH438_EXTUART6_BAUD
|
||||
int "Ch438 Port 6 Baud Rate."
|
||||
default 115200
|
||||
---help---
|
||||
The configured BAUD of the CH438 EXTUART6.
|
||||
endmenu
|
||||
|
||||
config CH438_EXTUART7
|
||||
bool "using ch438 port 7"
|
||||
default n
|
||||
bool "Using Ch438 Port 7"
|
||||
default n
|
||||
|
||||
menu "Ch438 Port 7 Configuration"
|
||||
depends on CH438_EXTUART7
|
||||
|
||||
config CH438_EXTUART7_BAUD
|
||||
int "Ch438 Port 7 Baud Rate."
|
||||
default 115200
|
||||
---help---
|
||||
The configured BAUD of the CH438 EXTUART7.
|
||||
endmenu
|
||||
|
||||
endif # BSP_USING_CH438
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ void CH438Demo(void)
|
|||
int readlen;
|
||||
|
||||
fd = open("/dev/extuart_dev3", O_RDWR);
|
||||
ioctl(fd, OPE_INT, (unsigned long)9600);
|
||||
m0fd = open("/dev/gpout0", O_RDWR);
|
||||
m1fd = open("/dev/gpout1", O_RDWR);
|
||||
ioctl(m0fd, GPIOC_WRITE, (unsigned long)1);
|
||||
|
|
|
@ -629,14 +629,38 @@ static void Ch438InitDefault(void)
|
|||
}
|
||||
|
||||
ImxrtCH438Init();
|
||||
CH438PortInit(0,115200);
|
||||
CH438PortInit(1,115200);
|
||||
CH438PortInit(2,9600);
|
||||
CH438PortInit(3,9600);
|
||||
CH438PortInit(4,115200);
|
||||
CH438PortInit(5,115200);
|
||||
CH438PortInit(6,115200);
|
||||
CH438PortInit(7,115200);
|
||||
|
||||
#ifdef CONFIG_CH438_EXTUART0
|
||||
CH438PortInit(0, CONFIG_CH438_EXTUART0_BAUD);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CH438_EXTUART1
|
||||
CH438PortInit(1, CONFIG_CH438_EXTUART1_BAUD);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CH438_EXTUART2
|
||||
CH438PortInit(2, CONFIG_CH438_EXTUART2_BAUD);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CH438_EXTUART3
|
||||
CH438PortInit(3, CONFIG_CH438_EXTUART3_BAUD);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CH438_EXTUART4
|
||||
CH438PortInit(4, CONFIG_CH438_EXTUART4_BAUD);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CH438_EXTUART5
|
||||
CH438PortInit(5, CONFIG_CH438_EXTUART5_BAUD);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CH438_EXTUART6
|
||||
CH438PortInit(6, CONFIG_CH438_EXTUART6_BAUD);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CH438_EXTUART7
|
||||
CH438PortInit(7, CONFIG_CH438_EXTUART7_BAUD);
|
||||
#endif
|
||||
|
||||
up_mdelay(10);
|
||||
|
||||
|
|
Loading…
Reference in New Issue