CHDK_DE Vorschauversion  Trunk Rev. 6014
 Alle Datenstrukturen Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Makrodefinitionen
lib.c-Dateireferenz
#include "platform.h"
#include "platform_palette.h"
#include "lolevel.h"
+ Include-Abhängigkeitsdiagramm für lib.c:

gehe zum Quellcode dieser Datei

Makrodefinitionen

#define LED_PR   0xc02200BC
 

Funktionen

void vid_bitmap_refresh ()
 
void shutdown ()
 
void debug_led (int state)
 
int get_flash_params_count (void)
 
void camera_set_led (int led, int state, __attribute__((unused)) int bright)
 
void JogDial_CW (void)
 
void JogDial_CCW (void)
 
void load_chdk_palette ()
 
int vid_get_palette_type ()
 
int vid_get_palette_size ()
 
void * vid_get_bitmap_active_buffer ()
 
void * vid_get_bitmap_active_palette ()
 

Makro-Dokumentation

#define LED_PR   0xc02200BC

Definiert in Zeile 28 der Datei lib.c.

Dokumentation der Funktionen

void camera_set_led ( int  led,
int  state,
__attribute__((unused)) int  bright 
)

Definiert in Zeile 44 der Datei lib.c.

44  {
45  static char led_table[]={0, // green
46  1, // orange, right
47  2, // yellow, left
48  3, // power
49  // 4,5,6,7,
50  8, // blue
51  9 // af
52  };
53  if((unsigned)led < sizeof(led_table))
54  _LEDDrive(led_table[led], state<=1 ? !state : state);
55 // _LEDDrive(led_table[led%sizeof(led_table)], state<=1 ? !state : state);
56 }
void debug_led ( int  state)

Definiert in Zeile 30 der Datei lib.c.

31 {
32  volatile long *p=(void*)LED_PR;
33  if (state)
34  p[0]=0x46;
35  else
36  p[0]=0x44;
37 }
int get_flash_params_count ( void  )

Definiert in Zeile 39 der Datei lib.c.

39  {
40  return 120; // ? _sub_FF962AB8__PropertyTableManagerCore_c__6, similar to s5is
41 }
void JogDial_CCW ( void  )

Definiert in Zeile 63 der Datei lib.c.

63  {
64  _PostLogicalEventForNotPowerType(0x875, 1); // RotateJogDialLeft
65 }
void JogDial_CW ( void  )

Definiert in Zeile 59 der Datei lib.c.

59  {
60  _PostLogicalEventForNotPowerType(0x874, 1); // RotateJogDialRight
61 }
void load_chdk_palette ( )

Definiert in Zeile 68 der Datei lib.c.

68  {
69 
70  extern int active_palette_buffer;
71  // Only load for the standard record and playback palettes
72  if ((active_palette_buffer == 0) || (active_palette_buffer == 1))
73  {
74  int *pal = (int*)vid_get_bitmap_active_palette();
75  if (pal[CHDK_COLOR_BASE+0] != 0x33ADF62)
76  {
77  pal[CHDK_COLOR_BASE+0] = 0x33ADF62; // Red
78  pal[CHDK_COLOR_BASE+1] = 0x326EA40; // Dark Red
79  pal[CHDK_COLOR_BASE+2] = 0x34CD57F; // Light Red
80  pal[CHDK_COLOR_BASE+3] = 0x373BFAE; // Green
81  pal[CHDK_COLOR_BASE+4] = 0x34BD6CA; // Dark Green
82  pal[CHDK_COLOR_BASE+5] = 0x395AB95; // Light Green
83  pal[CHDK_COLOR_BASE+6] = 0x34766F0; // Blue
84  pal[CHDK_COLOR_BASE+7] = 0x31250F3; // Dark Blue
85  pal[CHDK_COLOR_BASE+8] = 0x37F408F; // Cyan
86  pal[CHDK_COLOR_BASE+9] = 0x3512D5B; // Magenta
87  pal[CHDK_COLOR_BASE+10] = 0x3A9A917; // Yellow
88  pal[CHDK_COLOR_BASE+11] = 0x3819137; // Dark Yellow
89  pal[CHDK_COLOR_BASE+12] = 0x3DED115; // Light Yellow
90  pal[CHDK_COLOR_BASE+13] = 0x0090000; // Transparent dark grey
91 
92  //extern char palette_control;
93  //palette_control = 1;
95  }
96  }
97 }
void shutdown ( )

Definiert in Zeile 11 der Datei lib.c.

12 {
13  volatile long *p = (void*)0xc022001C; // from task_by (not really complete)
14 
15  asm(
16  "MRS R1, CPSR\n"
17  "AND R0, R1, #0x80\n"
18  "ORR R1, R1, #0x80\n"
19  "MSR CPSR_cf, R1\n"
20  :::"r1","r0");
21 
22  *p = 0x44;
23 
24  while(1);
25 }
void vid_bitmap_refresh ( )

Definiert in Zeile 5 der Datei lib.c.

6 {
7  _ScreenLock();
9 }
void* vid_get_bitmap_active_buffer ( )

Definiert in Zeile 103 der Datei lib.c.

104 {
105  return (void*)(*(int*)(0x7d98+0x14)); //"Add: %p Width : %ld Hight : %ld", sub_ff8ea82c
106 }
void* vid_get_bitmap_active_palette ( )

Definiert in Zeile 108 der Datei lib.c.

109 {
110  extern int active_palette_buffer;
111  extern char** palette_buffer_ptr;
112  return (palette_buffer_ptr[active_palette_buffer]+16);
113 }
int vid_get_palette_size ( )

Definiert in Zeile 101 der Datei lib.c.

101 { return 256*4; }
int vid_get_palette_type ( )

Definiert in Zeile 100 der Datei lib.c.

100 { return 3; }