MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / fal_flash_device_find

Function fal_flash_device_find

components/fal/src/fal_flash.c:91–106  ·  view source on GitHub ↗

* find flash device by name * * @param name flash device name * * @return != NULL: flash device * NULL: not found */

Source from the content-addressed store, hash-verified

89 * NULL: not found
90 */
91const struct fal_flash_dev *fal_flash_device_find(const char *name)
92{
93 RT_ASSERT(init_ok);
94 RT_ASSERT(name);
95
96 rt_size_t i;
97
98 for (i = 0; i < device_table_len; i++)
99 {
100 if (!strncmp(name, device_table[i]->name, FAL_DEV_NAME_MAX)) {
101 return device_table[i];
102 }
103 }
104
105 return NULL;
106}

Callers 7

fal_partition_initFunction · 0.85
fal_blk_device_createFunction · 0.85
fal_char_device_createFunction · 0.85
falFunction · 0.85
fal_testFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected