]> git.sesse.net Git - pistorm/blob - platforms/dummy/dummy-platform.c
Some more failed PiSCSI 1.3 autoboot ventures
[pistorm] / platforms / dummy / dummy-platform.c
1 // SPDX-License-Identifier: MIT
2
3 #include <stdlib.h>
4 #include <string.h>
5
6 #include "platforms/platforms.h"
7
8 int handle_register_read_dummy(unsigned int addr, unsigned char type, unsigned int *val);
9 int handle_register_write_dummy(unsigned int addr, unsigned int value, unsigned char type);
10
11 int setup_platform_dummy(struct emulator_config *cfg) {
12     if (cfg) {}
13     return 0;
14 }
15
16 void create_platform_dummy(struct platform_config *cfg, char *subsys) {
17     cfg->custom_read = NULL;
18     cfg->custom_write = NULL;
19     cfg->register_read = handle_register_read_dummy;
20     cfg->register_write = handle_register_write_dummy;
21     cfg->platform_initial_setup = setup_platform_dummy;
22
23     if (subsys) {
24         cfg->subsys = malloc(strlen(subsys) + 1);
25         strcpy(cfg->subsys, subsys);
26     }
27 }