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

int get_usb_bit ()
 
void _GetKbdState (long *buffer)
 
long __attribute__ ((naked))
 
long __attribute__ ((naked, noinline))
 *-------------------------------------------------------------------— Mehr ...
 
void my_kbd_read_keys ()
 
void kbd_fetch_data (long *dst)
 
void jogdial_control (int n)
 
int Get_JogDial (void)
 
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
 

Dokumentation der Funktionen

long __attribute__ ( (naked)  )

Definiert in Zeile 46 der Datei kbd.c.

50 {
51  (void)ua; (void)ub; (void)uc; (void)ud; (void)ue; (void)uf;
52 
53  /* Initialize our own kbd_new_state[] array with the
54  current physical status.
55  */
59 
60  while (physw_run){
61  _SleepTask(10);
62 
63  if (wrap_kbd_p1_f() == 1){ // autorepeat ?
64  _kbd_p2_f();
65  }
66  }
67  /* function can be modified to restore SP here...
68  */
69  _ExitTask();
70 
71 }
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 73 der Datei kbd.c.

74 {
75  // Modified to reflect sx150 code @FF8345D0
76  asm volatile(
77  "STMFD SP!, {R1-R7,LR}\n"
78  "MOV R5, #0\n"
79  "BL my_kbd_read_keys\n"
80  "B _kbd_p1_f_cont\n"
81  );
82 
83  return 0; // shut up the compiler
84 }
void _GetKbdState ( long *  buffer)
int Get_JogDial ( void  )

Definiert in Zeile 114 der Datei kbd.c.

114  {
115  return (*(int*)0xC0240104)>>16;
116 }
long get_jogdial_direction ( void  )

Definiert in Zeile 119 der Datei kbd.c.

119  {
120  static int new_jogdial = 0;
121  int old_jogdial = 0;
122 
123  old_jogdial = new_jogdial;
124  new_jogdial = Get_JogDial();
125 
126  if (old_jogdial < new_jogdial)
127  return JOGDIAL_LEFT;
128  else if (old_jogdial > new_jogdial)
129  return JOGDIAL_RIGHT;
130  else
131  return 0;
132 }
int get_usb_bit ( )

Definiert in Zeile 36 der Datei kbd.c.

37 {
38  long usb_physw[3];
39  usb_physw[USB_IDX] = 0;
40  _kbd_read_keys_r2(usb_physw);
41  return(( usb_physw[USB_IDX] & USB_MASK)==USB_MASK) ;
42 }
void jogdial_control ( int  n)

Definiert in Zeile 102 der Datei kbd.c.

102  {
103  // this camera did not have jog_position defined
104  /*
105  if (jogdial_stopped && !n) {
106  // If re-enabling jogdial set the task code current & previous positions to the actual
107  // dial positions so that the change won't get processed by the firmware
108  jog_position[0] = jog_position[2] = rear_dial_position; // Rear dial
109  }
110  */
111  jogdial_stopped = n;
112 }
void kbd_fetch_data ( long *  dst)

Definiert in Zeile 96 der Datei kbd.c.

97 {
99 }
void my_kbd_read_keys ( )

Definiert in Zeile 87 der Datei kbd.c.

88 {
90 
91  _kbd_read_keys_r2(physw_status);
92 
94 }

Variablen-Dokumentation

int jogdial_stopped =0

Definiert in Zeile 34 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:
= {
{ 2, KEY_VIDEO , 0x00000010 },
{ 2, KEY_PRINT , 0x00000040 },
{ 2, KEY_PLAYBACK , 0x00000040 },
{ 2, KEY_UP , 0x00000100 },
{ 2, KEY_DOWN , 0x00000200 },
{ 2, KEY_RIGHT , 0x00000400 },
{ 2, KEY_LEFT , 0x00000800 },
{ 2, KEY_SET , 0x00001000 },
{ 2, KEY_MENU , 0x00002000 },
{ 2, KEY_DISPLAY , 0x00004000 },
{ 2, KEY_ERASE , 0x00008000 },
{ 1, KEY_ZOOM_IN , 0x00004000 },
{ 1, KEY_ZOOM_OUT , 0x00008000 },
{ 1, KEY_SHOOT_FULL, 0x00003000 },
{ 1, KEY_SHOOT_FULL_ONLY, 0x00002000 },
{ 1, KEY_SHOOT_HALF, 0x00001000 },
{ 0, 0, 0 }
}

Definiert in Zeile 10 der Datei kbd.c.