summaryrefslogtreecommitdiff
path: root/src/class/msc/msc_host.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-03-17 16:24:43 +0700
committerhathach <[email protected]>2022-03-17 16:24:43 +0700
commit6df420f7f31b4fbf9b95987211e9ed9fef58ac00 (patch)
tree5cff0e3e550e1c6db72311f1941fa617c78beb27 /src/class/msc/msc_host.c
parent68bfd048a54d1ff2def4cb1ee5285eacdb55f143 (diff)
move result into transfer struct
Diffstat (limited to 'src/class/msc/msc_host.c')
-rw-r--r--src/class/msc/msc_host.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/class/msc/msc_host.c b/src/class/msc/msc_host.c
index d8910db0f..ca1080eba 100644
--- a/src/class/msc/msc_host.c
+++ b/src/class/msc/msc_host.c
@@ -358,7 +358,7 @@ bool msch_xfer_cb(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t event, uint32
// MSC Enumeration
//--------------------------------------------------------------------+
-static bool config_get_maxlun_complete (uint8_t dev_addr, tuh_control_xfer_t const * xfer, xfer_result_t result);
+static bool config_get_maxlun_complete (uint8_t dev_addr, tuh_control_xfer_t const * xfer);
static bool config_test_unit_ready_complete(uint8_t dev_addr, msc_cbw_t const* cbw, msc_csw_t const* csw);
static bool config_request_sense_complete(uint8_t dev_addr, msc_cbw_t const* cbw, msc_csw_t const* csw);
static bool config_read_capacity_complete(uint8_t dev_addr, msc_cbw_t const* cbw, msc_csw_t const* csw);
@@ -432,14 +432,12 @@ bool msch_set_config(uint8_t dev_addr, uint8_t itf_num)
return true;
}
-static bool config_get_maxlun_complete (uint8_t dev_addr, tuh_control_xfer_t const * xfer, xfer_result_t result)
+static bool config_get_maxlun_complete (uint8_t dev_addr, tuh_control_xfer_t const * xfer)
{
- (void) xfer;
-
msch_interface_t* p_msc = get_itf(dev_addr);
// STALL means zero
- p_msc->max_lun = (XFER_RESULT_SUCCESS == result) ? _msch_buffer[0] : 0;
+ p_msc->max_lun = (XFER_RESULT_SUCCESS == xfer->result) ? _msch_buffer[0] : 0;
p_msc->max_lun++; // MAX LUN is minus 1 by specs
// TODO multiple LUN support