summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-07-13 14:26:40 +0700
committerhathach <[email protected]>2018-07-13 14:44:44 +0700
commit584b6f716dca8831b0483641d1a4e779b4bd5694 (patch)
treec2149afe4e010b79f013782d273db2596e742b22 /src
parentffdd925854c3fda233f41c929b5cf115cfdb7a62 (diff)
more clean up
Diffstat (limited to 'src')
-rw-r--r--src/device/usbd.c12
-rw-r--r--src/device/usbd.h8
2 files changed, 9 insertions, 11 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c
index 971f7dd05..33b310d42 100644
--- a/src/device/usbd.c
+++ b/src/device/usbd.c
@@ -323,7 +323,7 @@ static tusb_error_t proc_control_request_st(uint8_t rhport, tusb_control_request
{
TU_ASSERT( len <= CFG_TUD_CTRL_BUFSIZE, TUSB_ERROR_NOT_ENOUGH_MEMORY);
memcpy(_usbd_ctrl_buf, buffer, len);
- usbd_control_xfer_st(rhport, p_request->bmRequestType_bit.direction, (uint8_t*) _usbd_ctrl_buf, len );
+ usbd_control_xfer_st(rhport, p_request->bmRequestType_bit.direction, _usbd_ctrl_buf, len );
}else
{
dcd_control_stall(rhport); // stall unsupported descriptor
@@ -332,7 +332,7 @@ static tusb_error_t proc_control_request_st(uint8_t rhport, tusb_control_request
else if (TUSB_REQ_GET_CONFIGURATION == p_request->bRequest )
{
memcpy(_usbd_ctrl_buf, &_usbd_dev.config_num, 1);
- usbd_control_xfer_st(rhport, p_request->bmRequestType_bit.direction, (uint8_t*) _usbd_ctrl_buf, 1);
+ usbd_control_xfer_st(rhport, p_request->bmRequestType_bit.direction, _usbd_ctrl_buf, 1);
}
else if ( TUSB_REQ_SET_ADDRESS == p_request->bRequest )
{
@@ -452,7 +452,7 @@ static tusb_error_t proc_set_config_req(uint8_t rhport, uint8_t config_number)
}
// invoke callback
- tud_mount_cb(rhport);
+ tud_mount_cb();
return TUSB_ERROR_NONE;
}
@@ -551,7 +551,7 @@ void dcd_bus_event(uint8_t rhport, usbd_bus_event_type_t bus_event)
case USBD_BUS_EVENT_UNPLUGGED:
varclr_(&_usbd_dev);
- tud_umount_cb(rhport); // invoke callback
+ tud_umount_cb(); // invoke callback
break;
case USBD_BUS_EVENT_SUSPENDED:
@@ -632,8 +632,8 @@ void usbd_defer_func(osal_task_func_t func, void* param, bool isr )
{
usbd_task_event_t event =
{
- .rhport = 0,
- .event_id = USBD_EVT_FUNC_CALL,
+ .rhport = 0,
+ .event_id = USBD_EVT_FUNC_CALL,
};
event.func_call.func = func;
diff --git a/src/device/usbd.h b/src/device/usbd.h
index ac577bcef..7fc440637 100644
--- a/src/device/usbd.h
+++ b/src/device/usbd.h
@@ -78,18 +78,16 @@ bool tud_mounted(void);
// APPLICATION CALLBACK
//--------------------------------------------------------------------+
/** \brief Callback function that will be invoked device is mounted (configured) by USB host
- * \param[in] rhport USB Controller ID of the interface
* \note This callback should be used by Application to \b set-up application data
*/
-void tud_mount_cb(uint8_t rhport);
+void tud_mount_cb(void);
/** \brief Callback function that will be invoked when device is unmounted (bus reset/unplugged)
- * \param[in] rhport USB Controller ID of the interface
* \note This callback should be used by Application to \b tear-down application data
*/
-void tud_umount_cb(uint8_t rhport);
+void tud_umount_cb(void);
-//void tud_device_suspended_cb(uint8_t rhport);
+//void tud_device_suspended_cb(void);
#ifdef __cplusplus
}