Changeset 345


Ignore:
Timestamp:
03/25/08 08:03:49 (5 years ago)
Author:
cail
Message:

reworking feather (touch wheel on ixus) to work universally via task suspend.
requires taskSuspend, taskResume, taskNameToId

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/camera.h

    r343 r345  
    3131    #undef  CAM_SHOW_OSD_IN_SHOOT_MENU      // On some cameras Canon shoot menu has additional functionality and useful in this case to see CHDK OSD in this mode   
    3232    #define CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO  1 // Camera can unlock optical zoom in video (if it is locked) 
     33    #undef  CAM_FEATURE_FEATHER             // Cameras with "feather" or touch wheel. 
    3334 
    3435    #undef  CAM_CONSOLE_LOG_ENABLED         // Development: internal camera stdout -> A/stdout.txt 
     36 
    3537 
    3638//---------------------------------------------------------- 
     
    265267    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1 
    266268    #undef  CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO 
     269    #define CAM_FEATURE_FEATHER         1 
    267270 
    268271    #define CAM_CONSOLE_LOG_ENABLED     1 
  • trunk/platform/ixus65_sd630/kbd.c

    r316 r345  
    88#define NEW_SS (0x2000) 
    99#define SD_READONLY_FLAG (0x20000) 
    10  
    11 #define FEATURE_FEATHER 1 
    1210 
    1311typedef struct { 
     
    9694} 
    9795 
    98 #if FEATURE_FEATHER 
    99 extern int touch_keys_angle; 
    100 extern int * touch_keys_sema; 
    101 int touch_keys_sema_stored; 
     96#if CAM_FEATURE_FEATHER 
     97//extern int touch_keys_angle; 
    10298#endif 
    10399 
     
    116112    kbd_new_state[1] = physw_status[1]; 
    117113    kbd_new_state[2] = physw_status[2]; 
     114 
     115    static int taskFeatherID = 0; 
     116 
     117    if (taskFeatherID == 0) { 
     118        taskFeatherID = taskNameToId("tFeather"); 
     119        printf("taskFeatherID:%x\n", taskFeatherID); 
     120    } 
     121 
     122 
    118123 
    119124/* 
     
    151156    if (kbd_process() == 0){ 
    152157        // leave it ... 
    153 #if FEATURE_FEATHER 
    154         if (*touch_keys_sema == 0) { 
    155             *touch_keys_sema = touch_keys_sema_stored; 
    156         } 
     158#if CAM_FEATURE_FEATHER 
     159        taskResume(taskFeatherID); 
    157160#endif 
    158161    } else { 
    159162        // Drop platform keys to none, and simulate ordered key presses 
    160163        physw_status[2] = (physw_status[2] & (~KEY_MASK)) | (kbd_mod_state & KEY_MASK); 
    161 #if FEATURE_FEATHER 
    162         if (*touch_keys_sema != 0) { 
    163             touch_keys_sema_stored = *touch_keys_sema; 
    164             *touch_keys_sema = 0; 
    165         } 
     164#if CAM_FEATURE_FEATHER 
     165        taskSuspend(taskFeatherID); 
     166 
    166167        // We still need this sema when simulating key presses 
    167168        if (kbd_mod_state != KEY_MASK) { 
    168             *touch_keys_sema = touch_keys_sema_stored; 
    169         } 
     169            taskResume(taskFeatherID); 
     170        } 
     171 
    170172#endif 
    171173    } 
  • trunk/platform/ixus65_sd630/sub/100a/stubs_entry_2.S

    r343 r345  
    2424 
    2525 
    26 NHSTUB(taskName, 0xFFB22A50) 
    27 NHSTUB(taskIdListGet, 0xFFB22B58) 
    28  
     26NSTUB(taskName, 0xFFB22A50) 
     27NSTUB(taskIdListGet, 0xFFB22B58) 
     28NSTUB(taskResume, 0xFFB22E34) 
     29NSTUB(taskSuspend, 0xFFB22C60) 
     30NSTUB(taskNameToId, 0xFFB22A74) 
    2931 
    3032// These two are indistinguishable!!!! 
  • trunk/platform/ixus65_sd630/sub/100a/stubs_min.S

    r343 r345  
    2020// Could be retrieved from 'PhySW' Task function 
    2121DEF(touch_keys_angle, 0x0000E8C8) 
    22 // Semaphore address to disable Feather processing 
    23 DEF(touch_keys_sema, 0x0000E874) 
    24  
    25  
    2622 
    2723DEF(zoom_busy, 0x79E20) 
Note: See TracChangeset for help on using the changeset viewer.