edouard@629: /* edouard@629: This file is part of CanFestival, a library implementing CanOpen Stack. edouard@629: edouard@629: Copyright (C): Edouard TISSERANT and Francis DUPIN edouard@629: edouard@629: See COPYING file for copyrights details. edouard@629: edouard@629: This library is free software; you can redistribute it and/or edouard@629: modify it under the terms of the GNU Lesser General Public edouard@629: License as published by the Free Software Foundation; either edouard@629: version 2.1 of the License, or (at your option) any later version. edouard@629: edouard@629: This library is distributed in the hope that it will be useful, edouard@629: but WITHOUT ANY WARRANTY; without even the implied warranty of edouard@629: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU edouard@629: Lesser General Public License for more details. edouard@629: edouard@629: You should have received a copy of the GNU Lesser General Public edouard@629: License along with this library; if not, write to the Free Software edouard@629: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA edouard@629: */ edouard@629: edouard@629: #ifndef __TIMERSCFG_H__ edouard@629: #define __TIMERSCFG_H__ edouard@629: edouard@629: #include edouard@629: #include edouard@629: #include edouard@629: #include edouard@629: #include edouard@629: #include edouard@629: edouard@629: // Time unit : ns edouard@629: // Time resolution : 64bit (~584 years) edouard@629: #define TIMEVAL RTIME edouard@629: #define TIMEVAL_MAX ~(RTIME)0 edouard@629: #define MS_TO_TIMEVAL(ms) rt_timer_ns2ticks((RTIME)ms*1000000) edouard@629: #define US_TO_TIMEVAL(us) rt_timer_ns2ticks((RTIME)us*1000) edouard@629: edouard@629: #define TASK_HANDLE RT_TASK edouard@629: edouard@629: #endif