CHDK_DE Vorschauversion  Trunk Rev. 5537
 Alle Datenstrukturen Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Makrodefinitionen
kbd_common.h-Dateireferenz
#include "platform_kbd.h"
+ Include-Abhängigkeitsdiagramm für kbd_common.h:
+ Dieser Graph zeigt, welche Datei direkt oder indirekt diese Datei enthält:

gehe zum Quellcode dieser Datei

Datenstrukturen

struct  KeyMap
 

Funktionen

long kbd_update_key_state (void)
 
void kbd_update_physw_bits (void)
 
void kbd_fetch_data (long *data)
 
void jogdial_control (int n)
 

Variablen

KeyMap keymap []
 
long kbd_new_state []
 
long kbd_mod_state []
 
long kbd_prev_state []
 
int jogdial_stopped
 

Dokumentation der Funktionen

void jogdial_control ( int  n)

Definiert in Zeile 84 der Datei kbd.c.

85 {
87 }
void kbd_fetch_data ( long *  data)

Definiert in Zeile 123 der Datei kbd.c.

124 {
125  volatile long *mmio0 = (void*)0xc0220200;
126  volatile long *mmio1 = (void*)0xc0220204;
127  volatile long *mmio2 = (void*)0xc0220208;
128 
129  dst[0] = *mmio0;
130  dst[1] = *mmio1;
131  dst[2] = *mmio2 & 0xffff;
132 }
long kbd_update_key_state ( void  )

Definiert in Zeile 140 der Datei kbd_common.c.

141 {
145 
146 #ifdef CAM_TOUCHSCREEN_UI
148 #endif
149 
150  // note assumed kbd_pwr_on has been called if needed
152 
153 #ifdef CAM_HAS_GPS
154  if (gps_key_trap > 0) // check if gps code is waiting for a specific key press to cancel shutdown
155  {
157  {
159  kbd_key_press(0);
160  gps_key_trap = -1; // signal the gps task that the specified button was pressed
161  msleep(1000); // pause to allow button release so Canon f/w does not see the press
162  }
163  }
164 #endif
165 
166  long status = kbd_process();
167  if (status == 0){
168  // leave it alone...
169  physw_status[0] = kbd_new_state[0];
170  physw_status[1] = kbd_new_state[1];
171  physw_status[2] = kbd_new_state[2];
172 
173 #ifdef CAM_HAS_JOGDIAL
174  jogdial_control(0);
175 #endif
176  } else {
177  // override keys
178  // TODO doesn't handle inverted logic yet
180 
182 
184 
185 #ifdef CAM_HAS_JOGDIAL
187  jogdial_control(1);
189  }
191  jogdial_control(0);
192  }
193 #endif
194  }
195  return status;
196 }
void kbd_update_physw_bits ( void  )

Definiert in Zeile 200 der Datei kbd_common.c.

201 {
202  if (conf.remote_enable) {
203 #ifdef CAM_REMOTE_MULTICHANNEL
204  switch(conf.remote_input_channel)
205  {
206  case REMOTE_INPUT_USB:
208  break;
209  #ifdef CAM_REMOTE_HDMI_HPD
212  break;
213  #endif
214  #ifdef CAM_REMOTE_ANALOG_AV
217  break;
218  #endif
219  }
220 #else
222 #endif
223  }
224  // TODO could save the real USB bit to avoid low level calls in get_usb_bit when immediate update not needed
225  if (forced_usb_port) {
227  }
228 #ifdef ANALOG_AV_FLAG
229  // 1 force on, 2 = force off, other = don't touch
230  if (forced_analog_av == 1) {
232  } else if(forced_analog_av == 2) {
234  }
235 
236 // workaround for crashes switching between analog AV out and native display
237  static long prev_analog_av_state = 0; // default to not present
238  long new_analog_av_state = get_analog_av_physw_mod();
239  if(new_analog_av_state != prev_analog_av_state) {
240  draw_suspend(1000);
241  prev_analog_av_state = new_analog_av_state;
242  }
243 #endif
244 // microsd cams don't have a read only bit
245 #ifndef KBD_SKIP_READONLY_BIT
247 #endif
248 
249 // n and possibly other micro SD cams uses door bit for autoboot, force back to closed (?)
250 #ifdef SD_DOOR_OVERRIDE
251  physw_status[SD_DOOR_IDX] |= SD_DOOR_FLAG; // override SD card door switch
252 #endif
253 
254 #ifdef OPT_RUN_WITH_BATT_COVER_OPEN
256 #endif
257 
258 #ifdef CAM_HOTSHOE_OVERRIDE
259  if (conf.hotshoe_override == 1) {
261  } else if (conf.hotshoe_override == 2) {
263  }
264 #endif
265 }

Variablen-Dokumentation

int jogdial_stopped

Definiert in Zeile 81 der Datei kbd.c.

long kbd_mod_state[]

Definiert in Zeile 8 der Datei kbd.c.

long kbd_new_state[]

Definiert in Zeile 6 der Datei kbd.c.

long kbd_prev_state[]

Definiert in Zeile 7 der Datei kbd.c.

KeyMap keymap[]

Definiert in Zeile 10 der Datei kbd.c.