Lines Matching +full:pwm +full:- +full:number
4 * This application provides functions to get/set fan speed / PWM dutycycle.
44 printf ("Copyright (c) 2009-2015 American Megatrends Inc.\n"); in ShowUsage()
45 printf( "Usage : pwmtachtool <device_id> <command-option> <fannum>\n" ); in ShowUsage()
46 printf( "\t--set-fan-speed: Set Fan's speed. Takes the RPM value as the last argument\n" ); in ShowUsage()
48 …printf( "\t--set-pwm-dutycycle: Set Fan's dutycycle. dutycycle_percentage value should be … in ShowUsage()
49 …printf( "\t--set-pwm-dutycycle-value: Set Fan's dutycycle. dutycycle_value should be between 0 t… in ShowUsage()
51 printf( "\t--get-pwm-dutycycle: Get Fan's dutycycle\n"); in ShowUsage()
52 printf( "\t--get-fan-speed: Get Fan's speed\n" ); in ShowUsage()
53 printf( "\t--verbose: Enable Debug messages\n" ); in ShowUsage()
71 return -1; in process_arguments()
76 if( strcmp( argv[ i ], "--set-fan-speed" ) == 0 ) in process_arguments()
80 printf("need Fan Number and RPM value to process request\n"); in process_arguments()
81 return -1; in process_arguments()
87 else if( strcmp( argv[ i ], "--set-pwm-dutycycle" ) == 0 ) in process_arguments()
91 printf("need Fan Number and Dutycycle value to process request\n"); in process_arguments()
92 return -1; in process_arguments()
98 else if( strcmp( argv[ i ], "--set-pwm-dutycycle-value" ) == 0 ) in process_arguments()
102 printf("need Fan Number and Dutycycle value to process request\n"); in process_arguments()
103 return -1; in process_arguments()
109 else if( strcmp( argv[i], "--get-pwm-dutycycle" ) == 0) in process_arguments()
113 printf("need PWM Number to process request\n"); in process_arguments()
114 return -1; in process_arguments()
120 else if( strcmp( argv[ i ], "--get-fan-speed" ) == 0 ) in process_arguments()
125 return -1; in process_arguments()
131 else if( strcmp( argv[ i ], "--verbose" ) == 0 ) in process_arguments()
154 return -1; in main()
169 if ( -1 == Value ) in main()
172 return -1; in main()
179 if ( -1 == Value) in main()
182 return -1; in main()
188 Verbose ("Inside Set PWM Dutycycle \n"); in main()
190 if ( -1 == Value ) in main()
192 printf ( "Set PWM Dutycycle Failed \n"); in main()
193 return -1; in main()
195 printf ( "Fan PWM set dutycycle Successfully\n"); in main()
198 Verbose ("Inside Set PWM Dutycycle Value\n"); in main()
200 if ( -1 == Value ) in main()
202 printf ( "Set PWM Dutycycle Value Failed \n"); in main()
203 return -1; in main()
205 printf ( "Fan PWM set dutycycle value Successfully\n"); in main()
208 Verbose ("Inside Get PWM Dutycycle \n"); in main()
210 if ( -1 == Value ) in main()
212 printf ( "Set PWM Dutycycle Failed \n"); in main()
213 return -1; in main()
215 printf ( "PWM %d Dutycycle is %d\n",fannum, dutycycle); in main()