CHDK_DE Vorschauversion  Trunk Rev. 6014
 Alle Datenstrukturen Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Makrodefinitionen
kbd.c-Dateireferenz
#include "lolevel.h"
#include "platform.h"
#include "keyboard.h"
#include "kbd_common.h"
+ Include-Abhängigkeitsdiagramm für kbd.c:

gehe zum Quellcode dieser Datei

Funktionen

void _GetKbdState (long *)
 
void usb_remote_key ()
 
int get_usb_bit ()
 
long __attribute__ ((naked, noinline))
 *-------------------------------------------------------------------— Mehr ...
 
void __attribute__ ((noinline))
 
void jogdial_control (int n)
 
void my_kbd_read_keys ()
 
void kbd_fetch_data (long *dst)
 
long get_jogdial_direction (void)
 

Variablen

long kbd_new_state [3] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF }
 
long kbd_prev_state [3] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF }
 
long kbd_mod_state [3] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF }
 
KeyMap keymap []
 
int jogdial_stopped =0
 
short * jog_position
 *-------------------------------------------------------------------— Mehr ...
 
short rear_dial_position
 
static short new_jogdial = 0
 
static short old_jogdial = 0
 

Dokumentation der Funktionen

long __attribute__ ( (naked, noinline)  )

*-------------------------------------------------------------------—

!!

IS_ERROR( hSoundHandle )

IS_ERROR( RetCode )

IS_ERROR( RetCode )

IS_ERROR( RetCode )

IS_ERROR( RetCode )

"MOV R3, #0\n" "STR R3, [R9]\n"

TODO! below is from sd400

"MOV R3, #0\n" "STR R3, [R9]\n"

TODO! below is from sd400

__MovieRecorder_c__100

__MovieRecorder_c__100

Definiert in Zeile 45 der Datei kbd.c.

45  {
46 
47  //sx170 100a fount @ 0xff81be94
48  asm volatile(
49  "STMFD SP!, {R1-R7,LR}\n"
50  "MOV R5, #0\n"
51  "BL my_kbd_read_keys\n"
52  "B _kbd_p1_f_cont\n"
53  );
54 
55  return 0;
56 }
void __attribute__ ( (noinline)  )

Definiert in Zeile 59 der Datei kbd.c.

59  {
60  while (physw_run){
61  _SleepTask(physw_sleep_delay);
62 
63  if (wrap_kbd_p1_f() == 1){ // autorepeat ?
64  _kbd_p2_f();
65  }
66  }
67 
68  _ExitTask();
69 }
void _GetKbdState ( long *  )
long get_jogdial_direction ( void  )

Definiert in Zeile 99 der Datei kbd.c.

100 {
103 
104  if (old_jogdial < new_jogdial) return JOGDIAL_LEFT;
105  else if (old_jogdial > new_jogdial) return JOGDIAL_RIGHT;
106  else return 0;
107 }
int get_usb_bit ( )

Definiert in Zeile 13 der Datei kbd.c.

13  {
14  long usb_physw[3];
15  usb_physw[USB_IDX] = 0;
16  _kbd_read_keys_r2(usb_physw);
17  return(( usb_physw[USB_IDX] & USB_MASK)==USB_MASK) ;
18 }
void jogdial_control ( int  n)

Definiert in Zeile 76 der Datei kbd.c.

76  {
77  if (jogdial_stopped && !n) {
78  // If re-enabling jogdial set the task code current & previous positions to the actual
79  // dial positions so that the change won't get processed by the firmware
80  jog_position[0] = jog_position[2] = rear_dial_position; // Rear dial
81  }
83 }
void kbd_fetch_data ( long *  dst)

Definiert in Zeile 91 der Datei kbd.c.

92 {
95 }
void my_kbd_read_keys ( )

Definiert in Zeile 85 der Datei kbd.c.

86 {
89 }
void usb_remote_key ( )

Definiert in Zeile 249 der Datei usb_remote.c.

250 {
251  static int pulse_count=0 ;
252 
254 
255  if(conf.remote_enable)
256  {
257  if (usb_state)
258  { // USB power is ON
259  if (remote_mark_count<30000) remote_mark_count++ ; // track how long the USB power is ON
260  if (remote_space_count != 0) // is this the 0 -> 1 transistion?
261  { //
262  usb_buffer_insert(remote_space_count); // insert space length into buffer
263  remote_space_count = 0 ; // reset the counter
264  }
265  }
266  else
267  { // USB power if OFF
268  if(remote_space_count>-30000) remote_space_count-- ; // track how long the USB power is OFF (note space counts are negative)
269  if (remote_mark_count != 0) // is this the 1 -> 0 transistion?
270  { //
271  pulse_count++ ; // count pulses transistions
272  usb_power = remote_mark_count; // transfer most recent pulse length to variable read by scripts
273  usb_buffer_insert(remote_mark_count); // insert pulse length into buffer
274  remote_mark_count = 0; // reset the counter
275  camera_info.state.kbd_last_clicked = 0xFF; // flag the remote key as the last one pressed (for scripts)
276  camera_info.state.kbd_last_clicked_time = get_tick_count(); // store key release time too
277  } //
278  if ((remote_space_count < -50) && (pulse_count > 0)) // pulse counting done if no activity for 50 timer periods
279  {
280  usb_count = pulse_count ;
281  logic_module_usb_count = pulse_count ;
282  pulse_count = 0 ;
283  }
284  }
285  }
286 }

Variablen-Dokumentation

short* jog_position

*-------------------------------------------------------------------—

Definiert in Zeile 48 der Datei boot.c.

int jogdial_stopped =0

Definiert in Zeile 43 der Datei kbd.c.

long kbd_mod_state[3] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF }

Definiert in Zeile 8 der Datei kbd.c.

long kbd_new_state[3] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF }

Definiert in Zeile 6 der Datei kbd.c.

long kbd_prev_state[3] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF }

Definiert in Zeile 7 der Datei kbd.c.

KeyMap keymap[]
Initialisierung:
= {
{ 0, KEY_DISPLAY ,0x80000000 },
{ 1, KEY_DOWN ,0x80000000 },
{ 1, KEY_UP ,0x40000000 },
{ 1, KEY_SHOOT_FULL ,0x30000000 },
{ 1, KEY_SHOOT_FULL_ONLY ,0x20000000 },
{ 1, KEY_SHOOT_HALF ,0x10000000 },
{ 1, KEY_ERASE ,0x08000000 },
{ 1, KEY_MENU ,0x00800000 },
{ 1, KEY_SET ,0x00000001 },
{ 2, KEY_LEFT ,0x00002000 },
{ 2, KEY_RIGHT ,0x00001000 },
{ 2, KEY_ZOOM_IN ,0x00000080 },
{ 2, KEY_ZOOM_OUT ,0x00000040 },
{ 2, KEY_PLAYBACK ,0x00000008 },
{ 2, KEY_VIDEO ,0x00000001 },
{ 0, 0, 0 }
}

Definiert in Zeile 20 der Datei kbd.c.

short new_jogdial = 0
static

Definiert in Zeile 97 der Datei kbd.c.

short old_jogdial = 0
static

Definiert in Zeile 97 der Datei kbd.c.

short rear_dial_position