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.
timerscfg.h
00001 /* 00002 This file is part of CanFestival, a library implementing CanOpen Stack. 00003 00004 Copyright (C): Edouard TISSERANT and Francis DUPIN 00005 mbed port: sgrove 00006 00007 See COPYING file for copyrights details. 00008 00009 This library is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU Lesser General Public 00011 License as published by the Free Software Foundation; either 00012 version 2.1 of the License, or (at your option) any later version. 00013 00014 This library is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 Lesser General Public License for more details. 00018 00019 You should have received a copy of the GNU Lesser General Public 00020 License along with this library; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 */ 00023 00024 #ifndef __TIMERSCFG_H__ 00025 #define __TIMERSCFG_H__ 00026 00027 // Whatever your microcontroller, the timer wont work if 00028 // TIMEVAL is not at least on 32 bits 00029 #define TIMEVAL UNS32 00030 00031 // The max count for the freerunning counter register 00032 #define TIMEVAL_MAX 0xFFFFFFFF 00033 00034 // The timer is incrementing every 4 us. 00035 //#define MS_TO_TIMEVAL(ms) (ms * 250) 00036 //#define US_TO_TIMEVAL(us) (us>>2) 00037 00038 // The timer is incrementing every 8 us. 00039 #define MS_TO_TIMEVAL(ms) ((ms) * 125) 00040 #define US_TO_TIMEVAL(us) ((us)>>3) 00041 00042 #endif
Generated on Tue Jul 12 2022 17:11:51 by
1.7.2