set_bus_speed function

The set_bus_speed function specifies the bus speed. If an invalid bus speed is requested, this function should return a failure and leave the bus speed unchanged. The prototype for this function is:

int set_bus_speed(
      void *hdl,
      unsigned int speed,
      unsigned int *ospeed );

The arguments are:

hdl
The handle returned by the init function.
speed
The bus speed. The units are implementation-defined.
ospeed
NULL, or a pointer to a location where the function should store the actual bus speed.

The function must return:

0
Success.
-1
Failure.