Line 293... |
Line 293... |
register_memoryarea(config.fb.baseaddr, FB_PAL + 256*4, 4, 0, fb_read32, fb_write32);
|
register_memoryarea(config.fb.baseaddr, FB_PAL + 256*4, 4, 0, fb_read32, fb_write32);
|
SCHED_ADD(fb_job, 0, runtime.sim.cycles + config.fb.refresh_rate);
|
SCHED_ADD(fb_job, 0, runtime.sim.cycles + config.fb.refresh_rate);
|
}
|
}
|
}
|
}
|
|
|
No newline at end of file
|
No newline at end of file
|
|
/*-----------------------------------------------------[ FB configuration ]---*/
|
|
void fb_enabled(union param_val val, void *dat)
|
|
{
|
|
config.fb.enabled = val.int_val;
|
|
}
|
|
|
|
void fb_baseaddr(union param_val val, void *dat)
|
|
{
|
|
config.fb.baseaddr = val.addr_val;
|
|
}
|
|
|
|
void fb_refresh_rate(union param_val val, void *dat)
|
|
{
|
|
config.fb.refresh_rate = val.int_val;
|
|
}
|
|
|
|
void fb_filename(union param_val val, void *dat)
|
|
{
|
|
strcpy(config.fb.filename, val.str_val);
|
|
}
|
|
|
|
void reg_fb_sec(void)
|
|
{
|
|
struct config_section *sec = reg_config_sec("fb", NULL, NULL);
|
|
|
|
reg_config_param(sec, "enabled", paramt_int, fb_enabled);
|
|
reg_config_param(sec, "baseaddr", paramt_addr, fb_baseaddr);
|
|
reg_config_param(sec, "refresh_rate", paramt_int, fb_refresh_rate);
|
|
reg_config_param(sec, "filename", paramt_str, fb_filename);
|
|
}
|
|
|
No newline at end of file
|
No newline at end of file
|