⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 can.h

📁 用 Hitex 工具软件开发 stm32 的例子
💻 H
字号:
/********************************************************************
 * Project:    STM32-Stick
 * File:       can.h
 *
 * System:     Cortex M3
 * Compiler:   TASKING
 *
 * Date:       2007-04-9
 * Author:     Application@Hitex.de
 *
 * Rights:     Hitex Development Tools GmbH
 *             Greschbachstr. 12
 *             D-76229 Karlsruhe
 ********************************************************************
 * Description:
 *
 * This file is part of the STM32-Stick Example chain
 * The code is based on usage of the STmicro library functions
 * This is a small implementation of different features
 * The application runs in Thumb mode with high optimization level.
 *
 ********************************************************************
 * History:
 *
 *    Revision 1.0    2006/12/20      Gn  Initial revision
 *    Revision 1.1    2007/04/9       HS  Updated for STM32-Stick
 *
 ********************************************************************
 * This is a preliminary version.
 *
 * WARRANTY:  HITEX warrants that the media on which the SOFTWARE is
 * furnished is free from defects in materials and workmanship under
 * normal use and service for a period of ninety (90) days. HITEX entire
 * liability and your exclusive remedy shall be the replacement of the
 * SOFTWARE if the media is defective. This Warranty is void if failure
 * of the media resulted from unauthorized modification, accident, abuse,
 * or misapplication.
 *
 * DISCLAIMER:  OTHER THAN THE ABOVE WARRANTY, THE SOFTWARE IS FURNISHED
 * "AS IS" WITHOUT WARRANTY OF ANY KIND. HITEX DISCLAIMS ALL OTHER WARRANTIES,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 *
 * NEITHER HITEX NOR ITS AFFILIATES SHALL BE LIABLE FOR ANY DAMAGES ARISING
 * OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, INCLUDING DAMAGES FOR
 * LOSS OF PROFITS, BUSINESS INTERRUPTION, OR ANY SPECIAL, INCIDENTAL, INDIRECT
 * OR CONSEQUENTIAL DAMAGES EVEN IF HITEX HAS BEEN ADVISED OF THE POSSIBILITY
 * OF SUCH DAMAGES.
 ********************************************************************/
#ifndef __CAN_H__
#define __CAN_H__

#include "system.h"
#include "can_protocol.h"
#include "can.h"

void CAN_Start(void);
void CAN_Stop(void);
void CAN_ProtocolInit(void);
void RecvMsg_Status(void);
void RecvMsg_CANSpy(u8 *data);
void RecvMsg_CANGenerator(u8 *data);
//extern void CAN_ProcessMessage (u8 command, u8 *data, u8 len);
extern void CAN_isr(void);


// UCAN info
typedef struct
{
   u8 ucan_id;
   u8 ucan_checksum;
   u16 ucan_data_length;
   u8 ucan_can_lenght;
   u8 ucan_spy_cmd;
   u8 canspy_record;
   u8 can_generator;
   u8 remoterequest;
   CanTxMsg can_msg;
   u16 time;
   u16 timestamp;
} ucan_msg_t;

extern ucan_msg_t ucan_msg;
extern u8 CAN_Mode;
extern TaskInfo CANState;
extern volatile u16 cangenerate_countdown;
extern volatile u16 cangenerate_repeat;

#endif   /* __CAN_H__ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -