feat support webserver function include device_info/interface/net_ethernet for xishutong-arm32

This commit is contained in:
Liu_Weichao
2023-12-21 16:29:36 +08:00
parent b9801f0a38
commit e7047a752d
3 changed files with 477 additions and 58 deletions
@@ -75,6 +75,7 @@ Modification:
static stc_sd_handle_t gSdHandle;
static int sd_lock = -1;
static int is_mount_ok = 0;
static void SdCardConfig(void)
{
@@ -213,11 +214,13 @@ static struct SdioDevDone dev_done = {
*/
static int MountSDCardFs(enum FilesystemType fs_type)
{
if (MountFilesystem(SDIO_BUS_NAME, SDIO_DEVICE_NAME, SDIO_DRIVER_NAME, fs_type, "/") == 0)
if (MountFilesystem(SDIO_BUS_NAME, SDIO_DEVICE_NAME, SDIO_DRIVER_NAME, fs_type, "/") == 0) {
KPrintf("Sd card mount to '/'\n");
else
is_mount_ok = 1;
} else {
KPrintf("Sd card mount to '/' failed!\n");
is_mount_ok = 0;
}
return 0;
}
#endif
@@ -252,9 +255,17 @@ static void SdCardDetach(void)
#ifdef MOUNT_SDCARD_FS
UnmountFileSystem("/");
is_mount_ok = 0;
#endif
}
int GetSdMountStatus(void)
{
if(!is_mount_ok)
KPrintf("SD card is not inserted or failed to mount, please check!\r\n");
return is_mount_ok;
}
static uint8 SdCardReadCd(void)
{
en_pin_state_t sd_cd_state = GPIO_ReadInputPins(SDIOC_CD_PORT, SDIOC_CD_PIN);
@@ -16,6 +16,7 @@ menuconfig BSP_USING_UART3
menuconfig BSP_USING_UART4
bool "Enable USART4 for RS485"
default y
select BSP_USING_RS485
if BSP_USING_UART4
config SERIAL_BUS_NAME_4
string "serial bus 4 name"
@@ -25,9 +26,13 @@ menuconfig BSP_USING_UART4
default "usart4_drv"
config SERIAL_4_DEVICE_NAME_0
string "serial bus 4 device 0 name"
default "usart4_dev4"
default "usart4_dev4"
endif
config BSP_USING_RS485
bool
default n
menuconfig BSP_USING_UART6
bool "Enable USART6"
default n