CHDK_DE Vorschauversion  Trunk Rev. 5249
 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

Makrodefinitionen

#define NEW_SS   (0x2000)
 

Funktionen

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

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 []
 
static char kbd_stack [NEW_SS]
 
int jogdial_stopped =0
 

Makro-Dokumentation

#define NEW_SS   (0x2000)

Definiert in Zeile 37 der Datei kbd.c.

Dokumentation der Funktionen

long __attribute__ ( (naked)  )

Definiert in Zeile 51 der Datei kbd.c.

54 {
55  while (physw_run){
56  _SleepTask(10);
57 
58  if (wrap_kbd_p1_f() == 1){ // autorepeat ?
59  _kbd_p2_f();
60  }
61  }
62 }
void __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 64 der Datei kbd.c.

66 {
67  /* WARNING
68  * Stack pointer manipulation performed here!
69  * This means (but not limited to):
70  * function arguments destroyed;
71  * function CAN NOT return properly;
72  * MUST NOT call or use stack variables before stack
73  * is setup properly;
74  *
75  */
76 
77  register int i;
78  register long *newstack;
79 
80  newstack = (void*)kbd_stack;
81 
82  for (i=0;i<NEW_SS/4;i++)
83  newstack[i]=0xdededede;
84 
85  asm volatile (
86  "MOV SP, %0"
87  :: "r"(((char*)newstack)+NEW_SS)
88  : "memory"
89  );
90 
91  mykbd_task_proceed();
92 
93  /* function can be modified to restore SP here...
94  */
95 
96  _ExitTask();
97 }
void _platformsub_kbd_fetch_data ( long *  )
long get_jogdial_direction ( void  )

Definiert in Zeile 117 der Datei kbd.c.

117  {
118  static int new_jogdial=0, old_jogdial=0;
119 
121  new_jogdial=(*(int*)0xC0240404)>>16;
122  if (old_jogdial<new_jogdial) return JOGDIAL_LEFT;
123  else if (old_jogdial>new_jogdial) return JOGDIAL_RIGHT;
124  else return 0;
125 }
int get_usb_bit ( )

Definiert in Zeile 39 der Datei kbd.c.

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

Definiert in Zeile 143 der Datei kbd.c.

143  {
144  // this camera did not have jog_position defined
145  /*
146  if (jogdial_stopped && !n) {
147  // If re-enabling jogdial set the task code current & previous positions to the actual
148  // dial positions so that the change won't get processed by the firmware
149  jog_position[0] = jog_position[2] = rear_dial_position; // Rear dial
150  }
151  */
152  jogdial_stopped = n;
153 }
void kbd_fetch_data ( long *  dst)

Definiert in Zeile 138 der Datei kbd.c.

139 {
141 }
void my_kbd_read_keys ( )

Definiert in Zeile 129 der Datei kbd.c.

130 {
132 
133  _kbd_read_keys_r2(physw_status);
134 
136 }

Variablen-Dokumentation

int jogdial_stopped =0

Definiert in Zeile 127 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.

char kbd_stack[NEW_SS]
static

Definiert in Zeile 48 der Datei kbd.c.

KeyMap keymap[]
Initialisierung:
= {
{ 1, KEY_UP , 0x00040000 },
{ 1, KEY_DOWN , 0x00100000 },
{ 1, KEY_LEFT , 0x00020000 },
{ 1, KEY_RIGHT , 0x00080000 },
{ 1, KEY_SET , 0x00200000 },
{ 0, KEY_SHOOT_FULL , 0x0000C000 },
{ 0, KEY_SHOOT_FULL_ONLY , 0x00008000 },
{ 0, KEY_SHOOT_HALF , 0x00004000 },
{ 1, KEY_ZOOM_IN , 0x00000001 },
{ 1, KEY_ZOOM_OUT , 0x00000002 },
{ 1, KEY_MENU , 0x08000000 },
{ 1, KEY_DISPLAY , 0x10000000 },
{ 1, KEY_PRINT , 0x00000010 },
{ 1, KEY_ERASE , 0x20000000 },
{ 1, KEY_EXPO_CORR , 0x04000000 },
{ 1, KEY_ISO , 0x00040000 },
{ 1, KEY_FLASH , 0x00080000 },
{ 1, KEY_MF , 0x00100000 },
{ 1, KEY_MACRO , 0x00020000 },
{ 1, KEY_MICROPHONE , 0x00000020 },
{ 0, 0, 0 }
}

Definiert in Zeile 10 der Datei kbd.c.