mirror of
https://github.com/fail0verflow/mini.git
synced 2024-11-28 06:04:19 +01:00
Decrease timer frequency (to flush crap).
This commit is contained in:
parent
e5aec6fcc9
commit
39710e1b0d
16
gecko.c
16
gecko.c
@ -251,22 +251,15 @@ void gecko_timer_initialize(void)
|
|||||||
if (!gecko_isalive())
|
if (!gecko_isalive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
irq_set_alarm(100, 1);
|
irq_set_alarm(20, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void gecko_timer(void) {
|
void gecko_timer(void) {
|
||||||
u8 b;
|
u8 b;
|
||||||
|
|
||||||
if (_gecko_cmd_start_time && read32(HW_TIMER) >
|
if (_gecko_cmd_start_time && read32(HW_TIMER) >
|
||||||
(_gecko_cmd_start_time + IRQ_ALARM_MS2REG(5000))) {
|
(_gecko_cmd_start_time + IRQ_ALARM_MS2REG(5000)))
|
||||||
// time's over, bitch
|
goto cleanup;
|
||||||
irq_set_alarm(100, 0);
|
|
||||||
_gecko_cmd = 0;
|
|
||||||
_gecko_cmd_start_time = 0;
|
|
||||||
_gecko_state = GECKO_STATE_NONE;
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (_gecko_state) {
|
switch (_gecko_state) {
|
||||||
case GECKO_STATE_NONE:
|
case GECKO_STATE_NONE:
|
||||||
@ -353,7 +346,8 @@ void gecko_timer(void) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
irq_set_alarm(100, 0);
|
cleanup:
|
||||||
|
irq_set_alarm(20, 0);
|
||||||
|
|
||||||
_gecko_cmd = 0;
|
_gecko_cmd = 0;
|
||||||
_gecko_cmd_start_time = 0;
|
_gecko_cmd_start_time = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user