SAMV71 Xplained Ultra Software Package 1.3

uhi_msc.h File Reference

USB host driver for Mass Storage Class interface. More...

#include "conf_usb_host.h"
#include "MSD.h"
#include "SBC.h"
#include "MSDescriptors.h"
#include "USBH.h"
#include "uhi.h"

Go to the source code of this file.

Data Structures

struct  uhi_msc_lun_t
 LUN structure information. More...

Defines

#define UHI_MSC

Functions

bool uhi_msc_is_available (void)
 Tests if the interface UHI Mass Storage is available The UHI Mass Storage can be busy during the enumeration of a USB Device MSC.
uint8_t uhi_msc_get_lun (void)
 Gives the number of LUN available Note: A LUN can be available, but with a status LUN_NOT_PRESENT. It is the case for a card reader without card.
Functions required by UHC

USBH_enum_status_t uhi_msc_install (USBH_device_t *dev)
void uhi_msc_enable (USBH_device_t *dev)
void uhi_msc_uninstall (USBH_device_t *dev)
Functions to access at LUNs

uhi_msc_lun_tuhi_msc_get_lun_desc (uint8_t lun)
 Gives information about a LUN.
bool uhi_msc_scsi_test_unit_ready (uint8_t lun, uhi_msc_scsi_callback_t callback)
 Checks and update the status of the LUN.
bool uhi_msc_scsi_read_10 (uint8_t lun, uint32_t addr, uint8_t *ram, uint8_t nb_sector, uhi_msc_scsi_callback_t callback)
 Reads a LUN data section to RAM buffer Note: The sector size used to define the data section is the sector size returned by LUN in field.
bool uhi_msc_scsi_write_10 (uint8_t lun, uint32_t addr, const uint8_t *ram, uint8_t nb_sector, uhi_msc_scsi_callback_t callback)
 Writes a RAM buffer in a LUN data section Note: The sector size used to define the data section is the sector size returned by LUN in field.

Struct to access at Logical Unit Numbers (LUNs)



enum  lun_status_t { LUN_GOOD = 0, LUN_FAIL = 1, LUN_NOT_PRESENT = 2, LUN_BUSY = 3 }
 

Status of LUN.

More...
typedef void(* uhi_msc_scsi_callback_t )(bool)
 Callback type used by uhi_msc_scsi() functions.

Detailed Description

USB host driver for Mass Storage Class interface.

Copyright (C) 2011-2015 Atmel Corporation. All rights reserved.

Definition in file uhi_msc.h.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines