CHDK_DE Vorschauversion  Trunk Rev. 5234
 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 _LogCameraEvent (int id, const char *fmt,...)
 
int get_usb_bit ()
 
long __attribute__ ((naked, noinline))
 *-------------------------------------------------------------------— Mehr ...
 
void __attribute__ ((noinline))
 
int _get_dial_hw_position (int dial)
 
int get_dial_hw_position (int dial)
 
int get_jogdial_counter ()
 
long get_jogdial_direction (void)
 
int handle_jogdial ()
 
void jogdial_control (int c)
 
void my_kbd_read_keys ()
 
void kbd_fetch_data (long *dst)
 

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
 
long dial_positions [4]
 
long jog_hw_pos
 
static long * odst
 

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

ASM1989 -> In sx200:FF857190 //"Mounter.c"

ASM1989 -> In sx200:FF81B284 // DebugAssert

Definiert in Zeile 57 der Datei kbd.c.

57  {
58 
59  asm volatile(
60  "push {r1-r7, lr}\n"
61  "movs r4, #0\n"
62  "bl my_kbd_read_keys\n"
63  "b _kbd_p1_f_cont\n"
64  );
65 
66  return 0;
67 }
void __attribute__ ( (noinline)  )

Definiert in Zeile 70 der Datei kbd.c.

70  {
71  extern void kbd_p2_f_my();
72  while (physw_run) {
73  _SleepTask(physw_sleep_delay);
74 
75  if (wrap_kbd_p1_f() == 1) {
76  kbd_p2_f_my(); // replacement of _kbd_p2_f (in sub/<fwver>/boot.c)
77  }
78  }
79 
80  _ExitTask();
81 }
int _get_dial_hw_position ( int  dial)
void _GetKbdState ( long *  )
void _LogCameraEvent ( int  id,
const char *  fmt,
  ... 
)
int get_dial_hw_position ( int  dial)

Definiert in Zeile 88 der Datei kbd.c.

89 {
90  // mask low bits
91  return _get_dial_hw_position(dial)&~3;
92 }
int get_jogdial_counter ( )

Definiert in Zeile 96 der Datei kbd.c.

96  {
97  int p;
98  p = get_dial_hw_position(5);
99 // _LogCameraEvent(0x20,"jd: p: %08x %08x ",jog_hw_pos, p);
100 // p = jog_hw_pos & 0x7fffc;
101 /*
102  if (p > 0x3fffc) {
103  p |= 0xfff80000;
104  }
105 */
106  return p;
107 }
long get_jogdial_direction ( void  )

Definiert in Zeile 108 der Datei kbd.c.

108  {
109  static int new_jogdial=0, old_jogdial=0 ;
110 
112  new_jogdial=get_jogdial_counter();
113 
114 // _LogCameraEvent(0x20,"gjdd: f:%08x %08x", old_jogdial, new_jogdial );
115  if (old_jogdial>new_jogdial) return JOGDIAL_RIGHT;
116  else if (old_jogdial<new_jogdial) return JOGDIAL_LEFT;
117  else return 0;
118 }
int get_usb_bit ( )

Definiert in Zeile 15 der Datei kbd.c.

15  {
16  long usb_physw[3];
17  usb_physw[USB_IDX] = 0;
18  _kbd_read_keys_r2(usb_physw);
19  return(( usb_physw[USB_IDX] & USB_MASK)==USB_MASK) ;
20 }
int handle_jogdial ( )

Definiert in Zeile 119 der Datei kbd.c.

119  {
120  // return 0 to prevent fw dial handler
121 // _LogCameraEvent(0x20,"hjd: %i %08x", jogdial_stopped, dial_positions[0]);
122  if (jogdial_stopped) {
123  // update positions in RAM
125 
126  return 0;
127  }
128  return 1;
129 }
void jogdial_control ( int  c)

Definiert in Zeile 131 der Datei kbd.c.

131  {
132  jogdial_stopped = c;
133 }
void kbd_fetch_data ( long *  dst)

Definiert in Zeile 140 der Datei kbd.c.

141 {
142  _GetKbdState(dst);
144 // if (dst[0] != 0x00077fff || dst[1] != 0x20808030 || dst[2] != 0x1480043e ) {
145  // _LogCameraEvent(0x20,"kb: %08x %08x %08x", dst[0], dst[1], dst[2]);
146  // }
147 }
void my_kbd_read_keys ( )

Definiert in Zeile 135 der Datei kbd.c.

135  {
138 }

Variablen-Dokumentation

long dial_positions[4]
long jog_hw_pos
int jogdial_stopped = 0

Definiert in Zeile 86 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_SHOOT_FULL ,0x00040001 },
{ 0, KEY_SHOOT_HALF ,0x00040000 },
{ 0, KEY_SHOOT_FULL_ONLY ,0x00000001 },
{ 0, KEY_VIDEO ,0x00000008 },
{ 0, KEY_MENU ,0x00000010 },
{ 0, KEY_UP ,0x00000020 },
{ 0, KEY_DOWN ,0x00000040 },
{ 0, KEY_RIGHT ,0x00000080 },
{ 0, KEY_LEFT ,0x00000100 },
{ 0, KEY_SET ,0x00000200 },
{ 0, KEY_ERASE ,0x00000400 },
{ 0, KEY_WIFI ,0x00002000 },
{ 0, KEY_FACE ,0x00000800 },
{ 0, KEY_PRINT ,0x00004000 },
{ 0, KEY_FRAMING_ASSIST ,0x00000002 },
{ 0, KEY_ZOOM_ASSIST ,0x00000004 },
{ 0, KEY_PLAYBACK ,0x00010000 },
{ 2, KEY_ZOOM_OUT ,0x00000008 },
{ 2, KEY_ZOOM_OUT ,0x00000018 },
{ 2, KEY_ZOOM_OUT ,0x00000010 },
{ 2, KEY_ZOOM_IN ,0x00000002 },
{ 2, KEY_ZOOM_IN ,0x00000006 },
{ 2, KEY_ZOOM_IN ,0x00000004 },
{ 0, 0, 0 }
}

Definiert in Zeile 29 der Datei kbd.c.

long* odst
static

Definiert in Zeile 139 der Datei kbd.c.