LED驅動程式設計

2021-09-22 12:44:36 字數 657 閱讀 9447

通用輸入輸出介面的簡稱

s2440一共有130個gpio口,分為a~j共9組:gpa,gpb,gpc……gpj;通過設定相應的暫存器,可以選擇某個gpio口是用於輸入,輸出還是特定其他特殊功能。例如可以設定gph6口用於輸入輸出,或者是串列埠;

每組gpio(gpa-gpj),都可以通過3個暫存器來控制與訪問,這三個暫存器分別是

程式:

#include

"def.h"

#include

"option.h"

#include

"2440addr.h"

#include

"2440lib.h"

#include

"2440slib.h"

//******************************==

//延時函式

void

dely

(u32 tt)}}

intmain

(int argc,

char

**ar**)

return0;

}

簡單的led驅動程式設計

基於ok6410 led驅動程式 vim led.c include include include include include include include led.h include define gpmcon 0x7f008820 define gpmdat 0x7f008824 uns...

led點燈驅動

核心版本 linux 2.6.32.2 開發板 mini2440 include include include include include include include include include include include include define device name le...

linux驅動之 led驅動

練手,第乙個字元驅動.用模組載入方法 華清遠見 嵌入式linux裝置驅動開發詳解 的 拿來改的.編譯過程發現很多錯誤.最後發現 這本書帶的驅動 都是基於linux2.4的.目前我用的linux2.6,部分需要做修改.我的板子是 友善之臂的 2410.vmware ubuntu nfs交叉編譯 首先 ...