🎨 Macros for optional arguments (#21969)
This commit is contained in:
committed by
Scott Lahteine
parent
61f2bb1228
commit
e75c3b6c54
@@ -956,12 +956,6 @@ uint8_t BulkOnly::HandleUsbError(uint8_t error, uint8_t index) {
|
||||
return ((error && !count) ? MASS_ERR_GENERAL_USB_ERROR : MASS_ERR_SUCCESS);
|
||||
}
|
||||
|
||||
#if MS_WANT_PARSER
|
||||
uint8_t BulkOnly::Transaction(CommandBlockWrapper *pcbw, uint16_t buf_size, void *buf) {
|
||||
return Transaction(CommandBlockWrapper *pcbw, uint16_t buf_size, void *buf, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* For driver use only.
|
||||
*
|
||||
@@ -972,9 +966,7 @@ uint8_t BulkOnly::HandleUsbError(uint8_t error, uint8_t index) {
|
||||
* @return
|
||||
*/
|
||||
uint8_t BulkOnly::Transaction(CommandBlockWrapper *pcbw, uint16_t buf_size, void *buf
|
||||
#if MS_WANT_PARSER
|
||||
, uint8_t flags
|
||||
#endif
|
||||
OPTARG(MS_WANT_PARSER, uint8_t flags/*=0*/)
|
||||
) {
|
||||
#if MS_WANT_PARSER
|
||||
uint16_t bytes = (pcbw->dCBWDataTransferLength > buf_size) ? buf_size : pcbw->dCBWDataTransferLength;
|
||||
|
@@ -553,10 +553,7 @@ private:
|
||||
bool IsValidCSW(CommandStatusWrapper *pcsw, CommandBlockWrapperBase *pcbw);
|
||||
|
||||
uint8_t ClearEpHalt(uint8_t index);
|
||||
#if MS_WANT_PARSER
|
||||
uint8_t Transaction(CommandBlockWrapper *cbw, uint16_t bsize, void *buf, uint8_t flags);
|
||||
#endif
|
||||
uint8_t Transaction(CommandBlockWrapper *cbw, uint16_t bsize, void *buf);
|
||||
uint8_t Transaction(CommandBlockWrapper *cbw, uint16_t bsize, void *buf OPTARG(MS_WANT_PARSER, uint8_t flags=0));
|
||||
uint8_t HandleUsbError(uint8_t error, uint8_t index);
|
||||
uint8_t HandleSCSIError(uint8_t status);
|
||||
};
|
||||
|
Reference in New Issue
Block a user