00001 #include <stdio.h>
00002 #include <stdlib.h>
00003 #include <unistd.h>
00004 #include <fcntl.h>
00005 #include <errno.h>
00006 #include "io.h"
00007 #include "i2c.h"
00008
00009
00010 #define P0_MODULE 0x00000001 //these controlled by CTRL
00011 #define P1_MODULE 0x00000002
00012 #define P2_MODULE 0x00000004
00013 #define P3_MODULE 0x00000008
00014 #define P4_MODULE 0x00000010
00015 #define P5_MODULE 0x00000020
00016 #define P6_MODULE 0x00000040
00017 #define P7_MODULE 0x00000080
00018 #define LR_MODULE 0x00000100
00019 #define PR1_MODULE 0x00000200
00020 #define PR2_MODULE 0x00000400
00021 #define USB_MODULE 0x00000800
00022 #define SIO_MODULE 0x00001000
00023 #define CLK_MODULE 0x00002000
00024 #define DEBUG_MODULE 0x00004000
00025 #define GSM_MODULE 0x00008000 //these controlled by EIO
00026 #define GPS_MODULE 0x00010000
00027 #define WS_MODULE 0x00020000
00028 #define SYSTEM 0x80000000
00029
00030 extern int PWRSysEnable(void);
00031 extern int PWRSysDisable(void);
00032 extern long PWRDevStatus(void);
00033 extern int PWRDevControl(unsigned long);
00034 extern int PWRDevEnable(unsigned long);
00035 extern int PWRDevDisable(unsigned long);