diff --git a/APP_Framework/Applications/app_test/Kconfig b/APP_Framework/Applications/app_test/Kconfig index 91550632a..36653101a 100644 --- a/APP_Framework/Applications/app_test/Kconfig +++ b/APP_Framework/Applications/app_test/Kconfig @@ -26,14 +26,42 @@ menu "test app" endif endif - menuconfig USER_TEST_SD - bool "Config test sd" + menuconfig USER_TEST_FS + bool "Config test fs with sd or usb" default n - if USER_TEST_SD + if USER_TEST_FS if ADD_XIZI_FETURES config SD_FPATH - string "Set sd file path" - default "/sdcard_testfile" + string "Set test file path" + default "/test_file" + endif + endif + + + menuconfig USER_TEST_GPIO + select BSP_USING_GPIO + select RESOURCES_PIN + select BSP_USING_LED + select BSP_USING_KEY + bool "Config test gpio with led and key" + default n + if USER_TEST_GPIO + if ADD_XIZI_FETURES + config GPIO_DEV_DRIVER + string "Set gpio dev path" + default "/dev/pin_dev" + endif + endif + + menuconfig USER_TEST_I2C + select BSP_USING_I2C + bool "Config test i2c" + default n + if USER_TEST_I2C + if ADD_XIZI_FETURES + config I2C_DEV_DRIVER + string "Set i2c dev path" + default "/dev/i2c_dev" endif endif diff --git a/APP_Framework/Applications/app_test/Makefile b/APP_Framework/Applications/app_test/Makefile index 2d68c4cc4..5d5a5fc52 100644 --- a/APP_Framework/Applications/app_test/Makefile +++ b/APP_Framework/Applications/app_test/Makefile @@ -25,8 +25,8 @@ ifeq ($(CONFIG_ADD_XIZI_FETURES),y) SRC_FILES += test_dac.c endif - ifeq ($(CONFIG_USER_TEST_SD),y) - SRC_FILES += test_softspi_sd.c + ifeq ($(CONFIG_USER_TEST_FS),y) + SRC_FILES += test_fs.c endif ifeq ($(CONFIG_USER_TEST_SEMC),y) @@ -37,5 +37,13 @@ ifeq ($(CONFIG_ADD_XIZI_FETURES),y) SRC_FILES += endif + ifeq ($(CONFIG_USER_TEST_I2C),y) + SRC_FILES += test_i2c.c + endif + + ifeq ($(CONFIG_USER_TEST_GPIO),y) + SRC_FILES += test_gpio.c + endif + include $(KERNEL_ROOT)/compiler.mk endif diff --git a/APP_Framework/Applications/app_test/test_softspi_sd.c b/APP_Framework/Applications/app_test/test_fs.c similarity index 98% rename from APP_Framework/Applications/app_test/test_softspi_sd.c rename to APP_Framework/Applications/app_test/test_fs.c index c49e324fa..4711d0198 100644 --- a/APP_Framework/Applications/app_test/test_softspi_sd.c +++ b/APP_Framework/Applications/app_test/test_fs.c @@ -15,7 +15,7 @@ void TestSD(void) //read and write then close file read(fd,filewords,MAX_READ_LENGTH); printf("read data is \n%s\n",filewords); - const char *input_words = "these words are going to write in sdcard\n"; + const char *input_words = "these words are going to write in fs\n"; write(fd,input_words,strlen(input_words)); close(fd); diff --git a/APP_Framework/Applications/app_test/test_gpio.c b/APP_Framework/Applications/app_test/test_gpio.c new file mode 100644 index 000000000..2841cff50 --- /dev/null +++ b/APP_Framework/Applications/app_test/test_gpio.c @@ -0,0 +1,10 @@ +#include +#include +#include + + +void TestGpio(void) +{ + +} + diff --git a/APP_Framework/Applications/app_test/test_i2c.c b/APP_Framework/Applications/app_test/test_i2c.c new file mode 100644 index 000000000..d41a215e8 --- /dev/null +++ b/APP_Framework/Applications/app_test/test_i2c.c @@ -0,0 +1,9 @@ +#include +#include +#include + + +void TestI2C(void) +{ + +} diff --git a/APP_Framework/Applications/app_test/test_loraE220.c b/APP_Framework/Applications/app_test/test_loraE220.c new file mode 100644 index 000000000..e69de29bb diff --git a/APP_Framework/Applications/app_test/test_rs485.c b/APP_Framework/Applications/app_test/test_rs485.c new file mode 100644 index 000000000..e69de29bb diff --git a/Ubiquitous/XiZi_IIoT/board/edu-riscv64/third_party_driver/gpio/drv_io_config.c b/Ubiquitous/XiZi_IIoT/board/edu-riscv64/third_party_driver/gpio/drv_io_config.c index c92ebcce1..ee1c55960 100644 --- a/Ubiquitous/XiZi_IIoT/board/edu-riscv64/third_party_driver/gpio/drv_io_config.c +++ b/Ubiquitous/XiZi_IIoT/board/edu-riscv64/third_party_driver/gpio/drv_io_config.c @@ -97,12 +97,22 @@ static struct io_config IOCONFIG(BSP_CH438_D6_PIN, HS_GPIO(FPIOA_CH438_D6)), IOCONFIG(BSP_CH438_D7_PIN, HS_GPIO(FPIOA_CH438_D7)), #endif + #ifdef BSP_USING_SOFT_SPI IOCONFIG(BSP_SOFT_SPI_SCK_PIN, HS_GPIO(FPIOA_SOFT_SPI_SCK)), IOCONFIG(BSP_SOFT_SPI_MIOS_PIN, HS_GPIO(FPIOA_SOFT_SPI_MIOS)), IOCONFIG(BSP_SOFT_SPI_MSOI_PIN, HS_GPIO(FPIOA_SOFT_SPI_MSOI)), IOCONFIG(BSP_SOFT_SPI_NCS_PIN, HS_GPIO(FPIOA_SOFT_SPI_NCS)), #endif + +#ifdef BSP_USING_LED + IOCONFIG(BSP_LED_PIN,FUNC_GPIO5); +#endif + +#ifdef BSP_USING_KEY + IOCONFIG(BSP_KEY_PIN,FUNC_GPIO6); +#endif + }; static int PrintIoConfig() diff --git a/Ubiquitous/XiZi_IIoT/board/edu-riscv64/third_party_driver/soft_spi/Kconfig b/Ubiquitous/XiZi_IIoT/board/edu-riscv64/third_party_driver/soft_spi/Kconfig index d52a83176..73b7f7c4f 100644 --- a/Ubiquitous/XiZi_IIoT/board/edu-riscv64/third_party_driver/soft_spi/Kconfig +++ b/Ubiquitous/XiZi_IIoT/board/edu-riscv64/third_party_driver/soft_spi/Kconfig @@ -38,10 +38,6 @@ if BSP_USING_SOFT_SPI config SOFT_SPI_CLK_DELAY int "clk in microsecond" default 0 - - config SOFT_SPI_READ_DELAY - int "read after millisecond" - default 1 endif