Time of Update: 2018-12-04
轉自:http://www.arm9home.net/read.php?tid-10337-fpage-0-toread--page-1.htmlU-BOOT for Mini6410
Time of Update: 2018-12-04
.globl指示告訴彙編器,_start這個符號要被連結器用到,所以要在目標檔案的符號表中標記它是一個全域符號(在第 5.1 節 “目標檔案”詳細解釋)。_start就像C程式的main函數一樣特殊,是整個程式的入口,連結器在連結時會尋找目標檔案中的_start符號代表的地址,把它設定為整個程式的入口地址,所以每個組譯工具都要提供一個_start符號並且用.globl聲明。如果一個符號沒有用.globl聲明,就表示這個符號不會被連結器用到。
Time of Update: 2018-12-04
摘要:給出S3C2410上觸控螢幕的實現原理、硬體結構和軟體程式;對軟體進行最佳化,改進軟體濾波的實現方法。其演算法使用C語言實現,可移植到任何作業系統的觸控螢幕驅動程式中。 關鍵詞:觸控螢幕 S3C2410 濾波引言 隨著個人數位助理(PDA)、瘦容戶機等的普及,觸控螢幕作為終端與使用者互動的媒介,在我們的生活中使用得越來普遍。觸控螢幕分為電阻式、電容式、聲表面波式和紅外線掃描式等類型,使用得最多的是4線電阻式觸控螢幕。
Time of Update: 2018-12-04
typedef用來定義類型別名,c/c++裡都有,屬於語言的一個特性,和mfc無關比如typedef int* intptr;intptr a; // 相當於int* a;typeof,我所知道的是gcc中對c/c++文法的一個擴充,用來靜態擷取參數類型比如int a = 3;typeof(a) b = 4; // 相當於 int b = 4;typeof("12345") c = "abcde"; // 相當於 const char c[6] =
Time of Update: 2018-12-04
關於container_of見kernel.h中:/*** container_of - cast a member of a structure out to the containing structure* @ptr: the pointer to the member.* @type: the type of the container struct this is embedded in.* @member: the name of the member
Time of Update: 2018-12-04
#include <stdio.h>#include <string.h>int kmp(const char *pstr, const char *psrc);int main(){ printf("position is: %d/n", kmp("zhaozigeng", "zi")); return 0;}void get_next(const char *pstr, int *arr_next){ int j=0,k=-1; int len = strlen(
Time of Update: 2018-12-04
#include <stdio.h>#include <stdlib.h>//在求時間複雜度時,是用每一行代碼的時間複雜度進行相加得到的,應該是這樣去做.//總的執行時間 = 2 × 輸入長度為n/2的sort函數的執行時間 + merge函數的執行時間Θ(n)//採用分而治之的方法不是這樣嘛.void merge(int *arr, int low, int mid, int high){ int i = low, j =mid+1,k=0; int *pbuf =
Time of Update: 2018-12-04
#include <iostream>#include <assert.h>using namespace std;/*struct Node{ int info; Node *next;};struct queuelk{ struct Node *front; struct Node *back;};void init_queue(struct queuelk* q){ q->back = q->front = NULL;}void
Time of Update: 2018-12-04
Uubntu下編譯emacs經常會遇到如下錯誤,雖然可以指定--without-x,但是最好還是把x介面編譯進emacs比較好,以防後面會使用。錯誤如下:………………checking for X... nochecking for X... trueconfigure: error: You seem to be running X, but no X development librarieswere found. You should install the relevant
Time of Update: 2018-12-04
鴿巢排序,排序位元組串、寬位元組串最快的排序演算法,計數排序的變種(將計數緩衝區大小固定,少一次遍曆開銷),速度是STL中std::sort的20多倍,更重要的是實現極其簡單!缺點是需要一個size至少等於待排序數組取值範圍的緩衝區,不適合int等大範圍資料。 void PigeonholeSort(BYTE *array, int length){ int b[256] = {0}; int i,k,j = 0; for(i=0; i<length; i++)
Time of Update: 2018-12-04
使用二級指標對單鏈表的刪除操作進行最佳化,原因在於鏈表每一個結點內部都有一個link指標,原來的做法是在遍曆鏈表時,用一個當前指標current指向當前結點,再用一個指標previous去指向current結點的前驅,兩個指標都是指向的結點,這樣當對頭結點進行操作時,就要判斷特殊條件,改進的思路是,使用previous成為二級指標,讓它去指向前一個結點的link域,這樣在進行刪除結點時,就可以直接用*previous操作,省去了對頭結點的特殊判斷。。。這個思路要把鏈表的頭指標看成是一個資料域為的
Time of Update: 2018-12-04
快速參考列表1.關心你的技藝Care About Your Craft如果你不在乎能否漂亮地開發出軟體,你又為何要耗費生命去開發軟體呢?2.思考!你的工作Think! About Your Work關掉自動駕駛儀,接管操作。不斷地批評和評估你的工作。3.提供各種選擇,不要找蹩腳的借口Provide Options, Don't Make Lame Excuses要提供各種選擇,而不是借口。不要說事情做不到;說明能夠做什麼。4.不要容忍破窗戶Don't Live with Broken
Time of Update: 2018-12-04
注重實效的程式員會編寫易於測試的代碼如果你使你的步驟保持短小,並在每一個步驟之後進行測試.你就可以 避免長時間的調試.注重實效的程式員會深思熟慮的編程.注重實效的程式員會批判的思考所有代碼.1總是意識到自己在做什麼. 煮青蛙2不要忙目編程.3 要按照計划行事.4 依賴可靠的事物.5 為你的假定建立文檔6 不要做曆史的奴隸. 如果不再適用所有的代碼都可以被替換.
Time of Update: 2018-12-04
程式清單:使任務進入就緒態OSRdyGrp |= OSMapTbl[prio>>3]; (1)OSRdyTbl[prio>>3] |= OSMapTbl[prio&0x07];
Time of Update: 2018-12-04
#include <iostream>using namespace std;void choice_sort(int *arr, int len);void quicksort(int *arr, int start, int pivot);int main(){ int arr[10] = {10, 9, 8, 7, 6, 5, 4, 3,2, 1}; quicksort(arr, 0, 9); for(int i=0; i<10; i++) //不對稱邊界 {
Time of Update: 2018-12-04
emacs添加中文IME:分為兩種情況:一,使用ubuntu系統源來安裝的emacs1.先添加源sudo add-apt-repository ppa:irie/elispsudo apt-get update2.安裝ibus-el包:sudo apt-get install ibus-el3.修改設定檔:(require 'ibus) (add-hook 'after-init-hook
Time of Update: 2018-12-04
三)靜態鏈表 用一維數組實現線性鏈表---靜態鏈表 順序儲存結構也可以實現鏈表格儲存體功能。首先開闢一個足夠大的結構體數組。結構體的一個成員存放資料元素,另一個成員存放鏈表中下一個資料元素在數組中的位置(“遊標”),這稱為靜態鏈表。 靜態鏈表存於數組中,但鏈表的輸出卻不是按數組的順序輸出的,而是由一個指定的位置開始根據遊標依次輸出的。 1.靜態鏈表類型定義#define MAXSIZE 1000 // 鏈表的最大長度typedef struct{ elemtype
Time of Update: 2018-12-04
我們按照google網站上的文檔建立一個檔案/etc/udev/rules.d/51-android.rules# adb protocol on passion (Nexus One)SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600", OWNER="<username>"# fastboot protocol on passion (Nexus One)SUBSYSTEM==
Time of Update: 2018-12-04
android的原生系統串連wifi後在路由器主機列表裡面顯示的一串諸如“android-xxxxxxxx”的代碼,想要修改顯示的名稱就要修改/system/build.prop這個檔案,使用re管理器在這個檔案最後一行添加:net.hostname=你想設定的名稱
Time of Update: 2018-12-04
ifndef LIST_H#define LIST_H#include <exception>using namespace std;//異常類,當查詢的索引發生錯誤的時候拋出這個異常class BadIndex :public exception{ public: virtual const char* what() const throw() { return "你輸入的索引位置錯誤"; }};template <typename T>class List;