root/platform/a700/lib.c

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

DEFINITIONS

This source file includes following definitions.
  1. get_flash_params_count
  2. shutdown
  3. debug_led

   1 
   2 int get_flash_params_count(void){
   3  return 108;
   4 }
   5 
   6 void shutdown()
   7 {
   8     volatile long *p = (void*)0xc02200a0;
   9         
  10     asm(
  11          "MRS     R1, CPSR\n"
  12          "AND     R0, R1, #0x80\n"
  13          "ORR     R1, R1, #0x80\n"
  14          "MSR     CPSR_cf, R1\n"
  15          :::"r1","r0");
  16         
  17     *p = 0x44;
  18 
  19     while(1);
  20 }
  21 
  22 #define LED_PR 0xc0220084
  23 void debug_led(int state)
  24 {
  25     volatile long *p=(void*)LED_PR;
  26     if (state)
  27         p[0]=0x46;
  28     else
  29         p[0]=0x44;
  30 }

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