您的位置:首页 > 其它

MTK MMI 简介:

2010-06-24 14:49 417 查看
1. 入口函数: Goto_Main_Menu

2. 打印函数以及更新LCD函数

A. Gui_print_text(L "hello world"); L表示转换成Unicode;

B. Gui_BLT_double_buffer(0,0,Devicewidth-1,DeviceHeight-1);

如果只有Print而没有Double_buffer,那么LCD将得不到更新;

3. 文本输出的地址和颜色处理:

A. Clear_screen();

B. Gui_move_text_cursor(50,100);

C. Gui_set_text_color(UI_COLOR_RED);

注意:文本属性是针对整个系统的,而且不会有默认值,所以每次必须由程序员设置;

4. MTK程序的流转是进入新程序,从而退出老程序,不然老程序还会起作用

EntryNewScreen(Main_Menu_ScreenID,Null,Null,Null)

5. 但是状态条是属于常驻程序,为了关掉它,可以使用:

Entry_Full_Screen();

6. 关于Entry_New_Screen函数

EntryNewScreen(U16 newscrnID, FuncPtr newExitHandler, FuncPtr
newEntryHandler, void * flag),
当第三个参数为空时,该newscrnID不会加入History,可以用手工的方式加入History,
函数是AddHistory();

7. 关于修改SIM卡识别号码位数:

在nvram_user_config.c中,修改如下的变量即可:

NVRAM_EF_PHB_COMPARE_DIGIT_DEFAULT[]={0x0B/0x8/0x7}

8. 默认语言的设置

在文件custom/app/lcbj26_05c_bb/Nvram_cust_pack.c中,数组NVRAM_CACHE_BYTE_DEFAULT[NVRAM_CACHE_SIZE]记录一些默认值。

const
kal_uint8 NVRAM_CACHE_BYTE_DEFAULT[NVRAM_CACHE_SIZE]={

......

#if defined(__L365503__)||defined(__L361E04__)

0x00,
//NVRAM_SETTING_LANG,//17

#else

0x01,
//NVRAM_SETTING_LANG,//17



#endif

}

上红色标记的就是设置默认语言的, 对现在的MP100来说, 0x01表示默认语言是中文,而0X00是英语

9. Trace工具的使用:

1). JTAG

i). CUSTOM_CFLAGS = -g # custom
flag <project.MAK>

ii).
还有Application_Initialize函数里面

WDT_Enable(KAL_TRUE);改成

WDT_Enable(KAL_FALSE);

2).
mask 掉gprs: 在V800_06A_PCB04_gprs_MT6228_S02_nocode.cmm (不支持gprs)

;menu.reprogram gprs

3).把Build文件下面的elf文件拷贝到代码的根目录下面。

4). 运行:i).
先开Trace32;开机target;

ii). [file]/[edit Batchfile]: 最新生成的cmm文件;

iii). 按[开机键]并一直按着, [DO]之后[Go];

10. 关于Cather和PS口UART1的配置:

in file:nvram_common_config.c

NVRAM_EF_PORT_SETTING_DEFAULT

#if defined(__ONLY_ONE_UART__) || defined(__MMI_DUAL_SIM__)

99,
/* tst-ps uses uart_null(value is 99 (0x63)) */

0, /* APP uses
uart_port1 (value is 0) */

#else

0,// 1, /* tst-ps uses
uart_port2(value is 1) */

1, //0, /* APP uses uart_port1 (value is 0)
*/

#endif

#if defined(__ONLY_ONE_UART__) || defined(__MMI_DUAL_SIM__)

99, /* tst-l1 uart port, same as tst-ps*/

#else

0, //1, /* tst-l1 uart port, same as
tst-ps*/

#endif

115200, /* tst-l1 baud rate,
same as tst-ps, 115200 = 0x0001C200 */

0, /*
tst output mode*/

0 /* usb logging mode */

0, /* tst-ps uses uart_port2(value is 1) */

1, /* APP uses uart_port1
(value is 0) */

0, /* tst-l1 uart port, same as tst-ps*/

1,0,1改为0,1,0即可。

转载:http://jiahuixin22.blog.163.com/blog/static/225137472009722102059851/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: