Robot Control Library
|
Control CPU scaling governer.
<rc/cpu.h>
Functions to read and set the current CPU scaling function. This is not specific to the beaglebone and should work on any linux system, however since the beaglebone has a single cpu core, this only changes the govenor for one core.
Typedefs | |
typedef enum rc_governor_t | rc_governor_t |
Functions | |
int | rc_cpu_set_governor (rc_governor_t gov) |
Sets the CPU governor. See rc_governor_t. More... | |
int | rc_cpu_get_freq (void) |
Returns the current clock speed of the Beaglebone's Sitara processor in the form of the provided enumerated type. It will never return the FREQ_ONDEMAND value as the intention of this function is to see the clock speed as set by either the user or the ondemand governor itself. More... | |
int | rc_cpu_print_freq (void) |
Prints the current frequency to the screen. For example "600mhz". More... | |
enum rc_governor_t |
int rc_cpu_set_governor | ( | rc_governor_t | gov | ) |
Sets the CPU governor. See rc_governor_t.
This is the equivalent to running 'cpufreq-set -g {governor}' from the command line but can be called in your C program instead.
[in] | gov | Desired governor |
int rc_cpu_get_freq | ( | void | ) |
Returns the current clock speed of the Beaglebone's Sitara processor in the form of the provided enumerated type. It will never return the FREQ_ONDEMAND value as the intention of this function is to see the clock speed as set by either the user or the ondemand governor itself.
int rc_cpu_print_freq | ( | void | ) |
Prints the current frequency to the screen. For example "600mhz".