* find flash device by name * * @param name flash device name * * @return != NULL: flash device * NULL: not found */
| 89 | * NULL: not found |
| 90 | */ |
| 91 | const 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 | } |
no outgoing calls
no test coverage detected