1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2009 by Jens Arnold
12 * Rockbox simulator specific tasks
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20 * KIND, either express or implied.
22 ****************************************************************************/
26 #include "screendump.h"
29 static void sim_thread(void);
30 static long sim_thread_stack
[DEFAULT_STACK_SIZE
/sizeof(long)];
31 /* stack isn't actually used in the sim */
32 static const char sim_thread_name
[] = "sim";
33 static struct event_queue sim_queue
;
35 /* possible events for the sim thread */
42 struct queue_event ev
;
46 queue_wait(&sim_queue
, &ev
);
51 #ifdef HAVE_REMOTE_LCD
59 void sim_tasks_init(void)
61 queue_init(&sim_queue
, false);
63 create_thread(sim_thread
, sim_thread_stack
, sizeof(sim_thread_stack
), 0,
64 sim_thread_name
IF_PRIO(,PRIORITY_BACKGROUND
) IF_COP(,CPU
));
67 void sim_trigger_screendump(void)
69 queue_post(&sim_queue
, SIM_SCREENDUMP
, 0);