public void Terminate()
 {
     if (s_initialized && s_device != null)
     {
         s_device.Close();
     }
 }