root/platform/ixus75_sd750/sub/101a/touchw.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. my_touchw_task

   1 /*
   2  * touchw.c - auto-generated by CHDK code_gen.
   3  */
   4 extern int kbd_is_blocked(void);
   5 
   6 /*************************************************************/
   7 //** my_touchw_task @ 0xFFA3B7B4 - 0xFFA3B7EC, length=15
   8 void __attribute__((naked,noinline)) my_touchw_task() {
   9 asm volatile (
  10 "    STMFD   SP!, {R4-R6,LR}\n"
  11 "    BL      sub_FFA3B6AC \n"
  12 "    LDR     R5, =0x895C \n"
  13 "    LDR     R4, =0x56C2C \n"
  14 
  15 "loc_FFA3B7C4:\n"
  16 "    MOV     R1, #0 \n"
  17 "    LDR     R0, [R4] \n"
  18 "    BL      _TakeSemaphore \n"
  19 "    LDR     R2, =0x56C38 \n"
  20 "    LDR     R1, =0x56C6C \n"
  21 // loosely based on ixus860_sd870
  22 "     BL      kbd_is_blocked\n"
  23 "     MOV     R6, R0\n"
  24 "    LDR     R0, [R2] \n"
  25 "    LDR     R3, [R1] \n"
  26 
  27 // if not blocked, use original
  28 "     CMP     R6, #0\n"
  29 "     BEQ     bypass_skip_touch\n"
  30 
  31 // if kbd is blocked, skip touch events
  32 "     CMP     R0, #2\n"
  33 "     CMPEQ   R3, #1\n"
  34 "     BEQ     loc_FFA3B7C4\n"
  35 
  36 "bypass_skip_touch:\n"
  37 
  38 "    ADD     R3, R3, R0, LSL#2 \n"
  39 "    MOV     LR, PC \n"
  40 "    LDR     PC, [R5, R3, LSL#2] \n"
  41 "    B       loc_FFA3B7C4 \n"
  42 );
  43 }

/* [<][>][^][v][top][bottom][index][help] */