Registers:
Enable Reg: enable the pin as a function or just a GPIO pin.
Direction Reg: I/O, input or output. (defined by hardware)
Output Reg: Activity, activize utility of the GPIO pin when high or low current. (0 or1)
Input Reg: The reg for input data. (device ==> cpu)
Input/Output:
Output: cpu ==> device (ex: led)
Input: device ==> cpu (ex: reset button)
2011-11-23
U-Boot Command 架構
Ex:
int setGpioA(u32 pin, u32 value);
int unknown_GPIO(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) //argc 參數個數
{
if((strcmp(argv[1], "on") == 0) || (strcmp(argv[1], "ON") == 0))
{
setGpioA(10, 0);
}
else if((strcmp(argv[1], "off") == 0) || (strcmp(argv[1], "OFF") == 0))
{
setGpioA(10, 1);
}
return 0;
}
int setGpioA(u32 pin, u32 value)
{
volatile unsigned int reg = 0x01 << pin;
if(value == 1)
{
*((volatile unsigned int *)0x74000000) |= reg; //取暫存器位址之值
printf("ndlndsnlk 0x74000000 %X\n" , reg);
}
else
{
*((volatile unsigned int *)0x74000000) &= ~reg;
}
return 0;
}
U_BOOT_CMD(
unknown, 2, 4, unknown_GPIO,
"Unknown GPIO \n",
""
"input on/off \n"
);
int setGpioA(u32 pin, u32 value);
int unknown_GPIO(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) //argc 參數個數
{
if((strcmp(argv[1], "on") == 0) || (strcmp(argv[1], "ON") == 0))
{
setGpioA(10, 0);
}
else if((strcmp(argv[1], "off") == 0) || (strcmp(argv[1], "OFF") == 0))
{
setGpioA(10, 1);
}
return 0;
}
int setGpioA(u32 pin, u32 value)
{
volatile unsigned int reg = 0x01 << pin;
if(value == 1)
{
*((volatile unsigned int *)0x74000000) |= reg; //取暫存器位址之值
printf("ndlndsnlk 0x74000000 %X\n" , reg);
}
else
{
*((volatile unsigned int *)0x74000000) &= ~reg;
}
return 0;
}
U_BOOT_CMD(
unknown, 2, 4, unknown_GPIO,
"Unknown GPIO \n",
""
"input on/off \n"
);
標籤:
Embedding
2011-11-19
Mosquito Killer
The application emit a very unique high frequency sound (ultra sound) that insects dislike. The pitch of the sound is so high that most humans will not notice anything.
* Not all devices support the high frequency sound
聲音即是一種能量。正常的人耳聽力範圍極限約在20kHz~20000kHz之間,此app能產生人耳聽覺範圍外的超高音頻,利用其能量達到驅趕蚊蟲的功效。
*建議將手機音量調大,以提高功效
*並非所有手機的音訊裝置都支援此超高音頻,正常情況下執行此app,人耳是聽不到聲音的。若執行app時手機發出任何聲音,表示您的手機不支援。
Free Download:
標籤:
My Android Apps
2011-11-17
Epic Task Killer
There are many types of task killer apps on the market, but them usually consume high CPU and memory resource by themselves. Epic Task Killer is the new generation of system management technology, it is very efficient and only consume very low CPU and memory resource. If you often feel your phone runs slowly or battery is exhausted soon, you should install Epic Task Killer.
* High efficiency
* very low CPU and memory resource usage
* Speed up your phone
* Save battery
* very low CPU and memory resource usage
* Speed up your phone
* Save battery
* Frequency Option (Free)
* Security Option (Free)
* Ignore list
* Auto-Task killer with 2 levels
* Easy to use
* Epic
* Security Option (Free)
* Ignore list
* Auto-Task killer with 2 levels
* Easy to use
* Epic
Killable: able to be killed by auto-task kill service
UnKillable: unable to be killed by auto-task service
UnKillable: unable to be killed by auto-task service
1. Kill apps:
Select apps and click "Kill Apps" button.
Select apps and click "Kill Apps" button.
2. Auto-Level:
*Middle: for general usage
*High: for game playing or high efficacy app running
*Middle: for general usage
*High: for game playing or high efficacy app running
3. Refresh running apps:
Click "Refresh" button.
Click "Refresh" button.
4. View app information/execute app:
Click a app of the running app list
Click a app of the running app list
標籤:
My Android Apps
Elegant Torch
This is an original and brightest torch/strobe/flashlight app. Turn phone into a torch. It help find your way in a dark room or the movie theater is that you keep stepping on.
* Brightest
* Simple
* Varied brightness
* Record brightness automatically
* Artistic
* Simple
* Varied brightness
* Record brightness automatically
* Artistic
Free Download:
標籤:
My Android Apps
訂閱:
文章 (Atom)










