USBH: add helper macros to MSD, FTDI, AOA

This commit is contained in:
Diego Ismirlian 2019-09-30 17:47:30 -03:00
parent 0c260638da
commit 77021bb646
3 changed files with 4 additions and 2 deletions

View File

@ -130,6 +130,7 @@ typedef bool (*usbhaoa_filter_callback_t)(usbh_device_t *dev, const uint8_t *des
#define usbhaoaGetState(aoap) ((aoap)->state)
#define usbhaoaGetChannelState(aoap) ((aoap)->channel.state)
#define usbhaoaGetHost(aoap) ((aoap)->dev->host)
/*===========================================================================*/
/* External declarations. */

View File

@ -127,7 +127,7 @@ struct USBHFTDIDriver {
/* Driver macros. */
/*===========================================================================*/
#define usbhftdipGetState(ftdipp) ((ftdipp)->state)
#define usbhftdipGetHost(ftdipp) ((ftdipp)->ftdip->dev->host)
/*===========================================================================*/
/* External declarations. */

View File

@ -72,7 +72,6 @@ struct USBHMassStorageLUNDriver {
/* Driver macros. */
/*===========================================================================*/
/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/
@ -95,6 +94,8 @@ extern "C" {
bool usbhmsdLUNGetInfo(USBHMassStorageLUNDriver *lunp, BlockDeviceInfo *bdip);
bool usbhmsdLUNIsInserted(USBHMassStorageLUNDriver *lunp);
bool usbhmsdLUNIsProtected(USBHMassStorageLUNDriver *lunp);
USBHDriver *usbhmsdLUNGetHost(const USBHMassStorageLUNDriver *lunp);
#ifdef __cplusplus
}
#endif