/* mecLib.h - ... */
/* Copyright 2006 ZTE Corporation */
/*
modification history
--------------------
01a,23nov06,zte written.
*/
/*
该头文件 mecLib.h 的用法:
文件内的宏定义,只在BSP内部使用。
061124 ok
*/
#ifndef __INCmecLibh
#define __INCmecLibh
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* includes */
#include "5906type.h"
#include "nvRam.h"
/* defines */
/* 只有mecLib.c使用 */
#define PROC_OK 0
#define PROC_ERROR (-1)
#define PROCESSING 1
#define NVRAM_8540_SIZE 0x2000 /*8192 bytes*/
#define FLASH_8540_SIZE 0x40 /*64M bytes*/
#define ZXR10_6910_MAX_SERIAL_NO 16384
#ifndef ROS10_SHELL_PROMPT
#define ROS10_SHELL_PROMPT "[ROS10]:"
#endif
#define BSP_LINK_DOWN 0
#define BSP_LINK_UP 1
#define BD_NVRAM_SIZE 0x400 /* 需要同 NV_RAM_SIZE 一致 */
#define BD_FLASH_SIZE 32 /* 32M FLASH */
#define FAN_FULL_SPEED 1
#define FAN_THR_QTR_SPEED 2
#define FAN_HALF_SPEED 3
#define FAN_QUARTER_SPEED 4
#define FAN_NONE_SPEED 5
/*DS1620上的命令*/
#define TEMPERATURE_UNSUPPORT 0xff /*not support to acquire temperature*/
#define TEMPERATURE_FAILURE 0xfe /*failed to acquire temperature*/
#define WRITE_CONFIG 0x0C
#define READ_CONFIG 0xAC
#define START_CONVERT 0xEE
#define READ_TEMPRERATURE 0xAA
#define DQ_MASK PD22
#define CLK_MASK PD23
#define RST_MASK PD24
/* typedefs */
/* 只有 mecLib.c 使用,可以考虑挪到 mecLib.c中 */
typedef struct
{
char fileName [20];
char dir [70];
} ZXR10_SYSTEM_IMAGE_FILE;
/* variable declarations */
#ifndef INCLUDE_SYSCLK_INIT
#define INCLUDE_SYSCLK_INIT
#endif
/*define by chenyibao switchtype*/
/*82xxlib.h中*/
/*
#define SWITCH_5224 5224
#define SWITCH_5228 5228
#define SWITCH_5228F 5229
#define SWITCH_5928 5928
#define SWITCH_5928F 5929
#define SWITCH_5252 5252
#define SWITCH_5952 5952
#define SWITCHTYPE_ERROR 0
*/
/*
#define ZXR10_GAR_MAX_SERIAL_NO 16383
#define RAMDISK_NAME "/system/"
#define TFFS_DISK_NAME "/flash/"
#define IMG_DIR_NAME "img"
#define CONFIG_DIR_NAME "cfg"
#define DATABASE_DIR_NAME "data"
#define ZXR10_IMAGE_VERSION "zxr10.zar"
*/
/* function declarations */
int mecRegWrite (int Register, UINT8 value);
UINT8 mecRegRead (int Register);
BOOL boardOnLine (UINT8 phySlot);
UINT8 physSlotNumber (void);
void bsp_ResetBoard(void);
int b_GetLastResetSource (void);
BOOL boardIsMaster (void);
void reportStateToMate (UINT8 state);
STATUS ResetAllLicBoard (void);
STATUS resetBoard (UINT32 physlot);
UINT8 b_getFrameType (void);
UINT8 b_getMachineType (void);
STATUS b_SetFileSystemClock (void);
STATUS masterHwInit (void);
void bsp_WatchDogEnable(void);
void bsp_WatchDogDisable(void);
void bsp_WatchDogClear(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __INCmecLibh */