CHDK_DE Vorschauversion  Trunk Rev. 5429
 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 45 der Datei kbd.c.

49 {
50  /* Initialize our own kbd_new_state[] array with the
51  current physical status.
52  */
56 
57  while (physw_run){
58  _SleepTask(10);
59  if (wrap_kbd_p1_f() == 1){ // autorepeat ?
60  _kbd_p2_f();
61  }
62  }
63  _ExitTask();
64 }
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 67 der Datei kbd.c.

68 {
69  asm volatile(
70  "STMFD SP!, {R1-R5,LR}\n"
71  "MOV R4, #0\n"
72  "BL my_kbd_read_keys\n"
73  "B _kbd_p1_f_cont\n"
74  );
75  return 0; // shut up the compiler
76 }
void _GetKbdState ( long *  buffer)
int Get_JogDial ( void  )

Definiert in Zeile 106 der Datei kbd.c.

106  {
107  return (*(int*)0xC0240104)>>16;
108 }
long get_jogdial_direction ( void  )

Definiert in Zeile 110 der Datei kbd.c.

110  {
111  static int new_jogdial = 0;
112  int old_jogdial = 0;
113 
114  old_jogdial = new_jogdial;
115  new_jogdial = Get_JogDial();
116 
117  if (old_jogdial < new_jogdial)
118  return JOGDIAL_LEFT;
119  else if (old_jogdial > new_jogdial)
120  return JOGDIAL_RIGHT;
121  else
122  return 0;
123 }
int get_usb_bit ( )

Definiert in Zeile 35 der Datei kbd.c.

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

Definiert in Zeile 93 der Datei kbd.c.

93  {
94  // this camera did not have jog_position defined
95  /*
96  if (jogdial_stopped && !n) {
97  // If re-enabling jogdial set the task code current & previous positions to the actual
98  // dial positions so that the change won't get processed by the firmware
99  jog_position[0] = jog_position[2] = rear_dial_position; // Rear dial
100  }
101  */
102  jogdial_stopped = n;
103 }
void kbd_fetch_data ( long *  dst)

Definiert in Zeile 88 der Datei kbd.c.

89 {
91 }
void my_kbd_read_keys ( )

Definiert in Zeile 79 der Datei kbd.c.

80 {
82 
83  _kbd_read_keys_r2(physw_status);
84 
86 }

Variablen-Dokumentation

int jogdial_stopped =0

Definiert in Zeile 33 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_MENU , 0x00002000 },
{ 2, KEY_UP , 0x00000100 },
{ 2, KEY_DOWN , 0x00000200 },
{ 2, KEY_LEFT , 0x00000800 },
{ 2, KEY_RIGHT , 0x00000400 },
{ 2, KEY_SET , 0x00001000 },
{ 1, KEY_PRINT , 0x10000000 },
{ 2, KEY_ERASE , 0x00008000 },
{ 2, KEY_DISPLAY , 0x00004000 },
{ 2, KEY_ZOOM_IN , 0x00000010 },
{ 2, KEY_ZOOM_OUT , 0x00000020 },
{ 2, KEY_SHOOT_FULL, 0x0000000C },
{ 2, KEY_SHOOT_FULL_ONLY, 0x00000008 },
{ 2, KEY_SHOOT_HALF, 0x00000004 },
{ 0, 0, 0 }
}

Definiert in Zeile 10 der Datei kbd.c.