Can_open_masternode

Dependencies:   mbed

Committer:
sam_grove
Date:
Mon May 30 07:36:47 2011 +0000
Revision:
0:9dd7c6129683
Initial public release of master node example

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
sam_grove 0:9dd7c6129683 6 See COPYING file for copyrights details.
sam_grove 0:9dd7c6129683 7
sam_grove 0:9dd7c6129683 8 This library is free software; you can redistribute it and/or
sam_grove 0:9dd7c6129683 9 modify it under the terms of the GNU Lesser General Public
sam_grove 0:9dd7c6129683 10 License as published by the Free Software Foundation; either
sam_grove 0:9dd7c6129683 11 version 2.1 of the License, or (at your option) any later version.
sam_grove 0:9dd7c6129683 12
sam_grove 0:9dd7c6129683 13 This library is distributed in the hope that it will be useful,
sam_grove 0:9dd7c6129683 14 but WITHOUT ANY WARRANTY; without even the implied warranty of
sam_grove 0:9dd7c6129683 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
sam_grove 0:9dd7c6129683 16 Lesser General Public License for more details.
sam_grove 0:9dd7c6129683 17
sam_grove 0:9dd7c6129683 18 You should have received a copy of the GNU Lesser General Public
sam_grove 0:9dd7c6129683 19 License along with this library; if not, write to the Free Software
sam_grove 0:9dd7c6129683 20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
sam_grove 0:9dd7c6129683 21 */
sam_grove 0:9dd7c6129683 22
sam_grove 0:9dd7c6129683 23 /** @defgroup timer Timer Management
sam_grove 0:9dd7c6129683 24 * @ingroup userapi
sam_grove 0:9dd7c6129683 25 */
sam_grove 0:9dd7c6129683 26
sam_grove 0:9dd7c6129683 27 #ifndef __timer_driver_h__
sam_grove 0:9dd7c6129683 28 #define __timer_driver_h__
sam_grove 0:9dd7c6129683 29
sam_grove 0:9dd7c6129683 30 #include "timerscfg.h"
sam_grove 0:9dd7c6129683 31 #include "canopen_timer.h"
sam_grove 0:9dd7c6129683 32
sam_grove 0:9dd7c6129683 33 // For use from CAN driver
sam_grove 0:9dd7c6129683 34
sam_grove 0:9dd7c6129683 35
sam_grove 0:9dd7c6129683 36 /**
sam_grove 0:9dd7c6129683 37 * @ingroup timer
sam_grove 0:9dd7c6129683 38 * @brief Acquire mutex
sam_grove 0:9dd7c6129683 39 */
sam_grove 0:9dd7c6129683 40 void EnterMutex(void);
sam_grove 0:9dd7c6129683 41
sam_grove 0:9dd7c6129683 42 /**
sam_grove 0:9dd7c6129683 43 * @ingroup timer
sam_grove 0:9dd7c6129683 44 * @brief Release mutex
sam_grove 0:9dd7c6129683 45 */
sam_grove 0:9dd7c6129683 46 void LeaveMutex(void);
sam_grove 0:9dd7c6129683 47
sam_grove 0:9dd7c6129683 48 void WaitReceiveTaskEnd(TASK_HANDLE*);
sam_grove 0:9dd7c6129683 49
sam_grove 0:9dd7c6129683 50 /**
sam_grove 0:9dd7c6129683 51 * @ingroup timer
sam_grove 0:9dd7c6129683 52 * @brief Initialize Timer
sam_grove 0:9dd7c6129683 53 */
sam_grove 0:9dd7c6129683 54 void TimerInit(void);
sam_grove 0:9dd7c6129683 55
sam_grove 0:9dd7c6129683 56 /**
sam_grove 0:9dd7c6129683 57 * @ingroup timer
sam_grove 0:9dd7c6129683 58 * @brief Cleanup Timer
sam_grove 0:9dd7c6129683 59 */
sam_grove 0:9dd7c6129683 60 void TimerCleanup(void);
sam_grove 0:9dd7c6129683 61
sam_grove 0:9dd7c6129683 62 /**
sam_grove 0:9dd7c6129683 63 * @ingroup timer
sam_grove 0:9dd7c6129683 64 * @brief Start the timer task
sam_grove 0:9dd7c6129683 65 * @param Callback A callback function
sam_grove 0:9dd7c6129683 66 */
sam_grove 0:9dd7c6129683 67 void StartTimerLoop(TimerCallback_t Callback);
sam_grove 0:9dd7c6129683 68
sam_grove 0:9dd7c6129683 69 /**
sam_grove 0:9dd7c6129683 70 * @ingroup timer
sam_grove 0:9dd7c6129683 71 * @brief Stop the timer task
sam_grove 0:9dd7c6129683 72 * @param Callback A callback function
sam_grove 0:9dd7c6129683 73 */
sam_grove 0:9dd7c6129683 74 void StopTimerLoop(TimerCallback_t Callback);
sam_grove 0:9dd7c6129683 75
sam_grove 0:9dd7c6129683 76 /**
sam_grove 0:9dd7c6129683 77 * @brief Stop the timer task
sam_grove 0:9dd7c6129683 78 * @param port CanFestival file descriptor
sam_grove 0:9dd7c6129683 79 * @param *handle handle of receive loop thread
sam_grove 0:9dd7c6129683 80 * @param *ReceiveLoopPtr Pointer on the receive loop function
sam_grove 0:9dd7c6129683 81 */
sam_grove 0:9dd7c6129683 82 void CreateReceiveTask(CAN_PORT port, TASK_HANDLE* handle, void* ReceiveLoopPtr);
sam_grove 0:9dd7c6129683 83
sam_grove 0:9dd7c6129683 84 #endif