1root { 2 module = "alientek,stm32f407"; 3 device_info { 4 match_attr = "hdf_manager"; 5 template host { 6 hostName = ""; 7 priority = 100; 8 template device { 9 template deviceNode { 10 policy = 0; 11 priority = 100; 12 preload = 0; 13 permission = 0664; 14 moduleName = ""; 15 serviceName = ""; 16 deviceMatchAttr = ""; 17 } 18 } 19 } 20 21 platform :: host { 22 hostName = "platform_host"; 23 priority = 50; 24 device_gpio :: device { 25 gpio0 :: deviceNode { 26 policy = 0; 27 priority = 60; 28 moduleName = "ST_GPIO_MODULE_HDF"; 29 serviceName = "HDF_PLATFORM_GPIO"; 30 deviceMatchAttr = "gpio_config"; 31 } 32 } 33 device_i2c :: device { 34 i2c_manager :: deviceNode { 35 policy = 2; 36 priority = 50; 37 moduleName = "HDF_PLATFORM_I2C_MANAGER"; 38 serviceName = "HDF_PLATFORM_I2C_MANAGER"; 39 } 40 41 i2c1 :: deviceNode { 42 policy = 0; 43 priority = 100; 44 moduleName = "ST_I2C_MODULE_HDF"; 45 serviceName = "HDF_PLATFORM_I2C_1"; 46 deviceMatchAttr = "i2c1_config"; 47 } 48 } 49 } 50 51 misc :: host { 52 hostName = "misc_host"; 53 priority = 100; 54 fs :: device { 55 littlefs :: deviceNode { 56 policy = 0; 57 priority = 100; 58 moduleName = "HDF_FS_LITTLEFS"; 59 deviceMatchAttr = "littlefs_config"; 60 } 61 } 62 ethernet :: device { 63 ethernet0 :: deviceNode { 64 policy = 0; 65 priority = 60;//priority优先级越低的越先被加载 66 moduleName = "HDF_NET_ETHERNET"; 67 deviceMatchAttr = "ethernet_config"; 68 } 69 } 70 test :: device { 71 test0 :: deviceNode { 72 policy = 0; 73 priority = 30;//priority优先级越低的越先被加载 74 moduleName = "PLATFORM_TEST_DRIVER"; 75 deviceMatchAttr = "test_config"; 76 } 77 } 78 } 79 } 80} 81 82