root/platform/n/sub/boot_hdr.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. pause
  2. led_on
  3. led_off
  4. blink
  5. CreateTask_spytask

   1 // Powershot N
   2 #include "lolevel.h"
   3 #include "platform.h"
   4 #include "core.h"
   5 #include "dryos31.h"
   6 
   7 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
   8 
   9 const char * const new_sa = &_end;
  10 
  11 extern void task_CaptSeq();
  12 extern void task_InitFileModules();
  13 extern void task_MovieRecord();
  14 extern void task_ExpDrv();
  15 extern void task_FileWrite();
  16 extern void task_TouchPanel();
  17 
  18 /*----------------------------------------------------------------------
  19     Blink - flash power LED a couple of times
  20 -----------------------------------------------------------------------*/
  21 void pause()
  22 {
  23  int i ;
  24  for (i=0; i<1000000; i++) { asm volatile ("nop\n"); }
  25 }
  26 
  27 void led_on() { *(int*)0xc022c30c = ( (*(int*)0xc022c30c) & 0xffffffcf ) | 0x20; }
  28 
  29 void led_off() { *(int*)0xc022c30c = (*(int*)0xc022c30c) & 0xffffffcf; }
  30 
  31 void blink() {
  32    int i ;
  33    for (i=1 ; i < 6 ; i++)
  34    {
  35       led_on() ;
  36       pause() ;
  37       led_off() ;
  38       pause() ;
  39    }
  40 }
  41 
  42 /*----------------------------------------------------------------------
  43     CreateTask_spytask
  44 -----------------------------------------------------------------------*/
  45 void CreateTask_spytask()
  46 {
  47     _CreateTask("SpyTask", 0x19, 0x2000, core_spytask, 0);
  48 }
  49 
  50 /*----------------------------------------------------------------------
  51     boot()
  52 
  53     Main entry point for the CHDK code
  54 -----------------------------------------------------------------------*/
  55 
  56 

/* [<][>][^][v][top][bottom][index][help] */