資源簡介
很好用的zedboard OLED IP

代碼片段和文件信息
/*? ZedboardOLED.c
?*? ###############################################################################
?*
?* Simple?driver?for?the?128x32?OLED?on?the?Zedboard
?*
?*
?* The?presence?of?the?ZedboardOLED_v1_0?IP?code?in?the?PL-side?of?the?Zynq?chip
?* is?required?to?make?this?driver?work.
?*
?*
?* Texas?A&M?Qatar?invests?efforts?and?resources?providing?this?open?source?code
?* All?text?above?and?the?splash?screen?below?must?be?included?in?any?redistribution
?* this?driver?is?subjected?to?BSD?license?check?license.txt?for?more?information
?* Written?by?Ali?Aljaani/?Texas?A&M?Qatar?University.
?*
?*? ###############################################################################
?*? v1.0?--?08/15/2014
?*??Eng.?Ali?Aljaani
?*??Company:?TAMUQ?University
?*? ###############################################################################?*/
#include?“xparameters.h“
#include?“xil_io.h“
#include?
#define?DELAY?10000
/*? Define?the?base?memory?address?of?the?ZedboardOLED?IP?core?*/
#define?OLED_base?XPAR_ZEDBOARDOLED_0_S00_AXI_baseADDR
/*??driver?functions?for?ZedboardOLED?IP?core?*/
/*****************************************************************************/
/**
*
*?prints?a?character?on?the?OLED?at?the?page?and?the?position?specified?by?the?second
*?and?third?argumentsexample?print_char(‘A‘00);
*
*?@param char?char_seq??the?character?to?be?printed.
*
*?@param unsigned?int?page(0-3)??the?OLED?is?divided?into?4?pages?numbers?0?is?the?upper
* 3?is?the?lower.
*?@param unsigned?int?position(0-15)??each?page?can?hold?16?characters
*? 0?is?the?leftmost??15?is?the?rightmost
*
*?@return int??1?on?success??0?on?failure.
******************************************************************************/
int?print_char(?char?char_seq?unsigned?int?page?unsigned?int?position);
/*****************************************************************************/
/**
*
*?prints?a?string?of?characters?on?the?OLED?at?the?page?specified?by?the?second
*?argument?maximum?string?per?page?=16example:?print_char(“Texas?A&M?Qatar0);
*
*?@param char?*start??the?string?message?to?be?printed??maximum?16?letters.
*
*?@param unsigned?int?page(0-3)??the?OLED?is?divided?into?4?pages?numbers?0?is?the?upper
* 3?is?the?lower.
*
*?@return int??1?on?success??0?on?failure.
*
******************************************************************************/
int?print_message(char?*start??unsigned?int?page);
/*****************************************************************************/
/**
*
*?clears?the?screen?example:?clean();
*
*
*?@param none.
*
*?@return none.
******************************************************************************/
void?clear(void);
static?int?int_seq?[64];
void?clear(void){
int?i=0;
for?(i=0;i<=63?;i++)?{
int_seq[i]?=?0x00000000;
}
for?(i=0;i<=60;?i=i+4)?{
Xil_Out32(OLED_base+(i)int_seq[i]);
}
for?(i=0;i<=DELAY?;
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-01-02?14:27??OLED_1.0\
?????目錄???????????0??2016-01-02?14:13??OLED_1.0\bd\
?????文件????????7835??2014-08-18?17:26??OLED_1.0\bd\bd.tcl
?????文件???????38240??2014-08-20?17:38??OLED_1.0\component.xm
?????目錄???????????0??2016-01-02?14:13??OLED_1.0\drivers\
?????目錄???????????0??2016-01-02?14:13??OLED_1.0\drivers\ZedboardOLED_v1_0\
?????目錄???????????0??2016-01-02?14:13??OLED_1.0\drivers\ZedboardOLED_v1_0\data\
?????文件?????????201??2014-08-18?17:26??OLED_1.0\drivers\ZedboardOLED_v1_0\data\ZedboardOLED.mdd
?????文件?????????174??2014-08-18?17:26??OLED_1.0\drivers\ZedboardOLED_v1_0\data\ZedboardOLED.tcl
?????目錄???????????0??2016-01-02?14:13??OLED_1.0\drivers\ZedboardOLED_v1_0\src\
?????文件?????????481??2014-08-18?17:26??OLED_1.0\drivers\ZedboardOLED_v1_0\src\Makefile
?????文件????????4635??2014-08-20?14:07??OLED_1.0\drivers\ZedboardOLED_v1_0\src\ZedboardOLED.c
?????文件????????1771??2014-08-20?14:07??OLED_1.0\drivers\ZedboardOLED_v1_0\src\ZedboardOLED.h
?????目錄???????????0??2016-01-02?14:13??OLED_1.0\hdl\
?????文件????????3054??2014-08-20?14:18??OLED_1.0\hdl\ZedboardOLED_v1_0.v
?????文件???????44014??2014-08-20?16:31??OLED_1.0\hdl\ZedboardOLED_v1_0_S00_AXI.v
?????目錄???????????0??2016-01-02?14:13??OLED_1.0\src\
?????目錄???????????0??2016-01-02?14:13??OLED_1.0\src\charLib\
?????文件????????3518??2014-08-19?16:21??OLED_1.0\src\charLib\charLib.coe
?????文件???????20351??2014-08-19?16:22??OLED_1.0\src\charLib\charLib.xci
?????文件????????3079??2014-08-19?14:01??OLED_1.0\src\Delay.v
?????文件????????4249??2014-08-19?14:01??OLED_1.0\src\SpiCtrl.v
?????目錄???????????0??2016-01-02?14:13??OLED_1.0\xgui\
?????文件????????2893??2014-08-20?14:45??OLED_1.0\xgui\ZedboardOLED_v1_0.tcl
評論
共有 條評論