Logo Search packages:      
Sourcecode: hamlib version File versions  Download package

int HAMLIB_API rot_cleanup ( ROT rot  ) 

release a rot handle and free associated memory

rot The ROT handle of the radio to be closed
Releases a rot struct which port has eventualy been closed already with rot_close().

RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rot_init(), rot_close()

Definition at line 444 of file rotator.c.

References rot::caps, rot_state::comm_state, RIG_DEBUG_VERBOSE, RIG_EINVAL, RIG_OK, rot_caps::rot_cleanup, rot_close(), rot_debug, and rot::state.

      rot_debug(RIG_DEBUG_VERBOSE,"rot:rot_cleanup called \n");

      if (!rot || !rot->caps)
            return -RIG_EINVAL;

       * check if they forgot to close the rot
      if (rot->state.comm_state)

       * basically free up the priv struct 
      if (rot->caps->rot_cleanup)


      return RIG_OK;

Generated by  Doxygen 1.6.0   Back to index