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

static int tt565_init ( RIG rig )

Basically, it just sets up *priv.

Parameters:
rig
Returns:
RIG_OK or < 0

Definition at line 199 of file orion.c.

References tt565_priv_data::ch, rig_state::priv, RIG_ENOMEM, RIG_OK, RIG_VFO_A, rig::state, and tt565_priv_data::vfo_curr.

{
      struct tt565_priv_data *priv;
      priv = (struct tt565_priv_data*)malloc(sizeof(struct tt565_priv_data));
      if (!priv) { return -RIG_ENOMEM; } /* no memory available */
      memset(priv, 0, sizeof(struct tt565_priv_data));
      priv->ch = 0; /* set arbitrary initial status */
      priv->vfo_curr = RIG_VFO_A;         
      rig->state.priv = (rig_ptr_t)priv;
      return RIG_OK;
}

Generated by  Doxygen 1.6.0   Back to index