Skip to content

Commit

Permalink
USBDEV: examples/HID_Mouse: remove redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
scpcom committed Dec 5, 2020
1 parent d622810 commit 61f6b0b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 261 deletions.
207 changes: 0 additions & 207 deletions libraries/USBDEV/examples/HID_Mouse/hid_mouse_hw.c

This file was deleted.

46 changes: 1 addition & 45 deletions libraries/USBDEV/examples/HID_Mouse/hid_mouse_it.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ OF SUCH DAMAGE.
*/

#include "drv_usbd_int.h"
#include "drv_usb_hw.h"
#include "gd32vf103_usbd_hw.h"
#include "hid_mouse_it.h"
#include "standard_hid_core.h"
#include "gd32vf103v_eval.h"
Expand All @@ -43,7 +43,6 @@ OF SUCH DAMAGE.
extern usb_core_driver USB_OTG_dev;
extern uint32_t usbfs_prescaler;

void usb_timer_irq(void);
static uint8_t joystate_get(void);
static uint8_t* usbd_mice_pos_get(void);

Expand All @@ -66,17 +65,6 @@ void eclic_mtip_handler(void)
}
}

/*!
\brief this function handles USBD interrupt
\param[in] none
\param[out] none
\retval none
*/
void USBFS_IRQHandler(void)
{
usbd_isr (&USB_OTG_dev);
}

/*!
\brief this function handles EXTI4_IRQ Handler
\param[in] none
Expand Down Expand Up @@ -106,38 +94,6 @@ void KEY_CET_IRQHandler()
}
}

/*!
\brief this function handles USBD wakeup interrupt request.
\param[in] none
\param[out] none
\retval none
*/
void USBFS_WKUP_IRQHandler(void)
{
if (USB_OTG_dev.bp.low_power) {
SystemInit();

rcu_usb_clock_config(usbfs_prescaler);

rcu_periph_clock_enable(RCU_USBFS);

usb_clock_active(&USB_OTG_dev);
}

exti_interrupt_flag_clear(EXTI_18);
}

/*!
\brief this function handles Timer2 updata interrupt request.
\param[in] none
\param[out] none
\retval none
*/
void TIMER2_IRQHandler(void)
{
usb_timer_irq();
}

/*!
\brief get joystick state
\param[in] none
Expand Down
12 changes: 3 additions & 9 deletions libraries/USBDEV/examples/HID_Mouse/hid_mouse_it.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSI
OF SUCH DAMAGE.
*/

#ifndef GD32VF103_IT_H
#define GD32VF103_IT_H
#ifndef HID_MOUSE_IT_H
#define HID_MOUSE_IT_H

#ifdef __cplusplus
extern "C" {
Expand All @@ -50,14 +50,8 @@ typedef enum {
JOY_RIGHT
} joystate_enum;

/* function declarations */
/* this function handles USB wakeup interrupt handler */
void USBFS_WKUP_IRQHandler(void);
/* this function handles USBFS IRQ Handler */
void USBFS_IRQHandler(void);

#ifdef __cplusplus
}
#endif

#endif /* GD32VF103_IT_H */
#endif /* HID_MOUSE_IT_H */

0 comments on commit 61f6b0b

Please sign in to comment.