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

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

Definiert in Zeile 141 der Datei kbd_common.c.

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

Definiert in Zeile 201 der Datei kbd_common.c.

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

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.