2017-01-31 11:54:12 +08:00
|
|
|
menu "Device Drivers"
|
|
|
|
|
2017-06-06 18:18:44 +08:00
|
|
|
config RT_USING_DEVICE_IPC
|
|
|
|
bool "Using device drivers IPC"
|
|
|
|
default y
|
|
|
|
|
2017-01-31 11:54:12 +08:00
|
|
|
config RT_USING_SERIAL
|
2017-06-06 18:18:44 +08:00
|
|
|
bool "Using serial device drivers"
|
2017-12-30 17:31:22 +08:00
|
|
|
select RT_USING_DEVICE_IPC
|
2017-12-31 14:44:04 +08:00
|
|
|
select RT_USING_DEVICE
|
2017-06-06 18:18:44 +08:00
|
|
|
default y
|
2017-01-31 11:54:12 +08:00
|
|
|
|
|
|
|
config RT_USING_CAN
|
2017-06-06 18:18:44 +08:00
|
|
|
bool "Using CAN device drivers"
|
|
|
|
default n
|
2017-01-31 11:54:12 +08:00
|
|
|
|
2018-03-04 22:35:07 +08:00
|
|
|
if RT_USING_CAN
|
|
|
|
config RT_CAN_USING_HDR
|
|
|
|
bool "Enable CAN hardware filter"
|
|
|
|
default y
|
|
|
|
endif
|
|
|
|
|
2017-01-31 11:54:12 +08:00
|
|
|
config RT_USING_HWTIMER
|
2017-06-06 18:18:44 +08:00
|
|
|
bool "Using hardware timer device drivers"
|
|
|
|
default n
|
2017-01-31 11:54:12 +08:00
|
|
|
|
2017-12-23 23:34:23 +08:00
|
|
|
config RT_USING_CPUTIME
|
|
|
|
bool "Enable CPU time for high resolution clock counter"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
When enable this option, the BSP should provide a rt_clock_cputime_ops
|
|
|
|
for CPU time by:
|
2017-12-31 14:44:04 +08:00
|
|
|
const static struct rt_clock_cputime_ops _ops = {...};
|
|
|
|
clock_cpu_setops(&_ops);
|
2017-12-23 23:34:23 +08:00
|
|
|
|
2017-12-31 14:44:04 +08:00
|
|
|
Then user can use high resolution clock counter with:
|
2017-12-23 23:34:23 +08:00
|
|
|
|
2017-12-31 14:44:04 +08:00
|
|
|
ts1 = clock_cpu_gettime();
|
|
|
|
ts2 = clock_cpu_gettime();
|
|
|
|
|
|
|
|
/* and get the ms of delta tick with API: */
|
|
|
|
ms_tick = clock_cpu_millisecond(t2 - t1);
|
|
|
|
us_tick = clock_cpu_microsecond(t2 - t1);
|
2017-12-23 23:34:23 +08:00
|
|
|
|
|
|
|
if RT_USING_CPUTIME
|
|
|
|
config RT_USING_CPUTIME_CORTEXM
|
|
|
|
bool "Use DWT for CPU time"
|
|
|
|
default y
|
|
|
|
depends on ARCH_ARM_CORTEX_M3 || ARCH_ARM_CORTEX_M4 || ARCH_ARM_CORTEX_M7
|
|
|
|
help
|
|
|
|
Some Cortex-M3/4/7 MCU has Data Watchpoint and Trace Register, use
|
|
|
|
the cycle counter in DWT for CPU time.
|
|
|
|
endif
|
|
|
|
|
2017-01-31 11:54:12 +08:00
|
|
|
config RT_USING_I2C
|
2017-06-06 18:18:44 +08:00
|
|
|
bool "Using I2C device drivers"
|
|
|
|
default n
|
2017-10-09 15:12:42 +08:00
|
|
|
|
2017-10-09 11:30:30 +08:00
|
|
|
if RT_USING_I2C
|
|
|
|
config RT_USING_I2C_BITOPS
|
2017-10-09 15:12:42 +08:00
|
|
|
bool "Use GPIO to simulate I2C"
|
2017-10-09 11:30:30 +08:00
|
|
|
default y
|
|
|
|
endif
|
2017-01-31 11:54:12 +08:00
|
|
|
|
|
|
|
config RT_USING_PIN
|
2017-06-06 18:18:44 +08:00
|
|
|
bool "Using generic GPIO device drivers"
|
|
|
|
default y
|
2017-01-31 11:54:12 +08:00
|
|
|
|
2018-06-07 21:23:22 +08:00
|
|
|
config RT_USING_PWM
|
|
|
|
bool "Using PWM device drivers"
|
|
|
|
default n
|
|
|
|
|
2017-01-31 11:54:12 +08:00
|
|
|
config RT_USING_MTD_NOR
|
2017-06-06 18:18:44 +08:00
|
|
|
bool "Using MTD Nor Flash device drivers"
|
|
|
|
default n
|
2017-01-31 11:54:12 +08:00
|
|
|
|
|
|
|
config RT_USING_MTD_NAND
|
2017-06-06 18:18:44 +08:00
|
|
|
bool "Using MTD Nand Flash device drivers"
|
|
|
|
default n
|
2017-10-09 15:12:42 +08:00
|
|
|
|
|
|
|
if RT_USING_MTD_NAND
|
|
|
|
config RT_MTD_NAND_DEBUG
|
|
|
|
bool "Enable MTD Nand operations debug information"
|
|
|
|
default n
|
|
|
|
endif
|
2017-01-31 11:54:12 +08:00
|
|
|
|
|
|
|
config RT_USING_RTC
|
2017-06-06 18:18:44 +08:00
|
|
|
bool "Using RTC device drivers"
|
|
|
|
default n
|
2017-01-31 11:54:12 +08:00
|
|
|
|
2018-02-16 13:06:15 +08:00
|
|
|
if RT_USING_RTC
|
|
|
|
config RT_USING_SOFT_RTC
|
|
|
|
bool "Using software simulation RTC device"
|
|
|
|
default n
|
|
|
|
config RTC_SYNC_USING_NTP
|
|
|
|
bool "Using NTP auto sync RTC time"
|
2018-03-21 09:13:49 +08:00
|
|
|
select PKG_USING_NETUTILS
|
2018-02-16 13:06:15 +08:00
|
|
|
select PKG_NETUTILS_NTP
|
|
|
|
default n
|
|
|
|
|
|
|
|
if RTC_SYNC_USING_NTP
|
|
|
|
config RTC_NTP_FIRST_SYNC_DELAY
|
|
|
|
int "NTP first sync delay time(second) for network connect"
|
|
|
|
default 30
|
|
|
|
config RTC_NTP_SYNC_PERIOD
|
|
|
|
int "NTP auto sync period(second)"
|
|
|
|
default 3600
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2017-01-31 11:54:12 +08:00
|
|
|
config RT_USING_SDIO
|
2017-06-06 18:18:44 +08:00
|
|
|
bool "Using SD/MMC device drivers"
|
|
|
|
default n
|
2017-01-31 11:54:12 +08:00
|
|
|
|
2018-06-23 11:23:59 +08:00
|
|
|
if RT_USING_SDIO
|
|
|
|
config RT_SDIO_STACK_SIZE
|
|
|
|
int "The stack size for sdio irq thread"
|
|
|
|
default 512
|
|
|
|
|
|
|
|
config RT_SDIO_THREAD_PRIORITY
|
|
|
|
int "The priority level value of sdio irq thread"
|
|
|
|
default 15
|
|
|
|
|
|
|
|
config RT_MMCSD_STACK_SIZE
|
|
|
|
int "The stack size for mmcsd thread"
|
|
|
|
default 1024
|
|
|
|
|
|
|
|
config RT_MMCSD_THREAD_PREORITY
|
|
|
|
int "The priority level value of mmcsd thread"
|
|
|
|
default 22
|
|
|
|
|
|
|
|
config RT_MMCSD_MAX_PARTITION
|
|
|
|
int "mmcsd max partition"
|
|
|
|
default 16
|
|
|
|
endif
|
|
|
|
|
2017-01-31 11:54:12 +08:00
|
|
|
config RT_USING_SPI
|
2017-06-06 18:18:44 +08:00
|
|
|
bool "Using SPI Bus/Device device drivers"
|
|
|
|
default n
|
2017-01-31 11:54:12 +08:00
|
|
|
|
2017-06-06 18:18:44 +08:00
|
|
|
if RT_USING_SPI
|
2018-02-06 20:26:49 +08:00
|
|
|
config RT_USING_SPI_MSD
|
|
|
|
bool "Using SD/TF card driver with spi"
|
|
|
|
select RT_USING_DFS
|
|
|
|
default n
|
|
|
|
|
2017-09-29 16:57:17 +08:00
|
|
|
config RT_USING_SFUD
|
|
|
|
bool "Using Serial Flash Universal Driver"
|
|
|
|
default n
|
|
|
|
if RT_USING_SFUD
|
|
|
|
config RT_SFUD_USING_SFDP
|
|
|
|
bool "Using auto probe flash JEDEC SFDP parameter"
|
|
|
|
default y
|
|
|
|
|
|
|
|
config RT_SFUD_USING_FLASH_INFO_TABLE
|
|
|
|
bool "Using defined supported flash chip information table"
|
|
|
|
default y
|
|
|
|
|
2018-04-19 19:40:47 +08:00
|
|
|
config RT_DEBUG_SFUD
|
2017-09-29 16:57:17 +08:00
|
|
|
bool "Show more SFUD debug information"
|
|
|
|
default n
|
|
|
|
endif
|
|
|
|
|
2017-06-06 18:18:44 +08:00
|
|
|
config RT_USING_W25QXX
|
|
|
|
bool "Using W25QXX SPI NorFlash"
|
|
|
|
default n
|
2017-01-31 11:54:12 +08:00
|
|
|
|
2017-06-06 18:18:44 +08:00
|
|
|
config RT_USING_GD
|
|
|
|
bool "Using GD SPI NorFlash"
|
|
|
|
default n
|
2017-01-31 11:54:12 +08:00
|
|
|
|
2017-06-06 18:18:44 +08:00
|
|
|
config RT_USING_ENC28J60
|
|
|
|
bool "Using ENC28J60 SPI Ethernet network interface"
|
|
|
|
select RT_USING_LWIP
|
|
|
|
default n
|
2017-01-31 11:54:12 +08:00
|
|
|
|
2017-06-06 18:18:44 +08:00
|
|
|
config RT_USING_SPI_WIFI
|
|
|
|
bool "Using RW009/007 SPI Wi-Fi wireless interface"
|
|
|
|
select RT_USING_LWIP
|
|
|
|
default n
|
|
|
|
endif
|
2017-01-31 11:54:12 +08:00
|
|
|
|
|
|
|
config RT_USING_WDT
|
2017-06-06 18:18:44 +08:00
|
|
|
bool "Using Watch Dog device drivers"
|
|
|
|
default n
|
2017-01-31 11:54:12 +08:00
|
|
|
|
2017-11-18 09:40:14 +08:00
|
|
|
config RT_USING_WIFI
|
|
|
|
bool "Using Wi-Fi network"
|
|
|
|
default n
|
2017-01-31 11:54:12 +08:00
|
|
|
|
2018-06-06 11:03:09 +08:00
|
|
|
if RT_USING_WIFI
|
|
|
|
config RT_USING_WLAN_STA
|
|
|
|
bool "Using station mode"
|
2018-06-06 11:07:50 +08:00
|
|
|
default y
|
2018-06-06 11:03:09 +08:00
|
|
|
|
|
|
|
config RT_USING_WLAN_AP
|
|
|
|
bool "Using ap mode"
|
|
|
|
default n
|
|
|
|
|
|
|
|
config WIFI_DEVICE_STA_NAME
|
|
|
|
string "the wifi device name for station"
|
|
|
|
default "w0"
|
|
|
|
|
|
|
|
config WIFI_DEVICE_AP_NAME
|
|
|
|
string "the wifi device name for ap"
|
|
|
|
default "ap"
|
|
|
|
endif
|
|
|
|
|
2018-05-29 10:10:42 +08:00
|
|
|
config RT_USING_AUDIO
|
|
|
|
bool "Using Audio device drivers"
|
|
|
|
default n
|
|
|
|
|
2017-11-16 14:51:04 +08:00
|
|
|
menu "Using USB"
|
|
|
|
config RT_USING_USB_HOST
|
|
|
|
bool "Using USB host"
|
|
|
|
default n
|
2017-06-06 18:18:44 +08:00
|
|
|
|
2017-11-16 14:51:04 +08:00
|
|
|
if RT_USING_USB_HOST
|
2017-12-14 22:45:12 +08:00
|
|
|
config RT_USBH_MSTORAGE
|
|
|
|
bool "Enable Udisk Drivers"
|
2017-11-16 14:51:04 +08:00
|
|
|
default n
|
2017-12-14 22:45:12 +08:00
|
|
|
if RT_USBH_MSTORAGE
|
|
|
|
config UDISK_MOUNTPOINT
|
|
|
|
string "Udisk mount dir"
|
|
|
|
default "/"
|
|
|
|
endif
|
2017-11-16 14:51:04 +08:00
|
|
|
endif
|
|
|
|
config RT_USING_USB_DEVICE
|
|
|
|
bool "Using USB device"
|
|
|
|
default n
|
2018-04-23 20:09:01 +08:00
|
|
|
if RT_USING_USB_DEVICE || RT_USING_USB_HOST
|
|
|
|
config RT_USBD_THREAD_STACK_SZ
|
|
|
|
int "usb thread stack size"
|
|
|
|
default 4096
|
|
|
|
endif
|
2017-11-16 14:51:04 +08:00
|
|
|
if RT_USING_USB_DEVICE
|
2018-03-09 15:28:57 +08:00
|
|
|
config USB_VENDOR_ID
|
2018-03-09 15:21:33 +08:00
|
|
|
hex "USB Vendor ID"
|
|
|
|
default 0x0FFE
|
2018-03-09 15:28:57 +08:00
|
|
|
config USB_PRODUCT_ID
|
2018-03-09 15:21:33 +08:00
|
|
|
hex "USB Product ID"
|
|
|
|
default 0x0001
|
|
|
|
|
2017-11-16 14:51:04 +08:00
|
|
|
config RT_USB_DEVICE_COMPOSITE
|
|
|
|
bool "Enable composite device"
|
|
|
|
default n
|
|
|
|
choice
|
|
|
|
prompt "Device type"
|
2018-04-24 15:00:33 +08:00
|
|
|
default _RT_USB_DEVICE_NONE
|
2017-11-16 14:51:04 +08:00
|
|
|
depends on !RT_USB_DEVICE_COMPOSITE
|
2018-04-24 15:00:33 +08:00
|
|
|
config _RT_USB_DEVICE_NONE
|
|
|
|
bool "Using custom class by register interface"
|
|
|
|
select RT_USB_DEVICE_NONE
|
2017-11-16 14:51:04 +08:00
|
|
|
config _RT_USB_DEVICE_CDC
|
|
|
|
bool "Enable to use device as CDC device"
|
|
|
|
select RT_USB_DEVICE_CDC
|
|
|
|
config _RT_USB_DEVICE_MSTORAGE
|
|
|
|
bool "Enable to use device as Mass Storage device"
|
|
|
|
select RT_USB_DEVICE_MSTORAGE
|
|
|
|
config _RT_USB_DEVICE_HID
|
|
|
|
bool "Enable to use device as HID device"
|
|
|
|
select RT_USB_DEVICE_HID
|
2017-11-24 22:57:22 +08:00
|
|
|
config _RT_USB_DEVICE_RNDIS
|
|
|
|
bool "Enable to use device as rndis device"
|
|
|
|
select RT_USB_DEVICE_RNDIS
|
|
|
|
depends on RT_USING_LWIP
|
2017-11-21 22:37:22 +08:00
|
|
|
config _RT_USB_DEVICE_ECM
|
|
|
|
bool "Enable to use device as ecm device"
|
|
|
|
select RT_USB_DEVICE_ECM
|
|
|
|
depends on RT_USING_LWIP
|
2017-11-23 00:37:21 +08:00
|
|
|
config _RT_USB_DEVICE_WINUSB
|
|
|
|
bool "Enable to use device as winusb device"
|
|
|
|
select RT_USB_DEVICE_WINUSB
|
2017-11-16 14:51:04 +08:00
|
|
|
endchoice
|
|
|
|
if RT_USB_DEVICE_COMPOSITE
|
|
|
|
config RT_USB_DEVICE_CDC
|
|
|
|
bool "Enable to use device as CDC device"
|
2018-04-24 15:00:33 +08:00
|
|
|
default n
|
|
|
|
config RT_USB_DEVICE_NONE
|
2017-11-16 14:51:04 +08:00
|
|
|
default y
|
|
|
|
config RT_USB_DEVICE_MSTORAGE
|
|
|
|
bool "Enable to use device as Mass Storage device"
|
|
|
|
default n
|
|
|
|
config RT_USB_DEVICE_HID
|
|
|
|
bool "Enable to use device as HID device"
|
|
|
|
default n
|
2017-11-24 22:57:22 +08:00
|
|
|
config RT_USB_DEVICE_RNDIS
|
|
|
|
bool "Enable to use device as rndis device"
|
|
|
|
default n
|
|
|
|
depends on RT_USING_LWIP
|
2017-11-21 22:37:22 +08:00
|
|
|
config RT_USB_DEVICE_ECM
|
|
|
|
bool "Enable to use device as ecm device"
|
|
|
|
default n
|
|
|
|
depends on RT_USING_LWIP
|
2017-11-23 00:37:21 +08:00
|
|
|
config RT_USB_DEVICE_WINUSB
|
|
|
|
bool "Enable to use device as winusb device"
|
|
|
|
default n
|
2017-11-16 14:51:04 +08:00
|
|
|
endif
|
2018-03-09 15:21:33 +08:00
|
|
|
if RT_USB_DEVICE_WINUSB
|
|
|
|
config RT_WINUSB_GUID
|
|
|
|
string "Guid for winusb"
|
|
|
|
default "{6860DC3C-C05F-4807-8807-1CA861CC1D66}"
|
|
|
|
endif
|
2017-11-29 18:33:09 +08:00
|
|
|
if RT_USB_DEVICE_MSTORAGE
|
|
|
|
config RT_USB_MSTORAGE_DISK_NAME
|
|
|
|
string "msc class disk name"
|
|
|
|
default "flash0"
|
|
|
|
endif
|
2017-11-16 14:51:04 +08:00
|
|
|
if RT_USB_DEVICE_HID
|
|
|
|
config RT_USB_DEVICE_HID_KEYBOARD
|
|
|
|
bool "Use to HID device as Keyboard"
|
|
|
|
default n
|
|
|
|
if RT_USB_DEVICE_HID_KEYBOARD
|
|
|
|
config RT_USB_DEVICE_HID_KEYBOARD_NUMBER
|
|
|
|
int "Number of Keyboard(max 3)"
|
|
|
|
default 1
|
|
|
|
range 1 3
|
|
|
|
endif
|
|
|
|
config RT_USB_DEVICE_HID_MOUSE
|
|
|
|
bool "Use to HID device as Mouse"
|
|
|
|
default n
|
|
|
|
config RT_USB_DEVICE_HID_GENERAL
|
|
|
|
bool "Use to HID device as General HID device"
|
|
|
|
default y
|
|
|
|
if RT_USB_DEVICE_HID_GENERAL
|
|
|
|
config RT_USB_DEVICE_HID_GENERAL_OUT_REPORT_LENGTH
|
|
|
|
int "General HID device out report length"
|
|
|
|
default 63
|
|
|
|
range 0 63
|
|
|
|
|
|
|
|
config RT_USB_DEVICE_HID_GENERAL_IN_REPORT_LENGTH
|
|
|
|
int "General HID device in report length"
|
|
|
|
default 63
|
|
|
|
range 0 63
|
|
|
|
endif
|
|
|
|
config RT_USB_DEVICE_HID_MEDIA
|
|
|
|
bool "Use to HID device as media keyboard"
|
|
|
|
default y
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endmenu
|
2017-01-31 11:54:12 +08:00
|
|
|
endmenu
|