Can_open_masternode

Dependencies:   mbed

Committer:
sam_grove
Date:
Wed Sep 26 05:48:14 2012 +0000
Revision:
7:537bae5a6fc6
Parent:
0:9dd7c6129683
Pushing the project into the new repo

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sam_grove 0:9dd7c6129683 1 /*
sam_grove 0:9dd7c6129683 2 This file is part of CanFestival, a library implementing CanOpen Stack.
sam_grove 0:9dd7c6129683 3
sam_grove 0:9dd7c6129683 4 Copyright (C): Edouard TISSERANT and Francis DUPIN
sam_grove 0:9dd7c6129683 5 mbed port: sgrove
sam_grove 0:9dd7c6129683 6
sam_grove 0:9dd7c6129683 7 See COPYING file for copyrights details.
sam_grove 0:9dd7c6129683 8
sam_grove 0:9dd7c6129683 9 This library is free software; you can redistribute it and/or
sam_grove 0:9dd7c6129683 10 modify it under the terms of the GNU Lesser General Public
sam_grove 0:9dd7c6129683 11 License as published by the Free Software Foundation; either
sam_grove 0:9dd7c6129683 12 version 2.1 of the License, or (at your option) any later version.
sam_grove 0:9dd7c6129683 13
sam_grove 0:9dd7c6129683 14 This library is distributed in the hope that it will be useful,
sam_grove 0:9dd7c6129683 15 but WITHOUT ANY WARRANTY; without even the implied warranty of
sam_grove 0:9dd7c6129683 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
sam_grove 0:9dd7c6129683 17 Lesser General Public License for more details.
sam_grove 0:9dd7c6129683 18
sam_grove 0:9dd7c6129683 19 You should have received a copy of the GNU Lesser General Public
sam_grove 0:9dd7c6129683 20 License along with this library; if not, write to the Free Software
sam_grove 0:9dd7c6129683 21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
sam_grove 0:9dd7c6129683 22 */
sam_grove 0:9dd7c6129683 23
sam_grove 0:9dd7c6129683 24 #ifndef __TIMERSCFG_H__
sam_grove 0:9dd7c6129683 25 #define __TIMERSCFG_H__
sam_grove 0:9dd7c6129683 26
sam_grove 0:9dd7c6129683 27 // Whatever your microcontroller, the timer wont work if
sam_grove 0:9dd7c6129683 28 // TIMEVAL is not at least on 32 bits
sam_grove 0:9dd7c6129683 29 #define TIMEVAL UNS32
sam_grove 0:9dd7c6129683 30
sam_grove 0:9dd7c6129683 31 // The max count for the freerunning counter register
sam_grove 0:9dd7c6129683 32 #define TIMEVAL_MAX 0xFFFFFFFF
sam_grove 0:9dd7c6129683 33
sam_grove 0:9dd7c6129683 34 // The timer is incrementing every 4 us.
sam_grove 0:9dd7c6129683 35 //#define MS_TO_TIMEVAL(ms) (ms * 250)
sam_grove 0:9dd7c6129683 36 //#define US_TO_TIMEVAL(us) (us>>2)
sam_grove 0:9dd7c6129683 37
sam_grove 0:9dd7c6129683 38 // The timer is incrementing every 8 us.
sam_grove 0:9dd7c6129683 39 #define MS_TO_TIMEVAL(ms) ((ms) * 125)
sam_grove 0:9dd7c6129683 40 #define US_TO_TIMEVAL(us) ((us)>>3)
sam_grove 0:9dd7c6129683 41
sam_grove 0:9dd7c6129683 42 #endif