Changeset 330


Ignore:
Timestamp:
03/15/08 08:56:07 (5 years ago)
Author:
fingalo
Message:

+Added remote control for ixus700_sd500

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/platform/ixus700_sd500/kbd.c

    r251 r330  
    11#include "lolevel.h" 
    22#include "platform.h" 
     3#include "conf.h" 
    34#include "core.h" 
    45#include "keyboard.h" 
     
    1617static long last_kbd_key = 0; 
    1718static int usb_power=0; 
     19static int remote_key, remote_count; 
    1820 
    1921#define NEW_SS (0x2000) 
     
    246248 // for clear USB power flag  - return status &~USB_MASK; 
    247249 // for get USB power flag read status & USB_MASK 
     250         
     251        if (conf.remote_enable) { 
     252                remote_key = (status & USB_MASK)==USB_MASK; 
     253                if (remote_key)  
     254                        remote_count += 1; 
     255                else if (remote_count) { 
     256                        usb_power = remote_count; 
     257                        remote_count = 0; 
     258                } 
     259                return status &~USB_MASK; 
     260        } 
    248261 return status; 
     262} 
     263 
     264int get_usb_power(int edge) 
     265{ 
     266        int x; 
     267 
     268        if (edge) return remote_key; 
     269        x = usb_power; 
     270        usb_power = 0; 
     271        return x; 
    249272} 
    250273 
     
    272295}; 
    273296 
    274 int get_usb_power(int edge) {return usb_power;} 
Note: See TracChangeset for help on using the changeset viewer.