Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Подсветка:
- #define BACKLIGHT_BASE_STEP 80
- #define BACKLIGHT_MIN_VALUE 10
- void T3_PWMBL_CTR(int vla, int state)
- {
- //背光强度控制
- unsigned int TC103_PWMBL_TBL[16]={0x08,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x80,0x90,0xa0,0xb0,0xc0,0xd0,0xe8,0xff};
- unsigned char tData[2];
- int blvalue=vla;
- bl_level=vla;
- if(enable3d==0) {
- blvalue = vla-BACKLIGHT_BASE_STEP; # C040B934
- if(blvalue < BACKLIGHT_MIN_VALUE) # C040B93C
- blvalue=BACKLIGHT_MIN_VALUE; # C040B940
- } else {
- if(blvalue<BACKLIGHT_BASE_STEP) # C040B958
- blvalue=BACKLIGHT_BASE_STEP; # C040B960
- }
- if (state) {
- if(twx_tc103_bl_i2c_client) {
- tData[0]=0x42;
- tData[1] = 0x00;
- twx_i2c_write(twx_tc103_bl_i2c_client,tData,2);
- tData[0]=0x43;
- tData[1] = blvalue;//TC103_DBL_TBL[vla];
- twx_i2c_write(twx_tc103_bl_i2c_client,tData,2);
- printk( "tc103 set backlight leve %d\n",blvalue);
- }
- }
- }
- RAM:C040B92C ; =============== S U B R O U T I N E =======================================
- RAM:C040B92C
- RAM:C040B92C
- RAM:C040B92C T3_PWMBL_CTR ; CODE XREF: RAM:C040B9FCp
- RAM:C040B92C ; T2_Panel3DLense+94p ...
- RAM:C040B92C
- RAM:C040B92C var_A = -0xA
- RAM:C040B92C var_9 = -9
- RAM:C040B92C
- RAM:C040B92C LDR R3, =dword_C0978A58
- RAM:C040B930 STMFD SP!, {R4,LR}
- RAM:C040B934 SUB R4, R0, #0x50
- RAM:C040B938 LDR R2, [R3]
- RAM:C040B93C CMP R4, #0xA
- RAM:C040B940 MOVLT R4, #0xA
- RAM:C040B944 LDR R12, =unk_C08061A8
- RAM:C040B948 SUB SP, SP, #8
- RAM:C040B94C CMP R2, #0
- RAM:C040B950 STR R0, [R12,#(dword_C0806364 - 0xC08061A8)]
- RAM:C040B954 BEQ loc_C040B964
- RAM:C040B958 CMP R0, #0x50
- RAM:C040B95C MOVGE R4, R0
- RAM:C040B960 MOVLT R4, #0x50
- RAM:C040B964
- RAM:C040B964 loc_C040B964 ; CODE XREF: T3_PWMBL_CTR+28j
- RAM:C040B964 CMP R1, #0
- RAM:C040B968 BEQ loc_C040B978
- RAM:C040B96C LDR R0, [R3,#0x10]
- RAM:C040B970 CMP R0, #0
- RAM:C040B974 BNE loc_C040B980
- RAM:C040B978
- RAM:C040B978 loc_C040B978 ; CODE XREF: T3_PWMBL_CTR+3Cj
- RAM:C040B978 ; T3_PWMBL_CTR+94j
- RAM:C040B978 ADD SP, SP, #8
- RAM:C040B97C LDMFD SP!, {R4,PC}
- RAM:C040B980 ; ---------------------------------------------------------------------------
- RAM:C040B980
- RAM:C040B980 loc_C040B980 ; CODE XREF: T3_PWMBL_CTR+48j
- RAM:C040B980 ADD R1, SP, #0x10+var_A
- RAM:C040B984 MOV R3, #0x42
- RAM:C040B988 STRB R3, [SP,#0x10+var_A]
- RAM:C040B98C MOV R3, #0
- RAM:C040B990 STRB R3, [SP,#0x10+var_9]
- RAM:C040B994 BL twx_i2c_write.constprop.4
- RAM:C040B998 LDR R3, =dword_C0978A58
- RAM:C040B99C ADD R1, SP, #0x10+var_A
- RAM:C040B9A0 STRB R4, [SP,#0x10+var_9]
- RAM:C040B9A4 LDR R0, [R3,#(dword_C0978A68 - 0xC0978A58)]
- RAM:C040B9A8 MOV R3, #0x43
- RAM:C040B9AC STRB R3, [SP,#0x10+var_A]
- RAM:C040B9B0 BL twx_i2c_write.constprop.4
- RAM:C040B9B4 MOV R1, R4
- RAM:C040B9B8 LDR R0, =aTc103SetBackli ; "tc103 set backlight leve %d\n"
- RAM:C040B9BC BL printk
- RAM:C040B9C0 B loc_C040B978
- RAM:C040B9C0 ; End of function T3_PWMBL_CTR
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement