Well I wanted to know if there is any way by which we can explicitly control power of a device using C code.

Is it possible to write user code to switch on and off devices. Also, certain devices like CPU can operate on diff. freq. Is it possible to control this also thro' user code.

I am newcomer to this field. Please reply with any relevant information.