| 50 | } |
| 51 | |
| 52 | error_t module_start(Module* module) { |
| 53 | LOG_I(TAG, "start %s", module->name); |
| 54 | |
| 55 | auto* internal = module->internal; |
| 56 | if (internal == nullptr) return ERROR_INVALID_STATE; |
| 57 | if (internal->started) return ERROR_NONE; |
| 58 | |
| 59 | error_t error = module->start(); |
| 60 | internal->started = (error == ERROR_NONE); |
| 61 | return error; |
| 62 | } |
| 63 | |
| 64 | bool module_is_started(struct Module* module) { |
| 65 | auto* internal = module->internal; |
no test coverage detected