Subversion Repositories freemyipod

Rev

Rev 427 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 427 Rev 429
Line 30... Line 30...
30
#include "contextswitch.h"
30
#include "contextswitch.h"
31
 
31
 
32
 
32
 
33
static struct wakeup clickwheel_wakeup IBSS_ATTR;
33
static struct wakeup clickwheel_wakeup IBSS_ATTR;
34
static volatile uint32_t clickwheel_packet IBSS_ATTR;
34
static volatile uint32_t clickwheel_packet IBSS_ATTR;
-
 
35
static struct scheduler_thread clickwheel_thread_handle;
35
static uint32_t clickwheel_stack[0x100];
36
static uint32_t clickwheel_stack[0x100] STACK_ATTR;
36
static bool oldtouched IBSS_ATTR;
37
static bool oldtouched IBSS_ATTR;
37
static int oldpos IBSS_ATTR;
38
static int oldpos IBSS_ATTR;
38
static int oldbuttons IBSS_ATTR;
39
static int oldbuttons IBSS_ATTR;
39
static uint32_t lastpacket IBSS_ATTR;
40
static uint32_t lastpacket IBSS_ATTR;
40
static int packets IBSS_ATTR;
41
static int packets IBSS_ATTR;
Line 148... Line 149...
148
        while (WHEEL0C & 4) yield();
149
        while (WHEEL0C & 4) yield();
149
        WHEEL04 = 1;
150
        WHEEL04 = 1;
150
        sleep(20000);
151
        sleep(20000);
151
    }
152
    }
152
    while (WHEEL0C & 4);
153
    while (WHEEL0C & 4);
153
    thread_create("Clickwheel dispatcher", clickwheel_thread, clickwheel_stack,
154
    thread_create(&clickwheel_thread_handle, "Clickwheel dispatcher",
-
 
155
                  clickwheel_thread, clickwheel_stack,
154
                  sizeof(clickwheel_stack), OS_THREAD, 200, true);
156
                  sizeof(clickwheel_stack), OS_THREAD, 200, true);
155
}
157
}
156
 
158
 
157
void INT_WHEEL(void) ICODE_ATTR;
159
void INT_WHEEL(void) ICODE_ATTR;
158
void INT_WHEEL()
160
void INT_WHEEL()