Sam Grove / Mbed 2 deprecated canopen_masternode

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers canopen_can.h Source File

canopen_can.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 #ifndef __can_h__
00024 #define __can_h__
00025 
00026 #include "applicfg.h"
00027 
00028 /*
00029 union SHORT_CAN {
00030   struct { UNS8 b0,b1; } b;
00031   UNS32 w;
00032 };
00033 */
00034 /*
00035 typedef struct {
00036   UNS32 w;
00037 } SHORT_CAN;
00038 */
00039 
00040 /** 
00041  * @brief The CAN message structure 
00042  * @ingroup can
00043  */
00044 typedef struct {
00045   UNS16 cob_id;    /**< message's ID */
00046   UNS8 rtr;        /**< remote transmission request. (0 if not rtr message, 1 if rtr message) */
00047   UNS8 len;        /**< message's length (0 to 8) */
00048   UNS8 data[8]; /**< message's datas */
00049 } Message;
00050 
00051 #define Message_Initializer {0,0,0,{0,0,0,0,0,0,0,0}}
00052 
00053 typedef UNS8 (*canSend_t)(Message *);
00054 
00055 #endif /* __can_h__ */