MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / plug_devices

Function plug_devices

core/asic.c:47–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47static void plug_devices(void) {
48 /* Port ranges 0x0 -> 0xF */
49 port_map[0x0] = init_control();
50 port_map[0x1] = init_flash();
51 port_map[0x2] = init_sha256();
52 port_map[0x3] = init_usb();
53 port_map[0x4] = init_lcd();
54 port_map[0x5] = init_intrpt();
55 port_map[0x6] = init_watchdog();
56 port_map[0x7] = init_gpt();
57 port_map[0x8] = init_rtc();
58 port_map[0x9] = init_protected();
59 port_map[0xA] = init_keypad();
60 port_map[0xB] = init_backlight();
61 port_map[0xC] = init_cxxx();
62 port_map[0xD] = init_spi();
63 port_map[0xE] = init_uart();
64 port_map[0xF] = init_fxxx();
65 init_panel();
66
67 reset_proc_count = 0;
68
69 /* Populate reset callbacks */
70 add_reset_proc(sched_reset);
71 add_reset_proc(flash_reset);
72 add_reset_proc(mem_reset);
73 add_reset_proc(lcd_reset);
74 add_reset_proc(keypad_reset);
75 add_reset_proc(gpt_reset);
76 add_reset_proc(rtc_reset);
77 add_reset_proc(watchdog_reset);
78 add_reset_proc(cpu_reset);
79 add_reset_proc(intrpt_reset);
80 add_reset_proc(sha256_reset);
81 add_reset_proc(usb_reset);
82 add_reset_proc(control_reset);
83 add_reset_proc(backlight_reset);
84 add_reset_proc(panel_reset);
85 add_reset_proc(spi_reset);
86 add_reset_proc(uart_reset);
87
88 gui_console_printf("[CEmu] Initialized Advanced Peripheral Bus...\n");
89}
90
91static asic_rev_t report_reset(asic_rev_t loaded_rev, bool* python) {
92 /* Parse boot code routines to determine version. */

Callers 1

asic_initFunction · 0.85

Calls 15

init_controlFunction · 0.85
init_flashFunction · 0.85
init_sha256Function · 0.85
init_usbFunction · 0.85
init_lcdFunction · 0.85
init_intrptFunction · 0.85
init_watchdogFunction · 0.85
init_gptFunction · 0.85
init_rtcFunction · 0.85
init_protectedFunction · 0.85
init_keypadFunction · 0.85
init_backlightFunction · 0.85

Tested by

no test coverage detected