📄 can_protocol.h
字号:
/********************************************************************
* Project: STM32-Stick
* File: can_protocol.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_PROTOCOL_H_
#define _CAN_PROTOCOL_H_
#define CAN_ID_STATUS 0
#define CAN_ID_CANSPY 1
#define CAN_ID_CANGENERATOR 2
#define CAN_STATUS_FEATURE_SPY 0x0001
#define CAN_STATUS_FEATURE_GENERATOR 0x0002
#define CAN_STATUS_APPLICATION "CAN-Monitor"
#define CAN_STATUS_CONTROLLER "STM32"
#define CAN_CANSPY_FEATURE_RECORD 0x01
#define CAN_CANSPY_FEATURE_LOOPBACK 0x02
#define CAN_CANSPY_INFOMASK_ID 0x1FFFFFFF
#define CAN_CANSPY_INFOMASK_EXTENDED 0x20000000
#define CAN_CANSPY_INFOMASK_REMOTEREQUEST 0x40000000
#define CAN_CANSPY_INFOMASK_ERROR 0x80000000
#define CAN_CANGENERATE_INFOMASK_ID 0x1FFFFFFF
#define CAN_CANGENERATE_INFOMASK_EXTENDED 0x20000000
#define CAN_CANGENERATE_INFOMASK_REMOTEREQUEST 0x40000000
#define CAN_CANGENERATE_INFOMASK_SPARE 0x80000000
#define CAN_CANSPY_ERROR_STUFF 0x01
#define CAN_CANSPY_ERROR_FORM 0x02
#define CAN_CANSPY_ERROR_ACK 0x03
#define CAN_CANSPY_ERROR_BIT1 0x04
#define CAN_CANSPY_ERROR_BIT0 0x05
#define CAN_CANSPY_ERROR_CRC 0x06
#define CAN_CANSPY_ERROR_DROPPEDFRAME 0x11
#define CAN_CANSPY_ERROR_SPYBUFOVERRUN 0x12
/* CAN modes */
#define Prot_CAN_Mode_Normal 0x01 /* Set the CAN module to normal mode */
#define Prot_CAN_Mode_Silent 0x02 /* Set the CAN module to silent mode */
#define Prot_CAN_Mode_Loopback 0x03 /* Set the CAN module to Loopback mode */
#define Prot_CAN_Mode_LoopSilent 0x04 /* Set the CAN module to Loopback and Silent mode */
#endif // ifndef _CAN_PROTOCOL_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -