cachead.h
来自「利用DSP/BIOS在CCS2.2下开发的通过EMIF读取SRAM中数据的工程」· C头文件 代码 · 共 49 行
H
49 行
#include<stdio.h>
#include<string.h>
#define USER_NUM_PER_PORT 8
#define PORT_NUM 5
#define PROTECT_SLOT 5
#define TOTAL_SLOT_NUM PORT_NUM*(1500+USER_NUM_PER_PORT*PROTECT_SLOT)
#define SLOT_NUM_PER_PORT TOTAL_SLOT_NUM/PORT_NUM
#define null 0
#define success 1
#define failure 0
#define nonereq 2
//const int success=1;
//const int failure=0;
//const int nonereq=2;
typedef unsigned int int16;
enum prior {high,middle,low};
enum type {urgency,call,ftp,internet};
typedef enum prior prior;
typedef enum type type;
typedef struct{
int16 port_id;
int16 user_id;
int16 slot_num;
int16 p;
int16 t;
} REQ;
typedef REQ REQ_MEM[PORT_NUM][USER_NUM_PER_PORT];
typedef REQ REQ_PORT[USER_NUM_PER_PORT];
typedef REQ (*MEM_ptr)[USER_NUM_PER_PORT];
typedef REQ *PORT_ptr;
typedef REQ *USER_ptr;
typedef struct{
int16 port_id;
int16 user_id;
int16 req_slot;
int16 start_slot;
int16 end_slot;
} DIS;
typedef DIS DIS_MEM[PORT_NUM][USER_NUM_PER_PORT];
typedef DIS DIS_PORT[USER_NUM_PER_PORT];
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?