|
07 02 |
|
|
07 02 |
|
|
07 01 |
|
修改完我之前講過的irq,timer後,渡過了一段console沒有字的debug時間,從頭到尾都用ICE去trace是很悶的,現下我把console的程式碼加上,讓console跑點字出來吧
Kernel所有的訊息都是印在console上的,所以在kernel用printk其實等於直接把buffer content倒在console
但user space的application可不是這樣,當printf印訊息時,其實是透過tty driver呼叫我們的serial driver然後請serial driver幫忙印字
藉由上面的介紹,大概瞭解console driver會用到serial driver的write函式,而serial driver也必需跟tty driver註冊自己
Kernel所有的訊息都是印在console上的,所以在kernel用printk其實等於直接把buffer content倒在console
但user space的application可不是這樣,當printf印訊息時,其實是透過tty driver呼叫我們的serial driver然後請serial driver幫忙印字
藉由上面的介紹,大概瞭解console driver會用到serial driver的write函式,而serial driver也必需跟tty driver註冊自己
標籤: embedded
|
07 01 |
|
|
07 01 |
|
|
06 20 |
|
|
06 09 |
|
最近找到一些不錯的python資料,底下由淺至深的把這些資料條列出來
Essential python: 大陸網友寫的python入門書,不是網路上的那本tutorial,裡面的內容我覺得跟tutorial不相上下,易學易懂
Python library reference:它把python library一一條列剖析,不管那個api,都可在這本書裡面找到,再加上有詳細易懂的範例,實是不可或缺的pyt
Essential python: 大陸網友寫的python入門書,不是網路上的那本tutorial,裡面的內容我覺得跟tutorial不相上下,易學易懂
Python library reference:它把python library一一條列剖析,不管那個api,都可在這本書裡面找到,再加上有詳細易懂的範例,實是不可或缺的pyt
標籤: python
|
05 30 |
|
在講到inotify這個機制前,可能要說一下它的使用限制,如果OS不是用LINUX,請按上一頁,再者如果Linux版本不是2.6.13以上,也請按上一頁,如果OS條件都符合以上兩項,請繼續往下看
什麼是inotify
我截錄一段inotify創作人Rober Love在Linux Journal上所說的一段話
inotify is a file change notification system—a kernel feature that allows applications to request the monitoring of a set of files against a list of events. When the event occurs, the application is notified. To be useful, such a feature must be simple to use, lightweight with little overhead and flexible. It should be easy to add new watches and painless to receive notification of events.
上面那段話簡單的來說,inotify可以幫助你即時的觀測檔案的改變,並回送通知給你,而inotify把檔案狀態的變化分為以下十類
什麼是inotify
我截錄一段inotify創作人Rober Love在Linux Journal上所說的一段話
inotify is a file change notification system—a kernel feature that allows applications to request the monitoring of a set of files against a list of events. When the event occurs, the application is notified. To be useful, such a feature must be simple to use, lightweight with little overhead and flexible. It should be easy to add new watches and painless to receive notification of events.
上面那段話簡單的來說,inotify可以幫助你即時的觀測檔案的改變,並回送通知給你,而inotify把檔案狀態的變化分為以下十類
標籤: linux


