Go to the documentation of this file.
49 #ifdef CONF_AUTOSHUTOFF
89 #ifndef DOXYGEN_SHOULD_SKIP_THIS
93 .global _clock_handler\n\
95 mov.w #0x5a07,r6 ; reset wd timer to 6\n\
98 mov.w @_sys_time+2,r6 ; lower 8 bits\n\
99 add.b #0x1,r6l ; inc lower 4 bits\n\
100 addx #0x0,r6h ; add carry to top 4 bits\n\
101 mov.w r6,@_sys_time+2\n\
102 bcc sys_nohigh ; if carry, inc upper 8 bits\n\
103 mov.w @_sys_time,r6 ; \n\
104 add.b #0x1,r6l ; inc lower 4 bits\n\
105 addx #0x0,r6h ; add carry to top 4 bits\n\
106 mov.w r6,@_sys_time\n\
110 #endif // DOXYGEN_SHOULD_SKIP_THIS
123 #ifndef DOXYGEN_SHOULD_SKIP_THIS
127 .global _subsystem_handler\n\
128 .global _task_switch_handler\n\
129 .global _systime_tm_return\n\
130 _subsystem_handler:\n\
133 push r0 ; both motors & task\n\
134 ; switcher need this reg.\n\
139 jsr _dsound_handler ; call sound handler\n\
145 mov.w @_lnp_timeout_counter,r6 ; check LNP timeout counter\n\
147 mov.w r6,r6 ; subs doesn't change flags!\n\
150 jsr _lnp_integrity_reset\n\
151 mov.w @_lnp_timeout,r6 ; reset timeout\n\
154 mov.w r6,@_lnp_timeout_counter\n\
167 mov.w @_battery_refresh_counter,r6\n\
169 bne batt_norefresh\n\
171 jsr _battery_refresh\n\
172 mov.w @_battery_refresh_period,r6\n\
175 mov.w r6,@_battery_refresh_counter\n\
182 mov.w @_auto_shutoff_counter,r6\n\
184 bne auto_notshutoff\n\
186 jsr _autoshutoff_check\n\
187 mov.w @_auto_shutoff_period,r6\n\
190 mov.w r6,@_auto_shutoff_counter\n\
196 mov.b @_vis_refresh_counter,r6l\n\
201 mov.b @_vis_refresh_period,r6l\n\
204 mov.b r6l,@_vis_refresh_counter\n\
210 mov.b @_lcd_refresh_counter,r6l\n\
214 jsr _lcd_refresh_next_byte\n\
215 mov.b @_lcd_refresh_period,r6l\n\
218 mov.b r6l,@_lcd_refresh_counter\n\
222 bclr #2,@0x91:8 ; reset compare B IRQ flag\n\
226 pop r0 ; if fallthrough, pop r0\n\
227 _task_switch_handler:\n\
230 mov.b @_tm_current_slice,r6l\n\
232 bne sys_noswitch ; timeslice elapsed?\n\
234 mov.w @_kernel_critsec_count,r6 ; check critical section\n\
235 beq sys_switch ; ok to switch\n\
236 mov.b #1,r6l ; wait another tick\n\
237 jmp sys_noswitch ; don't switch\n\
240 mov.w @_tm_switcher_vector,r6\n\
241 jsr @r6 ; call task switcher\n\
243 _systime_tm_return:\n\
244 mov.b @_tm_timeslice,r6l ; new timeslice\n\
247 mov.b r6l,@_tm_current_slice\n\
253 jsr _dm_handler ; call motor driver\n\
259 bclr #3,@0x91:8 ; reset compare A IRQ flag\n\
263 #endif // DOXYGEN_SHOULD_SKIP_THIS
355 .global _get_system_up_time\n\
356 _get_system_up_time:\n\
359 mov.w @_sys_time+2, r1\n\
360 mov.w @_sys_time, r0\n\
361 mov.w @_sys_time+2, r2\n\
Generated on Sat Mar 15 2014 11:28:21 for brickOS Kernel Developer by
1.8.1.2