powerMgr/src/powerMgrtest.c File Reference

#include <string.h>
#include <unistd.h>
#include <liberipc/eripc.h>
#include <liberipc/eripcpowermgr.h>

Go to the source code of this file.

Functions

int main (int argc, char *argv[])


Function Documentation

int main ( int  argc,
char *  argv[] 
)

Copyright (C) 2005-2008 iRex Technologies B.V. All rights reserved.

Outdated ** if (0 == strcmp(argv[1], "wifi")) { printf("setting wifi to %d\n", atoi(argv[2])); pwrSetWifi(channel, atoi(argv[2])); } Outdated

Definition at line 30 of file powerMgrtest.c.

00031 {
00032     erClientChannel_t channel;
00033 
00034     if (argc < 3)
00035     {
00036         fprintf(stderr, "usage: %s [wifi | audio | cpu ] [0 |1 | #Mhz]\n",
00037                 argv[0]);
00038         return -1;
00039     }
00040 
00041     erIpcStartClient(ER_POWERMGR_CHANNEL, &channel);
00042 
00043     if (0 == strcmp(argv[1], "audio"))
00044     {
00045         printf("setting audio to %d\n", atoi(argv[2]));
00046         pwrSetAC97(channel, atoi(argv[2]));
00047     }
00055     if (0 == strcmp(argv[1], "cpu"))
00056     {
00057         printf("setting cpu speed to %d\n", atoi(argv[2]));
00058   if (argc > 3)
00059           pwrGotoIdleMode(channel, atoi(argv[2]), atoi(argv[3]));
00060   else
00061     pwrGotoIdleMode(channel, atoi(argv[2]), 0);
00062     }
00063     return 0;
00064 }

Here is the call graph for this function:


Generated on Sun Dec 14 17:14:20 2008 by  doxygen 1.5.6