📄 lut.h
字号:
// File :LTU.h
// Describe :LPC2119/2129/2194/2292/2294 CAN block driver.
// Author :exdata
// Ver :1.0
// Update :2004.06.27
// Copyright:zlgmcu
// ============================== WARNING ==============================
//
// DO NOT EDIT THIS FILE!!!
//
// =====================================================================
#ifndef __LUT_H__
#define __LUT_H__
#include "CanPreDef.h"
#if !defined(__cplusplus)
#error C++ compiler required.
#endif
// GLOBAL ACCEPTANCE FILTER register.
#define REGAFMR (*((volatile UINT32 *) 0xE003C000)) /* lpc2119\lpc2129\lpc2292\lpc2294 only */
#define REGSFF_sa (*((volatile UINT32 *) 0xE003C004)) /* lpc2119\lpc2129\lpc2292\lpc2294 only */
#define REGSFF_GRP_sa (*((volatile UINT32 *) 0xE003C008)) /* lpc2119\lpc2129\lpc2292\lpc2294 only */
#define REGEFF_sa (*((volatile UINT32 *) 0xE003C00C)) /* lpc2119\lpc2129\lpc2292\lpc2294 only */
#define REGEFF_GRP_sa (*((volatile UINT32 *) 0xE003C010)) /* lpc2119\lpc2129\lpc2292\lpc2294 only */
#define REGENDofTable (*((volatile UINT32 *) 0xE003C014)) /* lpc2119\lpc2129\lpc2292\lpc2294 only */
#define REGLUTerrAd (*((volatile UINT32 *) 0xE003C018)) /* lpc2119\lpc2129\lpc2292\lpc2294 only */
#define REGLUTerr (*((volatile UINT32 *) 0xE003C01C)) /* lpc2119\lpc2129\lpc2292\lpc2294 only */
#define REGAFRAM (*((volatile UINT32 *) 0xE0038000)) /* lpc2119\lpc2129\lpc2292\lpc2294 only */
////////////////////////////////////////////////////////////////////////////////////////////////////////
typedef struct tag_AF_SFF_CELL
{
UINT32 UpId :11; // 11bit ID1
UINT32 UpRsv :1; //
UINT32 UpDis :1; // 禁能位
UINT32 UpCh :3; // CAN控制器号
UINT32 LoId :11; // 11bit ID0
UINT32 LoRsv :1; //
UINT32 LoDis :1; // 禁能位
UINT32 LoCh :3; // CAN控制器号
}_AF_SFF_CELL,*P_AF_SFF_CELL;
typedef struct tag_AF_EFF_CELL
{
UINT32 Id :29; // 29bit EFF ID
UINT32 Ch :3; // CAN控制器号
}_AF_EFF_CELL,*P_AF_EFF_CELL;
typedef struct tag_AF_AUTOSTORE_MSG
{
struct tag_Head
{
UINT32 ID :11;
UINT32 RSV5 :5;
UINT32 DLC :4;
UINT32 RSV12:4;
UINT32 SEM :2;
UINT32 RSV41:4;
UINT32 RTR :1;
UINT32 FF :1;
}Head;
_CANDA da;
_CANDB db;
}_AF_AUTOSTORE_MSG,*P_AF_AUTOSTORE_MSG;
enum LUT_BUILD_ERR
{
LUT_SETTING_OK = 0,
TOTAL_SIZE_TOO_LARGE = 1,
FCAN_SIZE_TOO_LARGE = 2,
EFF_GRP_SIZE_INVALID = 3,
FCAN_STORE_SIZE_INVALID = 4,
TABLE_CELL_TOO_LARGE = 5,
CELL_NUM_INVALID = 6,
CELL_CONTENT_INVALID = 7
};
////////////////////////////////////////////////////////////////////////////////////
class CLUT
{
#if 0
protected:
CLUT(){} // could NOT construct explicitly!!!
#endif
public:
static UINT32 AFBuildLUT( UINT32 FCAN_nCell,
UINT32 SFF_INDV_nCell,
UINT32 SFF_GRP_nCell,
UINT32 EFF_INDV_nCell,
UINT32 EFF_GRP_nCell);
static UINT32 AFInitFCANTab(_AF_SFF_CELL *pTab,UINT32 nCell);
static UINT32 AFInitSFFIndvTab(_AF_SFF_CELL *pTab,UINT32 nCell);
static UINT32 AFInitSFFGrpTab(_AF_SFF_CELL *pTab,UINT32 nCell);
static UINT32 AFInitEFFIndvTab(_AF_EFF_CELL *pTab,UINT32 nCell);
static UINT32 AFInitEFFGrpTab(_AF_EFF_CELL *pTab,UINT32 nCell);
static void AFSetMode(UINT32 mode);
static UINT32 GetLUTerrAd();
static UINT32 AFReadFCANRxResurt(_AF_AUTOSTORE_MSG *pMsg,UINT32 IdIndex);
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -