cs.h

来自「CS8900 ethernet driver for LPC210x」· C头文件 代码 · 共 20 行

H
20
字号
#ifndef _CS_H_
#define _CS_H_

#include "lpc210x.h"

#define CS_CS8900A   0	// ethernet                is device 0
#define CS_CF		 1	// compact flash           is device 1
#define CS_LEDS		 2	// LED IO expander         is device 2
#define CS_EXPIO	 3	// Switches IO expander    is device 3
#define CS_MP3_CSn	 4	// MP3 control chip select is device 4
#define CS_MP3_DCSn	 5	// MP3 data chip           is device 5
#define CS_NONE		 7	// no device

#define CS_SHIFT 29	// chip select is P0.29..31
#define CS(device) {IOCLR = 0x07 << CS_SHIFT; IOSET = (device & 0x07) << CS_SHIFT;}

void cs_init(void);

#endif //_CS_H_

⌨️ 快捷键说明

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