FreeCalypso > hg > fc-selenite
comparison src/cs/layer1/cfile/l1_small.c @ 149:bd1301884216
l1_small.c: BIG_SMALL_SLEEP support like in Magnetite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 06 Feb 2019 23:21:43 +0000 |
parents | c56f1d6202f5 |
children |
comparison
equal
deleted
inserted
replaced
148:c47e2dc10134 | 149:bd1301884216 |
---|---|
232 * _switch_PWR_MNGT and _mode_authorized must be .def and not .ref | 232 * _switch_PWR_MNGT and _mode_authorized must be .def and not .ref |
233 * as they are both defined in this file. | 233 * as they are both defined in this file. |
234 */ | 234 */ |
235 asm(" .def _switch_PWR_MNGT "); | 235 asm(" .def _switch_PWR_MNGT "); |
236 asm(" .def _mode_authorized "); | 236 asm(" .def _mode_authorized "); |
237 asm("SMALL_SLEEP .equ 01h "); | 237 asm("SMALL_SLEEP .equ 01h "); |
238 asm("ALL_SLEEP .equ 04h "); | 238 asm("ALL_SLEEP .equ 04h "); |
239 asm("PWR_MNGT .equ 01h "); | 239 asm("BIG_SMALL_SLEEP .equ 05h "); |
240 asm("PWR_MNGT .equ 01h "); | |
240 #if (OP_L1_STANDALONE == 0) | 241 #if (OP_L1_STANDALONE == 0) |
241 // This code log the number of time the Small sleep | 242 // This code log the number of time the Small sleep |
242 // function has been invoked | 243 // function has been invoked |
243 #if (TI_PROFILER == 1) | 244 #if (TI_PROFILER == 1) |
244 asm(" ldr r0, profiler_counter "); // pick counter | 245 asm(" ldr r0, profiler_counter "); // pick counter |
268 asm(" ldr r0,[r0] "); // take the current value of the register | 269 asm(" ldr r0,[r0] "); // take the current value of the register |
269 asm(" ldrb r1,[r0] "); // take the current value of the register | 270 asm(" ldrb r1,[r0] "); // take the current value of the register |
270 asm(" cmp r1,#SMALL_SLEEP "); // take the current value of the register | 271 asm(" cmp r1,#SMALL_SLEEP "); // take the current value of the register |
271 asm(" beq Small_sleep_ok "); | 272 asm(" beq Small_sleep_ok "); |
272 asm(" cmp r1,#ALL_SLEEP "); // take the current value of the register | 273 asm(" cmp r1,#ALL_SLEEP "); // take the current value of the register |
274 asm(" beq Small_sleep_ok "); | |
275 asm(" cmp r1,#BIG_SMALL_SLEEP "); | |
273 asm(" bne End_small_sleep "); | 276 asm(" bne End_small_sleep "); |
274 | 277 |
275 asm("Small_sleep_ok "); | 278 asm("Small_sleep_ok "); |
276 | 279 |
277 // ***************************************************** | 280 // ***************************************************** |