Sam Grove / Mbed 2 deprecated canopen_masternode

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers timers_driver.h Source File

timers_driver.h

00001 /*
00002 This file is part of CanFestival, a library implementing CanOpen Stack. 
00003 
00004 Copyright (C): Edouard TISSERANT and Francis DUPIN
00005 
00006 See COPYING file for copyrights details.
00007 
00008 This library is free software; you can redistribute it and/or
00009 modify it under the terms of the GNU Lesser General Public
00010 License as published by the Free Software Foundation; either
00011 version 2.1 of the License, or (at your option) any later version.
00012 
00013 This library is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016 Lesser General Public License for more details.
00017 
00018 You should have received a copy of the GNU Lesser General Public
00019 License along with this library; if not, write to the Free Software
00020 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021 */
00022 
00023 /** @defgroup timer Timer Management
00024  *  @ingroup userapi
00025  */
00026 
00027 #ifndef __timer_driver_h__
00028 #define __timer_driver_h__
00029 
00030 #include "timerscfg.h"
00031 #include "canopen_timer.h"
00032 
00033 // For use from CAN driver
00034 
00035 
00036 /**
00037  * @ingroup timer
00038  * @brief Acquire mutex
00039  */
00040 void EnterMutex(void);
00041 
00042 /**
00043  * @ingroup timer
00044  * @brief Release mutex
00045  */
00046 void LeaveMutex(void);
00047 
00048 void WaitReceiveTaskEnd(TASK_HANDLE*);
00049 
00050 /**
00051  * @ingroup timer
00052  * @brief Initialize Timer
00053  */
00054 void TimerInit(void);
00055 
00056 /**
00057  * @ingroup timer
00058  * @brief Cleanup Timer  
00059  */
00060 void TimerCleanup(void);
00061 
00062 /**
00063  * @ingroup timer
00064  * @brief Start the timer task
00065  * @param Callback A callback function
00066  */
00067 void StartTimerLoop(TimerCallback_t Callback);
00068 
00069 /**
00070  * @ingroup timer
00071  * @brief Stop the timer task
00072  * @param Callback A callback function
00073  */
00074 void StopTimerLoop(TimerCallback_t Callback);
00075 
00076 /**
00077  * @brief Stop the timer task
00078  * @param port CanFestival file descriptor
00079  * @param *handle handle of receive loop thread
00080  * @param *ReceiveLoopPtr Pointer on the receive loop function
00081  */
00082 void CreateReceiveTask(CAN_PORT port, TASK_HANDLE* handle, void* ReceiveLoopPtr);
00083 
00084 #endif