Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
timer-mbed.c
00001 /* Opus Una - A Small Cooperative Multitasking Kernel in C 00002 * 00003 * Copyright (C) 2011 by Ivo van Poorten <ivop@euronet.nl> 00004 * This file is licensed under the terms of the GNU Lesser 00005 * General Public License, version 3. 00006 */ 00007 00008 #include "timer.h" 00009 #include "kernel.h" 00010 #include "fastlib/systick.h" 00011 00012 extern "C" void SysTick_Handler(void) __irq { 00013 ou_ticks++; 00014 ou_update_tasks(); 00015 } 00016 00017 void ou_start_timer(void) { 00018 fl_systick_set_reload_value((96000000/100)-1); // 1/100th of a second (10ms) 00019 fl_systick_control(FL_ENABLE, FL_ENABLE, FL_ENABLE); // timer, irq, use cclk 00020 } 00021 00022 void ou_idle(void) { 00023 // save power/cpu time/et cetera... 00024 }
Generated on Wed Jul 13 2022 20:40:52 by
1.7.2