make targets "loadable"

This commit is contained in:
Philippe G
2022-01-20 17:30:36 -08:00
parent 964b94fa1e
commit dbdd0739db
10 changed files with 72 additions and 30 deletions

View File

@@ -0,0 +1,11 @@
#include "string.h"
#include "targets.h"
const struct target_s *target_set[] = { &target_muse, NULL };
void target_init(char *target) {
for (int i = 0; target_set[i]; i++) if (strcasestr(target_set[i]->model, target)) {
target_set[i]->init();
break;
}
}