<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>易春木</title>
	<atom:link href="http://eeepage.info/feed/" rel="self" type="application/rss+xml" />
	<link>http://eeepage.info</link>
	<description>軟體開發, 網站規劃, 以及攝影記錄!</description>
	<lastBuildDate>Fri, 03 Feb 2012 05:41:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>谷月涵放消息是真的嗎?  看一下隔天的花旗環球卷商如何操盤吧</title>
		<link>http://eeepage.info/citi-world/</link>
		<comments>http://eeepage.info/citi-world/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 05:38:57 +0000</pubDate>
		<dc:creator>易春木</dc:creator>
				<category><![CDATA[投資理財]]></category>
		<category><![CDATA[資訊分享]]></category>
		<category><![CDATA[外資]]></category>
		<category><![CDATA[花旗環球]]></category>
		<category><![CDATA[谷月涵]]></category>

		<guid isPermaLink="false">http://eeepage.info/?p=2398</guid>
		<description><![CDATA[以前每次花旗這位長官放出消息時, 都被ptt稱為反指標 我也半信半疑, 覺得怎麼可能是反指標 應該是利多才對呀.... 剛好這次又放出消息, 我們來看一下放出消息後花旗環球的操盤進出吧! 花旗谷月涵：台股補漲由電子股領銜表演 首選8檔 2012-02-01 09:25 花旗環球證券台灣區研究部主管谷月涵出具台股策略報告表示，台股在選後仍落地區表現4%，這周反彈行情由電子表現，但要彌補去年8月的缺口，可能還有賣壓的問題。仍看好電子股價估值和成長態勢，首選鴻海(2317-TW)8檔個股。 谷月涵指出，藍營在總統大選和立委選戰中勝選，但台股在地區性表現還是落後4%，預估這波補漲行情在這周可望反映完畢。谷月涵也指出，電子類股在選後動能強勁，事實上，電子類股相較非電子在選後更有表現，花旗也較看好電子類股股價估值和成長態勢。 谷月涵說明，電子類股這波反彈行情將由現金比重驅動，自2008年金融危機後，市場現金比重持穩增加，雖然零售毛利在2009年第2季下滑至低點，但去年市場賣超達21%。然而，如果市場預期這波行情能填補2011年8月指數的跳空缺口，可能還是有賣壓沉重的問題。 谷月涵也說明，在農曆新年後，台灣市場傾向在第1季將預告今年全年表現，台股通常在第1季也有平均9%的漲幅表現。首選8檔個股，包括鴻海(2317-TW)、日月光(2311-TW)、聯電(2330-TW)、中信金(2891-TW)、遠傳(4904-TW)、仁寶(2324-TW)、裕隆(2201-TW)、遠百(2903-TW)，由於看好其他beta部位，因此從台積電(2330-TW)轉進聯電，並加入日月光。 花旗環球的操盤進出 2012/02/02 鴻海(2317-TW) +1291 日月光(2311-TW) &#8230; <a href="http://eeepage.info/citi-world/" class="more-link">Learn more</a>]]></description>
			<content:encoded><![CDATA[<p>以前每次花旗這位長官放出消息時, 都被ptt稱為反指標<br />
我也半信半疑, 覺得怎麼可能是反指標<br />
應該是利多才對呀....</p>
<p><span id="more-2398"></span></p>
<p>剛好這次又放出消息,<br />
我們來看一下放出消息後花旗環球的操盤進出吧!</p>
<p><strong>花旗谷月涵：台股補漲由電子股領銜表演 首選8檔 2012-02-01  09:25</strong></p>
<blockquote><p>花旗環球證券台灣區研究部主管谷月涵出具台股策略報告表示，台股在選後仍落地區表現4%，這周反彈行情由電子表現，但要彌補去年8月的缺口，可能還有賣壓的問題。仍看好電子股價估值和成長態勢，首選鴻海(2317-TW)8檔個股。</p>
<p>谷月涵指出，藍營在總統大選和立委選戰中勝選，但台股在地區性表現還是落後4%，預估這波補漲行情在這周可望反映完畢。谷月涵也指出，電子類股在選後動能強勁，事實上，電子類股相較非電子在選後更有表現，花旗也較看好電子類股股價估值和成長態勢。</p>
<p>谷月涵說明，電子類股這波反彈行情將由現金比重驅動，自2008年金融危機後，市場現金比重持穩增加，雖然零售毛利在2009年第2季下滑至低點，但去年市場賣超達21%。然而，如果市場預期這波行情能填補2011年8月指數的跳空缺口，可能還是有賣壓沉重的問題。</p>
<p>谷月涵也說明，在農曆新年後，台灣市場傾向在第1季將預告今年全年表現，台股通常在第1季也有平均9%的漲幅表現。首選8檔個股，包括鴻海(2317-TW)、日月光(2311-TW)、聯電(2330-TW)、中信金(2891-TW)、遠傳(4904-TW)、仁寶(2324-TW)、裕隆(2201-TW)、遠百(2903-TW)，由於看好其他beta部位，因此從台積電(2330-TW)轉進聯電，並加入日月光。</p></blockquote>
<p>花旗環球的操盤進出 2012/02/02</p>
<blockquote><p>鴻海(2317-TW) +1291</p>
<p>日月光(2311-TW) -5107</p>
<p>聯電(2330-TW) +5912</p>
<p>中信金(2891-TW) +758</p>
<p>遠傳(4904-TW) -590</p>
<p>仁寶(2324-TW) -1234</p>
<p>裕隆(2201-TW) +309</p>
<p>遠百(2903-TW) +92</p>
</blockquote>
<p>所以說<br />
也不是說看好的股票就全買<br />
說的新聞稿和真正的操作可能會有點出入</p>
]]></content:encoded>
			<wfw:commentRss>http://eeepage.info/citi-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>android的 low power: LP0 LP1 LP2</title>
		<link>http://eeepage.info/tegra-lp0-lp1-lp2/</link>
		<comments>http://eeepage.info/tegra-lp0-lp1-lp2/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 13:28:34 +0000</pubDate>
		<dc:creator>易春木</dc:creator>
				<category><![CDATA[IT開發]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[lp0]]></category>
		<category><![CDATA[lp1]]></category>
		<category><![CDATA[lp2]]></category>
		<category><![CDATA[nvidia]]></category>
		<category><![CDATA[power]]></category>
		<category><![CDATA[resume]]></category>
		<category><![CDATA[suspend]]></category>
		<category><![CDATA[tegra]]></category>

		<guid isPermaLink="false">http://eeepage.info/?p=2392</guid>
		<description><![CDATA[下面這個commit就是tegra的Low power概念整合到Linux kernel 後來應該被修改很多次, 其中的註解將lower power狀態說的很清楚 ARM: tegra: Add suspend support http://nv-tegra.nvidia.com/gitweb/?p=linux-2.6.git;a=commit;h=d9c01b3ce93ce4ab3bff842f726a1924ffdef860 Tegra supports three low power modes that involve &#8230; <a href="http://eeepage.info/tegra-lp0-lp1-lp2/" class="more-link">Learn more</a>]]></description>
			<content:encoded><![CDATA[<p>下面這個commit就是tegra的Low power概念整合到Linux kernel<br />
後來應該被修改很多次,<br />
其中的註解將lower power狀態說的很清楚</p>
<p><span id="more-2392"></span></p>
<p><strong>ARM: tegra: Add suspend support</strong><br />
<a href="http://nv-tegra.nvidia.com/gitweb/?p=linux-2.6.git;a=commit;h=d9c01b3ce93ce4ab3bff842f726a1924ffdef860" target="_blank">http://nv-tegra.nvidia.com/gitweb/?p=linux-2.6.git;a=commit;h=d9c01b3ce93ce4ab3bff842f726a1924ffdef860</a></p>
<blockquote><p>
<strong>Tegra supports three low power modes that involve powering down the CPU.</strong></p>
<p><strong>LP2</strong> powers down both CPU cores and the GICs, but leaves the core<br />
peripherals, including the memory controller and the legacy<br />
interrupt controller, enabled.  The legacy interrupt controller<br />
is used as the wakeup source, and any interrupt can wake the device.<br />
LP2 can be used in idle.</p>
<p><strong>LP1</strong> is the same as LP2, but in addition turns off the memory<br />
controller and puts the DDR memory in self-refresh.  Any interrupt<br />
can wake the device. LP1 could be used in idle if no peripherals<br />
are doing DMA.</p>
<p><strong>LP0</strong> turns off everything in the SoC except the RTC and a power<br />
management controller, both of which run off a 32 kHz clock.<br />
The power management controller has 32 wake sources, all other<br />
interrupts can not be used to wake from LP0.</p>
<p>These low power modes power-gate the main CPU complex, requiring a<br />
full processor state save and restore from a reset vector.</p>
<p>Platform-specific data (power good times, PMU capabilities, etc.) must be<br />
specified when registering the suspend operations to ensure that platform<br />
power sequencing restrictions are maintained.</p>
<p><strong>In both LP0 and LP1, SDRAM is placed into self-refresh.</strong> in order to safely<br />
perform this transition, the final shutdown procedure responsible for</p>
<p>  * turning off the MMU and L1 data cache<br />
  * putting memory into self-refresh<br />
  * setting the DDR pads to the lowest power state<br />
  * and turning off PLLs</p>
<p>is copied into IRAM (at the address TEGRA_IRAM_BASE + SZ_4K) at the<br />
start of the suspend process.</p>
<p><strong>In LP1 mode (like LP2),</strong> the CPU is reset and executes the code specified<br />
at the EVP reset vector.  Since SDRAM is in self-refresh, this code must<br />
also be located in IRAM, and it must re-enable DRAM before restoring the<br />
full context.  In this implementation, it enables the CPU on PLLP, enables<br />
PLLC and PLLM, restores the SCLK burst policy, and jumps to the LP2 reset<br />
vector to restore the rest of the system (MMU, PLLX, coresite, etc.).  The<br />
LP2 reset vector is expected to be found in PMC_SCRATCH1, and is<br />
initialized during system-bootup.</p>
<p><strong>In LP0 mode,</strong> the core voltage domain is also shutoff.  As a result, all<br />
of the volatile state in the core voltage domain (e.g., pinmux registers,<br />
clock registers, etc.) must be saved to memory so that it can be restored<br />
after the system resumes. <strong> A limited set of wakeups are available from LP0,</strong><br />
and the correct levels for the wakeups must be programmed into the PMC<br />
wakepad configuration register prior to system shutdown.  <strong>On resume, the<br />
system resets into the boot ROM,</strong> and the boot ROM restores SDRAM and other<br />
system state using values saved during kernel initialization in the PMC<br />
scratch registers.</p>
<p><strong>Resuming from LP0 requires the boot ROM to supply a signed recovery codeblob<br />
to the kernel; </strong>the kernel expects that the length and address of this blob<br />
is supplied with the <strong>lp0_vec= command line argument</strong>; if not present, suspend-<br />
to-LP0 will be disabled</p>
<p>For simplicity, <strong>the outer cache is shutdown for both LP0 and LP1</strong>; it<br />
is possible to optimize the LP1 routine to bypass outer cache shutdown<br />
and restart.</p>
<p>Includes fixes from:<br />
Scott Williams <scwilliams@nvidia.com><br />
Aleksandr Frid <afrid@nvidia.com><br />
Vik Kasivajhula <tkasivajhula@nvidia.com><br />
Bharat Nihalani <Kbnihalani@nvidia.com><br />
James Wylder <james.wylder@motorola.com><br />
Allen Martin <amartin@nvidia.com></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://eeepage.info/tegra-lp0-lp1-lp2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>擷取螢幕方便小軟體 PicPick</title>
		<link>http://eeepage.info/picpick/</link>
		<comments>http://eeepage.info/picpick/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 06:07:51 +0000</pubDate>
		<dc:creator>易春木</dc:creator>
				<category><![CDATA[資訊分享]]></category>
		<category><![CDATA[小軟體]]></category>
		<category><![CDATA[擷取螢幕]]></category>

		<guid isPermaLink="false">http://eeepage.info/?p=2389</guid>
		<description><![CDATA[有時候鍵盤上的prtSrn會失效 這時候可以試看看 alt + prtSrn 如果還會失效 有可能有些檔案有防擷取功能 可以試看看PicPick PicPick一個免費又好用的螢幕擷取軟體，它可以抓取全螢幕或是局部的畫面，而且操作也很簡單，還具備了一般最常用到的基本圖像處理功能。 軟體名稱：PicPick 3.0.7 免安裝版 軟體版本： 3.0.7 語言界面： 繁體中文 官方網頁：http://picpick.wiziple.net/ 檔案下載：Download]]></description>
			<content:encoded><![CDATA[<p>有時候鍵盤上的prtSrn會失效<br />
這時候可以試看看 alt + prtSrn</p>
<p>如果還會失效<br />
有可能有些檔案有防擷取功能</p>
<p><span id="more-2389"></span></p>
<p>可以試看看PicPick</p>
<p>PicPick一個免費又好用的螢幕擷取軟體，它可以抓取全螢幕或是局部的畫面，而且操作也很簡單，還具備了一般最常用到的基本圖像處理功能。<br />
軟體名稱：PicPick 3.0.7 免安裝版<br />
軟體版本： 3.0.7<br />
語言界面： 繁體中文<br />
官方網頁：<a href="http://picpick.wiziple.net/" target="_blank">http://picpick.wiziple.net/</a><br />
檔案下載：<a href="http://www.xun6.com/file/7e3e14103/PicPick.zip.html" target="_blank">Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://eeepage.info/picpick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>windows 8 : 兼具方塊磚與傳統介面</title>
		<link>http://eeepage.info/windows-8/</link>
		<comments>http://eeepage.info/windows-8/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 09:21:49 +0000</pubDate>
		<dc:creator>易春木</dc:creator>
				<category><![CDATA[生活就是要快樂]]></category>
		<category><![CDATA[資訊分享]]></category>

		<guid isPermaLink="false">http://eeepage.info/?p=2381</guid>
		<description><![CDATA[看到這台 lenovo未來概念機 結合平板與筆電的windows8系統 滿接近我會買的程度了 首先雖然 android已經有平板+鍵盤的概念 但是android本來就是設計給touch 手指滑動的介面 如果透過滑鼠或是實體鍵盤, 還是怪怪的 這是我個人觀感啦, 畢竟asus 變形平板還是賣得不錯, 但是我很少看到有人操作它的鍵盤呀.... 轉頭看 windows 8 雖然只是介面多了metro的平板touch 也保留原本傳統介面 不知道是技術問題, &#8230; <a href="http://eeepage.info/windows-8/" class="more-link">Learn more</a>]]></description>
			<content:encoded><![CDATA[<p>看到這台 lenovo未來概念機<br />
結合平板與筆電的windows8系統<br />
滿接近我會買的程度了</p>
<p><span id="more-2381"></span></p>
<p>首先雖然 android已經有平板+鍵盤的概念<br />
但是android本來就是設計給touch 手指滑動的介面<br />
如果透過滑鼠或是實體鍵盤, 還是怪怪的<br />
這是我個人觀感啦, 畢竟asus 變形平板還是賣得不錯, 但是我很少看到有人操作它的鍵盤呀....</p>
<p>轉頭看 windows 8<br />
雖然只是介面多了metro的平板touch<br />
也保留原本傳統介面<br />
不知道是技術問題, 還是包袱太大無法甩開<br />
但也是windows的價值- 使用者熟悉的操作介面</p>
<p>如果我買了這樣一台windows8 平板+鍵盤<br />
最好是可拆式的<br />
這樣我就可以外出的時候,<br />
只需要帶著window8平板, 透過touch螢幕去控制<br />
一回到家,<br />
只需要把平板裝上實體鍵盤和滑鼠, 就變成一般筆電</p>
<p>當然CPU效能雖不用太好, 但是也不能太差<br />
為什麼說不用太好, 因為之後就是雲端運算了<br />
大多數的儲存裝置與運算都是上網就可以操作<br />
為什麼說也不能太差,<br />
因為雖然我不玩重度3D影像遊戲<br />
但我也是會看影片, 玩玩基本的遊戲<br />
所以CPU不可以太慢...</p>
<p>期待未來這樣的產品上市</p>
<p><a href="http://chinese.engadget.com/2012/01/09/lenovos-ideapad-yoga-convertible-tablet-runs-windows-8-is-set/" target="_blank">http://chinese.engadget.com/2012/01/09/lenovos-ideapad-yoga-convertible-tablet-runs-windows-8-is-set/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://eeepage.info/windows-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>資源豐富的教學網-教育部電機與電子群科中心學校</title>
		<link>http://eeepage.info/242/</link>
		<comments>http://eeepage.info/242/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 07:39:31 +0000</pubDate>
		<dc:creator>易春木</dc:creator>
				<category><![CDATA[記事本]]></category>
		<category><![CDATA[基本電學]]></category>
		<category><![CDATA[教學]]></category>
		<category><![CDATA[數位邏輯]]></category>
		<category><![CDATA[電子學]]></category>

		<guid isPermaLink="false">http://eeepage.info/?p=2378</guid>
		<description><![CDATA[發現一個資源豐富的教學網 裡面有基本電學,電子學, 數位邏輯 還有個高工的考試內容 教育部電機與電子群科中心學校 Home >> 數位教材 >> 專業科目]]></description>
			<content:encoded><![CDATA[<p>發現一個資源豐富的教學網<br />
裡面有基本電學,電子學, 數位邏輯<br />
還有個高工的考試內容</p>
<p><span id="more-2378"></span></p>
<p><strong>教育部電機與電子群科中心學校</strong><br />
<a href="http://210.70.70.242/index.php?option=com_content&#038;view=category&#038;layout=blog&#038;id=57&#038;Itemid=116" target="_blank">Home >> 數位教材 >> 專業科目</a></p>
]]></content:encoded>
			<wfw:commentRss>http://eeepage.info/242/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>android 使用 linux LED driver 來控制GPIO 的LED行為</title>
		<link>http://eeepage.info/linux-led-driver/</link>
		<comments>http://eeepage.info/linux-led-driver/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 10:27:02 +0000</pubDate>
		<dc:creator>易春木</dc:creator>
				<category><![CDATA[IT開發]]></category>
		<category><![CDATA[記事本]]></category>
		<category><![CDATA[driver]]></category>
		<category><![CDATA[gpio]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://eeepage.info/?p=2355</guid>
		<description><![CDATA[Linux Kernel's LED driver 一般embedded system廠商控制LED都是透過GPIO的high/low操作 所以不會使用linux kernel內的預設LED功能, 而是自己寫獨立的driver 但是因為正統方式應該要配合Linux Kernel會比較有系統 kernel/drivers/leds 先到kernel作make menuconfig 將LED功能打開 +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# &#8230; <a href="http://eeepage.info/linux-led-driver/" class="more-link">Learn more</a>]]></description>
			<content:encoded><![CDATA[<p> Linux Kernel's LED driver<br />
		一般embedded system廠商控制LED都是透過GPIO的high/low操作<br />
		所以不會使用linux kernel內的預設LED功能, 而是自己寫獨立的driver<br />
		但是因為正統方式應該要配合Linux Kernel會比較有系統<br />
		kernel/drivers/leds</p>
<hr />
先到kernel作make menuconfig<br />
將LED功能打開</p>
<p><span id="more-2355"></span></p>
<blockquote><p>+CONFIG_NEW_LEDS=y<br />
+CONFIG_LEDS_CLASS=y<br />
+<br />
+#<br />
+# LED drivers<br />
+#<br />
+CONFIG_LEDS_GPIO_PLATFORM=y<br />
+CONFIG_LEDS_TRIGGERS=y
</p></blockquote>
<hr />
去kernel/driver/led底下<br />
作出客製化的修改</p>
<p><strong>Makefile</strong></p>
<blockquote><p> # LED Platform Drivers<br />
+#++<br />
+obj-y                                  += leds-xxxx.o<br />
+#--</p></blockquote>
<p><strong>從led-gpio.c 改寫成另一份檔案 led-xxxx.c</strong></p>
<blockquote><p>1: 可以改寫 led_dat->platform_gpio_blink_set = blink_set;<br />
2: 改寫 gpio_led_work()<br />
反正就是接到led的driver的API, 如led_on(), led_off()</p></blockquote>
<p><strong>Access介面node:</strong></p>
<blockquote><p>
ledtrig-timer.c:78: static DEVICE_ATTR(delay_on, 0644, led_delay_on_show, led_delay_on_store);</p>
</blockquote>
<p><strong>順便提到, led-class: always implement blinking</strong></p>
<blockquote><p>
在2010年時候, kernel/driver/leds<br />
由 <a href="http://nv-tegra.nvidia.com/gitweb/?p=user/amartin/linux-2.6.git;a=commit;h=5ada28bf76752e33dce3d807bf0dfbe6d1b943ad" target="_blank">Johannes Berg 新增一個功能 led-class: always implement blinking</a><br />
led-class: always implement blinking</p>
<p>--<br />
Currently, blinking LEDs can be awkward because it is not guaranteed that<br />
all LEDs implement blinking.  The trigger that wants it to blink then<br />
needs to implement its own timer solution.</p>
<p>Rather than require that, add led_blink_set() API that triggers can use.<br />
This function will attempt to use hw blinking, but if that fails<br />
implements a timer for it.  To stop blinking again, brightness_set() also<br />
needs to be wrapped into API that will stop the software blink.</p>
<p>As a result of this, the timer trigger becomes a very trivial one, and<br />
hopefully we can finally see triggers using blinking as well because it's<br />
always easy to use.</p>
<p>Signed-off-by: Johannes Berg <johannes.berg@intel.com><br />
Acked-by: Richard Purdie <rpurdie@linux.intel.com><br />
Signed-off-by: Andrew Morton <akpm@linux-foundation.org><br />
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org></p></blockquote>
<p>這是近年來 kernel/driver/leds 比較大的修改</p>
<hr />
<strong>如何注册gpio-led平台设备:</strong><br />
(如果是android系統, 應該是寫在 kernel/arch/arm/mach-tegra/board-xxxxx.c)</p>
<blockquote><p>例子如下：<br />
#define GPIO_LED3       138<br />
#define GPIO_LED4       139</p>
<p>static struct gpio_led gpio_leds[] = {<br />
        {<br />
                .name   = "led3",<br />
                .default_trigger = "heartbeat",<br />
                .gpio   = GPIO_LED3,<br />
                .active_low = 1,<br />
                .default_state = LEDS_GPIO_DEFSTATE_OFF,<br />
        },<br />
        {<br />
                .name   = "led4",<br />
                .gpio   = GPIO_LED4,<br />
                .active_low = 1,<br />
                .default_state = LEDS_GPIO_DEFSTATE_OFF,<br />
        },<br />
};</p>
<p>static struct gpio_led_platform_data gpio_led_info = {<br />
        .leds           = gpio_leds,<br />
        .num_leds       = ARRAY_SIZE(gpio_leds),<br />
};</p>
<p>static struct platform_device leds_gpio = {<br />
        .name   = "leds-gpio",<br />
        .id     = -1,<br />
        .dev    = {<br />
                .platform_data  = &#038;gpio_led_info,<br />
        },<br />
};<br />
最后调用platform_device_register(&#038;leds_gpio)将LED设备注册到内核中。注册之前一定要保证编号为138和139的两个端口是可用的。<br />
成功注册之后，系统中便会出现名为led3和led4的两个led_classdev了。由于是用gpio模拟led，所以对gpio-led设置的亮度，只要不是0就是全亮（gpio只有两个状态）。<br />
对于可能睡眠的gpio,gpio-led会借助于工作队列去设置亮度，所以不用担心会被阻塞。</p></blockquote>
<hr />
<p>做完了以上的kernel部分<br />
想要往上讓android系統可以控制光的話, 要使用android光系統</p>
<blockquote><p>
修改:<br />
device/nvidia/common/liblights/lights.c 裡面的<br />
open_lights() 和改寫 set_light_backlight()變成控制LED</p>
<p>修改:<br />
frameworks/base/services/java/com/android/server/BatteryService.java 裡面的<br />
updateLightsLocked() </p></blockquote>
<hr />
<p><strong>參考:</strong><br />
led子系统<br />
<a href="http://blog.csdn.net/yuanlulu/article/details/6438841" target="_blank">http://blog.csdn.net/yuanlulu/article/details/6438841</a></p>
<p>内核中led触发器实例<br />
<a href="http://blog.csdn.net/yuanlulu/article/details/6438847" target="_blank">http://blog.csdn.net/yuanlulu/article/details/6438847</a></p>
]]></content:encoded>
			<wfw:commentRss>http://eeepage.info/linux-led-driver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>關於晚上睡覺打鼾  去看了耳鼻喉科</title>
		<link>http://eeepage.info/sleep-bad/</link>
		<comments>http://eeepage.info/sleep-bad/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 12:43:37 +0000</pubDate>
		<dc:creator>易春木</dc:creator>
				<category><![CDATA[生活就是要快樂]]></category>
		<category><![CDATA[資訊分享]]></category>

		<guid isPermaLink="false">http://eeepage.info/?p=2347</guid>
		<description><![CDATA[我由於這些日子一直有打鼾的困擾, 於是求助於醫生 恍然大悟, 跟鼻子沒有太大的關係 剛進去診間, 醫師問我為什麼要看耳鼻喉科呢? 我說我想晚上打呼的困擾, 由於他是方面的權威, 馬上拿了紙筆跟我說明打鼾的發生原因 也看了我的鼻腔和口腔, 立刻作出判斷是"口腔內的軟顎跟懸壅垂鬆弛所引起" 醫師提了很多種方案, 他建議有兩種 1: 蛋白質無線電波手術的治療(自費) 其中一種是最少苦痛與安全的方式, 就是蛋白質無線電波手術的治療 而且如果有醫療險的話, 可以配合病人的醫療險內容安排住院一天 2: &#8230; <a href="http://eeepage.info/sleep-bad/" class="more-link">Learn more</a>]]></description>
			<content:encoded><![CDATA[<p>我由於這些日子一直有打鼾的困擾, 於是求助於醫生<br />
恍然大悟, 跟鼻子沒有太大的關係</p>
<p><span id="more-2347"></span></p>
<p>剛進去診間, 醫師問我為什麼要看耳鼻喉科呢? 我說我想晚上打呼的困擾,<br />
由於他是方面的權威, 馬上拿了紙筆跟我說明打鼾的發生原因<br />
也看了我的鼻腔和口腔, 立刻作出判斷是"口腔內的軟顎跟懸壅垂鬆弛所引起"</p>
<p>醫師提了很多種方案, 他建議有兩種</p>
<p>1: 蛋白質無線電波手術的治療(自費)<br />
其中一種是最少苦痛與安全的方式, 就是蛋白質無線電波手術的治療<br />
而且如果有醫療險的話, 可以配合病人的醫療險內容安排住院一天</p>
<p>2: 傳統手術的治療(健保給付)<br />
另外的方案, 健保有給付<br />
就是要開刀將軟顎兩側提高, 讓傷口自動癒合<br />
自然就會讓軟顎提高, 可以使呼吸道變大<br />
但是會痛一個多月</p>
<hr />
<strong>網路上看到關於蛋白質<a href="http://hospital.kingnet.com.tw/essay/essay.html?category=%C2%E5%C3%C4%AFe%AFf&#038;pid=6721" target="_blank">無線電波手術的治療</a></strong></p>
<blockquote><p>
<strong>典型的原因</strong><br />
打鼾的原因是我們口腔內的呼吸道組織在睡覺的時候因為肌肉放鬆的關係而產生振動的情況，大部份打鼾是因為我們口腔內的軟顎跟懸壅垂鬆弛所引起，有時是因為我們舌頭根部下垂或舌頭體積過大，此外扁桃腺、腺樣體及鼻塞也會造成打鼾聲音的產生。</p>
<p>打鼾的治療</p>
<p>打鼾的保守性療法包括減輕體重、避免睡前飲酒或服用鎮靜劑，然而大部分的人都因為缺乏恆心或是先 天構造上的差異而宣告失敗。</p>
<p>較直接有效的處理方法是使用手術方式減少多餘的組織及增加組織的張力，將軟顎及懸壅垂加以整型。傳統的打鼾手術(UPPP)需以手術刀切除扁桃腺及軟顎，需全身麻醉、住院，術後傷口較易疼痛。近年來發展的「雷射打鼾手術」以雷射代替傳統刀，可減少住院及全身麻醉之不便，術後的疼痛也較少。另一種使用高科技的新方法──RF無線電波手術，此種手術與傳統手術比較起來，有以下優點：</p>
<p>◎最小疼痛:<br />
無線電波治療系統機乎無疼痛感，傳統的UPPP及LAUP使用手術刀或雷射刀來切除懸壅垂、軟顎或扁桃腺，這種手術因為在口腔內造成較大面積的傷口，因此手術之後病人會感到劇烈的疼痛。</p>
<p>無線電波手術不會造成疼痛的原因，是因為它的無線電波探針具有一個絕緣套來保護手術部位黏膜的表面，保全了黏膜表面，因此不會觸及痛覺神經，且在手術後病患疼痛的程度相當輕微。根據論文的顯示，病人手術後不適的感覺只有不到三天，比較起傳統手術椎心刺骨的疼痛達兩星期之久，實在可說是一大進步。</p>
<p>◎最少出血:<br />
傳統手術刀的手術，在手術後有出血的危險性，雷射手術中的出血危險較小，而RF無線電波手術則完全沒有任何出血的危險，原因是無線電波手術是一種低溫的手術方式。它所採用的是蛋白質凝固的原理，而非傳統的切割，因此它幾乎沒有裸露的傷口面，也不會傷及血管神經，手術時間縮短到可在門診進行。</p>
<p>◎門診治療:<br />
傳統手術刀UPPP的手術，必須住院，而雷射或者是無線電波軟顎手術，均可在門診的情況下治療，符合目前縮短住院天數快速出院的趨勢。因為病人很少願意為了一個改善生活品質的手術，而影響到工作與正常的生活。因此本手術可以充分滿足病人的需求。</p>
<p>RF無線電波手術的治療方式</p>
<p>無線電波手術是在門診及局部麻醉下治療，手術本身通當只要花費十五分鐘的時間。電燒頭獨特的設計與自動溫度控制能夠有效的保護黏膜，手術過後大部分的病人只需要服用一般的止痛劑大約三天左右，在六個星期到八個星期後，病人就感覺會打呼的聲音減少。</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://eeepage.info/sleep-bad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux程式設計教學手冊 Beginning Linux Programming (第四版)</title>
		<link>http://eeepage.info/beginning-linux-programming/</link>
		<comments>http://eeepage.info/beginning-linux-programming/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 05:04:26 +0000</pubDate>
		<dc:creator>易春木</dc:creator>
				<category><![CDATA[IT開發]]></category>
		<category><![CDATA[記事本]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[program]]></category>

		<guid isPermaLink="false">http://eeepage.info/?p=2343</guid>
		<description><![CDATA[這本書的英文原文版在網路上可以下載 (自己google一下吧) 看了書本內容後 覺得這一本可以推薦給初學linux或是想更扎實linux基本功的人使用 不像一般的作業系統(OS)書本那樣理論, 這本書Linux程式設計教學手冊以linux作業系統的實例方式 讓讀者可以更快更精準的進入linux為平台的開發世界 據說原文版已經到第五版了 ... 英文簡介: introduce you to developing programs for Linux and other UIX-style &#8230; <a href="http://eeepage.info/beginning-linux-programming/" class="more-link">Learn more</a>]]></description>
			<content:encoded><![CDATA[<p><img src="https://lh3.googleusercontent.com/-A2j47yr3fHY/TwPcfV7-a3I/AAAAAAAADXY/DC_GtYscT3w/7011d1224746160-beginning-linux-programming-4th-edition-beginning-linux-programming-4th-edition%25255B1%25255D.jpg"><br />
這本書的英文原文版在網路上可以下載 (自己google一下吧)</p>
<p><span id="more-2343"></span></p>
<p>看了書本內容後<br />
覺得這一本可以推薦給初學linux或是想更扎實linux基本功的人使用<br />
不像一般的作業系統(OS)書本那樣理論, 這本書Linux程式設計教學手冊以linux作業系統的實例方式<br />
讓讀者可以更快更精準的進入linux為平台的開發世界</p>
<p>據說原文版已經到第五版了 ...</p>
<p><strong>英文簡介:</strong><br />
introduce you to developing programs for Linux and other UIX-style operating systems. It discusses thoroughly all you need to be a good Linux programmer. The book. written by N Matthew and R Stones. encompasses a gamut of topics including both the basics of compiling programs. linking to libraries. terminal input and output. to more advanced topics like writing applications for the GNOME and KDE. data storing using MySQL, debugging etc. It tells you how to make the most of the standard Linux development tools and how to build graphical user interfaces for the X Windows system. The authors introduce appropriate programming theories for each topic with many practical examples and illustrations.<br />
This is a good book for programmers and developers who want to enhance their skills in Linux to be able to create custom applications. </p>
<p><strong>目錄:</strong></p>
<blockquote><p>第 一 章 Linux介紹<br />
第 二 章 Shell程式設計<br />
第 三 章 檔案處理<br />
第 四 章 Linux的環境<br />
第 五 章 終端機（terminal）<br />
第 六 章 使用curses管理文字視窗<br />
第 七 章 資料管理<br />
第 八 章 MySQL<br />
第 九 章 開發工具<br />
第 十 章 除錯<br />
第十一章 處理程序（process）和信號（signal）<br />
第十二章 POSIX執行緒（thread）<br />
第十三章 處理程序間的通訊：管線（pipe）<br />
第十四章 號誌（semaphore）、共享記憶體（shared memory）、<br />
第十五章 訊息佇列（message queue）<br />
第十六章 網路程式設計：socket<br />
第十七章 使用GTK＋設計GNOME視窗程式<br />
第十八章 使用QT設計KDE視窗程式<br />
第十九章 標準化的Linux
</p></blockquote>
<p><strong>博客來的書本介紹:</strong></p>
<blockquote><p>　基於前三版的成功經驗，第四版仍然延續教學的方式，一步步地引領讀者，讓讀者可以迅速在Linux和Unix相關的作業系統下開發程式。作者本身是相當有經驗的Linux程式設計員，所以讓此書可以涵蓋廣泛的主題，讓讀者暸解Linux的資源，讓讀者可以迅速開發程式。</p>
<p>　　讀者將從基本的主題（編譯程式、聯結函式庫、處理終端機的輸出輸入），最後近入進階主題（設計GNOME和KDE的應用程式、使用MySQL儲存資料和除錯等）。在每個主題中，作者都會先介紹理論，隨即利用真實的程式範例，一步步的說明，引導讀者如何應用和實際開發程式。相信Linux的新鮮人也可以快速地開發出Linux的程式。</p>
<p>從本書您將學到什麼：</p>
<p>*使用標準的Linux C函式庫和其它工具。<br />
*編譯標準的Linux開發工具。<br />
*基本的系統呼叫（system calls）、檔案輸出與輸入、處理程序間通訊（interprocess communication）和shell設計。<br />
*使用GTK+或Qt工具，設計圖形化的使用者介面。<br />
*利用sockets，設計TCP/IP網路程式。<br />
*設計相容於不同Linux發行版本的程式。</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://eeepage.info/beginning-linux-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nvidia 針對 I2C arbitration lost 提出作法  (android / tegra)</title>
		<link>http://eeepage.info/i2c-arbitration-lost/</link>
		<comments>http://eeepage.info/i2c-arbitration-lost/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 09:26:41 +0000</pubDate>
		<dc:creator>易春木</dc:creator>
				<category><![CDATA[IT開發]]></category>
		<category><![CDATA[資訊分享]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[arbitration lost]]></category>
		<category><![CDATA[gpl]]></category>
		<category><![CDATA[i2c]]></category>
		<category><![CDATA[nvidia]]></category>
		<category><![CDATA[tegra]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://eeepage.info/?p=2338</guid>
		<description><![CDATA[一種I2C會發生的issue, arbitration lost的中文可以稱作"仲裁損失" 若是發生這種狀態的話, 有一種workaround的方式處理, 就是將此I2C切換為GPIO 啟用/關閉後, I2C就變正常了 nvidia 也針對這個issue提出作法, 且以GPL授權發布在網路上 &#160; /* * arch/arm/mach-tegra/i2c_error_recovery.c * * Copyright (c) 2011, &#8230; <a href="http://eeepage.info/i2c-arbitration-lost/" class="more-link">Learn more</a>]]></description>
			<content:encoded><![CDATA[<p>一種I2C會發生的issue, arbitration lost的中文可以稱作"仲裁損失"</p>
<p>若是發生這種狀態的話, 有一種workaround的方式處理, 就是將此I2C切換為GPIO 啟用/關閉後, I2C就變正常了</p>
<p><span id="more-2338"></span></p>
<p>nvidia 也針對這個issue提出作法, 且<a href="http://nv-tegra.nvidia.com/gitweb/?p=linux-2.6.git;a=commit;h=c7f57cc760411c030dd0fae88e2b78bf8439791f" target="_blank">以GPL授權發布在網路上</a></p>
<p>&nbsp;</p>
<pre>/*
 * arch/arm/mach-tegra/i2c_error_recovery.c
 *
 * Copyright (c) 2011, NVIDIA Corporation.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */</pre>
<p>&nbsp;</p>
<blockquote><p>
arm: tegra: cardhu: Added I2C arbitration lost recovery mechanism</p>
<p><a href="http://nv-tegra.nvidia.com/gitweb/?p=linux-2.6.git;a=commit;h=c7f57cc760411c030dd0fae88e2b78bf8439791f" target="_blank">連結</a></p>
<p>Added the code for arbitration lost recovery mechanism for i2c<br />
driver and Initialize gpio number for i2c clock and data as<br />
part of platform data.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://eeepage.info/i2c-arbitration-lost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用 git cherry-pick 處理專案 push/pull request</title>
		<link>http://eeepage.info/git-cherry-pick/</link>
		<comments>http://eeepage.info/git-cherry-pick/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 05:57:45 +0000</pubDate>
		<dc:creator>易春木</dc:creator>
				<category><![CDATA[記事本]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[git cherry-pick]]></category>

		<guid isPermaLink="false">http://eeepage.info/?p=2327</guid>
		<description><![CDATA[A-B-C-D-E-F              (master) ......................\ ........................G          (topic) 1: 先切出一個另外的branch (ex: topic) 2: &#8230; <a href="http://eeepage.info/git-cherry-pick/" class="more-link">Learn more</a>]]></description>
			<content:encoded><![CDATA[<p>A-B-C-D-E-F              (master)<br />
......................\<br />
........................G          (topic)</p>
<p><span id="more-2327"></span></p>
<p>1: 先切出一個另外的branch (ex: topic)<br />
2: 在這個branch (ex: topic)上做修改與撰寫程式碼<br />
3: 在這個branch (ex: topic)上作: git add / git commit<br />
4: 切回master 作: git cherry-pick xxxxxxxxxx / git push</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<blockquote><p>
git cherry-pick 321d76f # 只合併特定其中一個 commit。如果要合併多個，可以加上 -n 指令就不會先幫你 commit，這樣可以多 pick幾個要合併的 commit，最後再 git commit 即可。</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://eeepage.info/git-cherry-pick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

