//*****************************************************************************
//
//! Shuts down the HID mouse device.
//!
//! \param pvInstance is the pointer to the device instance structure.
//!
//! This function terminates HID mouse operation for the instance supplied
//! and removes the device from the USB bus.  Following this call, the \e
//! pvInstance instance may not me used in any other call to the HID mouse
//! device other than USBDHIDMouseInit().
//!
//! \return None.
//
//*****************************************************************************
void
USBDHIDMouseTerm(void *pvInstance)
{
    tUSBDHIDMouseDevice *psDevice;
    tUSBDHIDDevice *psHIDDevice;

    ASSERT(pvInstance);

    //
    // Get a pointer to the device.
    //
    psDevice = (tUSBDHIDMouseDevice *)pvInstance;

    //
    // Get a pointer to the HID device data.
    //
    psHIDDevice = &psDevice->psPrivateHIDMouseData->sHIDDevice;

    //
    // Mark our device as no longer configured.
    //
    psDevice->psPrivateHIDMouseData->ucUSBConfigured = 0;

    //
    // Terminate the low level HID driver.
    //
    USBDHIDTerm(psHIDDevice);
}
//*****************************************************************************
//
//! Shuts down the HID customhid device.
//!
//! \param pvCustomHidDevice is the pointer to the device instance structure.
//!
//! This function terminates HID customhid operation for the instance supplied
//! and removes the device from the USB bus.  Following this call, the
//! \e pvCustomHidDevice instance may not me used in any other call to the HID
//! customhid device other than USBDHIDCustomHidInit().
//!
//! \return None.
//
//*****************************************************************************
void
USBDHIDCustomHidTerm(void *pvCustomHidDevice)
{
    tUSBDHIDCustomHidDevice *psCustomHidDevice;
    tUSBDHIDDevice *psHIDDevice;

    ASSERT(pvCustomHidDevice);

    //
    // Get a pointer to the device.
    //
    psCustomHidDevice = (tUSBDHIDCustomHidDevice *)pvCustomHidDevice;

    //
    // Get a pointer to the HID device data.
    //
    psHIDDevice = &psCustomHidDevice->sPrivateData.sHIDDevice;

    //
    // Mark our device as no longer configured.
    //
    psCustomHidDevice->sPrivateData.ui8USBConfigured = 0;

    //
    // Terminate the low level HID driver.
    //
    USBDHIDTerm(psHIDDevice);
}
Exemple #3
0
//*****************************************************************************
//
//! Shuts down the HID keyboard device.
//!
//! \param pvKeyboardDevice is the pointer to the device instance structure
//! as returned by USBDHIDKeyboardInit().
//!
//! This function terminates HID keyboard operation for the instance supplied
//! and removes the device from the USB bus.  Following this call, the
//! \e pvKeyboardDevice instance may not me used in any other call to the HID
//! keyboard device other than USBDHIDKeyboardInit().
//!
//! \return None.
//
//*****************************************************************************
void
USBDHIDKeyboardTerm(void *pvKeyboardDevice)
{
    tUSBDHIDKeyboardDevice *psHIDKbDevice;
    tUSBDHIDDevice *psHIDDevice;

    ASSERT(pvKeyboardDevice);

    //
    // Get a pointer to the device.
    //
    psHIDKbDevice = (tUSBDHIDKeyboardDevice *)pvKeyboardDevice;

    //
    // Get a pointer to the HID device data.
    //
    psHIDDevice = &psHIDKbDevice->sPrivateData.sHIDDevice;

    //
    // Mark the device as no shorter configured.
    //
    psHIDKbDevice->sPrivateData.ui8USBConfigured = 0;

    //
    // Terminate the low level HID driver.
    //
    USBDHIDTerm(psHIDDevice);
}
Exemple #4
0
//*****************************************************************************
//
//! Shuts down the HID gamepad device.
//!
//! \param psGamepad is the pointer to the device instance structure
//! as returned by USBDHIDGamepadInit() or USBDHIDGamepadCompositeInit().
//!
//! This function terminates HID gamepad operation for the instance supplied
//! and removes the device from the USB bus.  Following this call, the
//! \e psGamepad instance may not me used in any other call to the HID
//! gamepad device other than to reinitialize by calling USBDHIDGamepadInit()
//! or USBDHIDGamepadCompositeInit().
//!
//! \return None.
//
//*****************************************************************************
void
USBDHIDGamepadTerm(tUSBDHIDGamepadDevice *psGamepad)
{
    tUSBDHIDDevice *psHIDDevice;

    ASSERT(psGamepad);

    //
    // Get a pointer to the HID device data.
    //
    psHIDDevice = &psGamepad->sPrivateData.sHIDDevice;

    //
    // Mark the device as no longer connected.
    //
    psGamepad->sPrivateData.iState = eHIDGamepadStateNotConnected;

    //
    // Terminate the low level HID driver.
    //
    USBDHIDTerm(psHIDDevice);
}