backend: add preliminary support for driver detection

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-04-20 00:21:38 +01:00
parent a2d0d5c826
commit 685a583f84
7 changed files with 132 additions and 1 deletions

View File

@@ -5,6 +5,7 @@
#include <stdbool.h>
#include "driver.h"
#include "compiler.h"
#include "kernel.h"
#include "region.h"
@@ -176,6 +177,9 @@ struct backend_operations {
// =========== Hooks ============
/// Let the backend hook into the event handling queue
// =========== Misc ============
/// Return the driver that is been used by the backend
enum driver (*detect_driver)(backend_t *backend_data);
};
typedef backend_t *(*backend_init_fn)(session_t *ps)attr_nonnull(1);