CHDK_DE Vorschauversion  Trunk Rev. 5456
 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 125 der Datei kbd_common.c.

126 {
130 
131 #ifdef CAM_TOUCHSCREEN_UI
133 #endif
134 
135  // note assumed kbd_pwr_on has been called if needed
137 
138 #ifdef CAM_HAS_GPS
139  if (gps_key_trap > 0) // check if gps code is waiting for a specific key press to cancel shutdown
140  {
142  {
144  kbd_key_press(0);
145  gps_key_trap = -1; // signal the gps task that the specified button was pressed
146  msleep(1000); // pause to allow button release so Canon f/w does not see the press
147  }
148  }
149 #endif
150 
151  long status = kbd_process();
152  if (status == 0){
153  // leave it alone...
154  physw_status[0] = kbd_new_state[0];
155  physw_status[1] = kbd_new_state[1];
156  physw_status[2] = kbd_new_state[2];
157 
158 #ifdef CAM_HAS_JOGDIAL
159  jogdial_control(0);
160 #endif
161  } else {
162  // override keys
163  // TODO doesn't handle inverted logic yet
165 
167 
169 
170 #ifdef CAM_HAS_JOGDIAL
172  jogdial_control(1);
174  }
176  jogdial_control(0);
177  }
178 #endif
179  }
180  return status;
181 }
void kbd_update_physw_bits ( void  )

Definiert in Zeile 185 der Datei kbd_common.c.

186 {
187  if (conf.remote_enable) {
188 #ifdef CAM_REMOTE_MULTICHANNEL
189  switch(conf.remote_input_channel)
190  {
191  case REMOTE_INPUT_USB:
193  break;
194  #ifdef CAM_REMOTE_HDMI_HPD
197  break;
198  #endif
199  #ifdef CAM_REMOTE_ANALOG_AV
202  break;
203  #endif
204  }
205 #else
207 #endif
208  }
209  // TODO could save the real USB bit to avoid low level calls in get_usb_bit when immediate update not needed
210  if (forced_usb_port) {
212  }
213 // workaround for crashes switching between analog AV out and native display
214 #ifdef ANALOG_AV_FLAG
215  static long prev_analog_av_state = 0; // default to not present
216  long new_analog_av_state = get_analog_av_physw_mod();
217  if(new_analog_av_state != prev_analog_av_state) {
218  draw_suspend(1000);
219  prev_analog_av_state = new_analog_av_state;
220  }
221 #endif
222 // microsd cams don't have a read only bit
223 #ifndef KBD_SKIP_READONLY_BIT
225 #endif
226 
227 // n and possibly other micro SD cams uses door bit for autoboot, force back to closed (?)
228 #ifdef SD_DOOR_OVERRIDE
229  physw_status[SD_DOOR_IDX] |= SD_DOOR_FLAG; // override SD card door switch
230 #endif
231 
232 #ifdef OPT_RUN_WITH_BATT_COVER_OPEN
234 #endif
235 
236 #ifdef CAM_HOTSHOE_OVERRIDE
237  if (conf.hotshoe_override == 1) {
239  } else if (conf.hotshoe_override == 2) {
241  }
242 #endif
243 }

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.