![]() |
![]() |
Data Structures | |
struct | Cpu_Attrs |
Attributes used to create a Cpu. More... | |
Typedefs | |
typedef struct Cpu_Object * | Cpu_Handle |
Handle through which to reference a Cpu descriptor. | |
Enumerations | |
enum | Cpu_Device { Cpu_Device_DM355 = 0, Cpu_Device_DM365, Cpu_Device_DM368, Cpu_Device_DM6446, Cpu_Device_DM6467, Cpu_Device_DM6437, Cpu_Device_OMAP3530, Cpu_Device_OMAPL137, Cpu_Device_OMAPL138, Cpu_Device_DM3730, Cpu_Device_COUNT } |
Types of devices which a Cpu may be part of. More... | |
Functions | |
Cpu_Handle | Cpu_create (Cpu_Attrs *attrs) |
Creates a Cpu descriptor. | |
Int | Cpu_getDevice (Cpu_Handle hCpu, Cpu_Device *device) |
Get the device type the application is running on. | |
Char * | Cpu_getDeviceName (Cpu_Device device) |
Get the string name of a certain device type. | |
Int | Cpu_getLoad (Cpu_Handle hCpu, Int *cpuLoad) |
Get the current load from the Cpu. | |
Int | Cpu_delete (Cpu_Handle hCpu) |
Delete the Cpu descriptor. | |
Variables | |
const Cpu_Attrs | Cpu_Attrs_DEFAULT |
Default attributes for a Cpu. |
#include <xdc/std.h> #include <ti/sdo/dmai/Cpu.h> #include <ti/sdo/dmai/Dmai.h> Cpu_Device device; Int load; Cpu_Handle hCpu; Cpu_Attrs cpuAttrs = Cpu_Attrs_DEFAULT; Dmai_init(); hCpu = Cpu_create(&cpuAttrs); Cpu_getDevice(hCpu, &device); Cpu_getLoad(hCpu, &load); printf("Device type is %s and cpu is loaded %d%%\n", Cpu_getDeviceName(device), load); Cpu_delete(hCpu);
typedef struct Cpu_Object* Cpu_Handle |
Handle through which to reference a Cpu descriptor.
enum Cpu_Device |
Types of devices which a Cpu may be part of.
Cpu_Handle Cpu_create | ( | Cpu_Attrs * | attrs | ) |
Creates a Cpu descriptor.
[in] | attrs | Cpu_Attrs to use for creating the Cpu descriptor. |
Handle | for use in subsequent operations (see Cpu_Handle). | |
NULL | for failure. |
Int Cpu_getDevice | ( | Cpu_Handle | hCpu, | |
Cpu_Device * | device | |||
) |
Get the device type the application is running on.
[in] | hCpu | The Cpu_Handle of the Cpu to get the type of. If NULL is passed in the type will be determined anyway, but it will take longer. |
[out] | device | The Cpu_Device is returned here. |
Dmai_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
Char* Cpu_getDeviceName | ( | Cpu_Device | device | ) |
Get the string name of a certain device type.
[in] | device | The Cpu_Device to get the string name of. |
Null terminated string | describing the Cpu. |
Int Cpu_getLoad | ( | Cpu_Handle | hCpu, | |
Int * | cpuLoad | |||
) |
Get the current load from the Cpu.
[in] | hCpu | The Cpu_Handle to get the cpu load from. |
[out] | cpuLoad | The cpu load is returned here. |
Dmai_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
Int Cpu_delete | ( | Cpu_Handle | hCpu | ) |
Delete the Cpu descriptor.
[in] | hCpu | The Cpu_Handle to the descriptor to delete. |
Dmai_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
const Cpu_Attrs Cpu_Attrs_DEFAULT |
Default attributes for a Cpu.