From 3c2467196070eeedd4171e183db04fb815677246 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 10 Apr 2018 14:31:11 +0700 Subject: mass rename TUSB_CFG to CFG_TUSB --- tinyusb/class/msc/msc_device.c | 6 +++--- tinyusb/class/msc/msc_device.h | 4 ++-- tinyusb/class/msc/msc_host.c | 8 ++++---- tinyusb/class/msc/msc_host.h | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'tinyusb/class/msc') diff --git a/tinyusb/class/msc/msc_device.c b/tinyusb/class/msc/msc_device.c index 3e9008a90..0d7fa4f71 100644 --- a/tinyusb/class/msc/msc_device.c +++ b/tinyusb/class/msc/msc_device.c @@ -38,7 +38,7 @@ #include "tusb_option.h" -#if (MODE_DEVICE_SUPPORTED && TUSB_CFG_DEVICE_MSC) +#if (MODE_DEVICE_SUPPORTED && CFG_TUSB_DEVICE_MSC) #define _TINY_USB_SOURCE_FILE_ //--------------------------------------------------------------------+ @@ -64,7 +64,7 @@ typedef struct { uint8_t scsi_data[64]; ATTR_USB_MIN_ALIGNMENT msc_cbw_t cbw; -#if defined (__ICCARM__) && (TUSB_CFG_MCU == MCU_LPC11UXX || TUSB_CFG_MCU == MCU_LPC13UXX) +#if defined (__ICCARM__) && (CFG_TUSB_MCU == MCU_LPC11UXX || CFG_TUSB_MCU == MCU_LPC13UXX) uint8_t padding1[64-sizeof(msc_cbw_t)]; // IAR cannot align struct's member #endif @@ -79,7 +79,7 @@ typedef struct { uint16_t xferred_len; // numbered of bytes transferred so far in the Data Stage }mscd_interface_t; -TUSB_CFG_ATTR_USBRAM ATTR_USB_MIN_ALIGNMENT STATIC_VAR mscd_interface_t mscd_data; +CFG_TUSB_ATTR_USBRAM ATTR_USB_MIN_ALIGNMENT STATIC_VAR mscd_interface_t mscd_data; //--------------------------------------------------------------------+ // INTERNAL OBJECT & FUNCTION DECLARATION //--------------------------------------------------------------------+ diff --git a/tinyusb/class/msc/msc_device.h b/tinyusb/class/msc/msc_device.h index 8176e7ea6..1d7b11aec 100644 --- a/tinyusb/class/msc/msc_device.h +++ b/tinyusb/class/msc/msc_device.h @@ -64,7 +64,7 @@ * \param[in] rhport USB Controller ID * \param[in] lun Targeted Logical Unit * \param[out] pp_buffer Pointer to buffer which application need to update with the response data's address. - * Must be accessible by USB controller (see \ref TUSB_CFG_ATTR_USBRAM) + * Must be accessible by USB controller (see \ref CFG_TUSB_ATTR_USBRAM) * \param[in] lba Starting Logical Block Address to be read * \param[in] block_count Number of requested block * \retval non-zero Actual number of block that application processed, must be less than or equal to \a \b block_count. @@ -82,7 +82,7 @@ uint16_t tud_msc_read10_cb (uint8_t rhport, uint8_t lun, void** pp_buffer, uint3 * \param[in] rhport USB Controller ID * \param[in] lun Targeted Logical Unit * \param[out] pp_buffer Pointer to buffer which application need to update with the address to hold data from host - * Must be accessible by USB controller (see \ref TUSB_CFG_ATTR_USBRAM) + * Must be accessible by USB controller (see \ref CFG_TUSB_ATTR_USBRAM) * \param[in] lba Starting Logical Block Address to be write * \param[in] block_count Number of requested block * \retval non-zero Actual number of block that application can receive and must be less than or equal to \a \b block_count. diff --git a/tinyusb/class/msc/msc_host.c b/tinyusb/class/msc/msc_host.c index c0b643076..dcdfa4d53 100644 --- a/tinyusb/class/msc/msc_host.c +++ b/tinyusb/class/msc/msc_host.c @@ -38,7 +38,7 @@ #include "tusb_option.h" -#if MODE_HOST_SUPPORTED & TUSB_CFG_HOST_MSC +#if MODE_HOST_SUPPORTED & CFG_TUSB_HOST_MSC #define _TINY_USB_SOURCE_FILE_ @@ -51,13 +51,13 @@ //--------------------------------------------------------------------+ // MACRO CONSTANT TYPEDEF //--------------------------------------------------------------------+ -TUSB_CFG_ATTR_USBRAM STATIC_VAR msch_interface_t msch_data[TUSB_CFG_HOST_DEVICE_MAX]; +CFG_TUSB_ATTR_USBRAM STATIC_VAR msch_interface_t msch_data[CFG_TUSB_HOST_DEVICE_MAX]; //------------- Initalization Data -------------// static osal_semaphore_t msch_sem_hdl; // buffer used to read scsi information when mounted, largest response data currently is inquiry -TUSB_CFG_ATTR_USBRAM ATTR_ALIGNED(4) STATIC_VAR uint8_t msch_buffer[sizeof(scsi_inquiry_data_t)]; +CFG_TUSB_ATTR_USBRAM ATTR_ALIGNED(4) STATIC_VAR uint8_t msch_buffer[sizeof(scsi_inquiry_data_t)]; //--------------------------------------------------------------------+ // INTERNAL OBJECT & FUNCTION DECLARATION @@ -288,7 +288,7 @@ tusb_error_t tuh_msc_write10(uint8_t dev_addr, uint8_t lun, void const * p_buffe //--------------------------------------------------------------------+ void msch_init(void) { - memclr_(msch_data, sizeof(msch_interface_t)*TUSB_CFG_HOST_DEVICE_MAX); + memclr_(msch_data, sizeof(msch_interface_t)*CFG_TUSB_HOST_DEVICE_MAX); msch_sem_hdl = osal_semaphore_create(1, 0); } diff --git a/tinyusb/class/msc/msc_host.h b/tinyusb/class/msc/msc_host.h index 049db97ce..dce275fc8 100644 --- a/tinyusb/class/msc/msc_host.h +++ b/tinyusb/class/msc/msc_host.h @@ -104,7 +104,7 @@ tusb_error_t tuh_msc_get_capacity(uint8_t dev_addr, uint32_t* p_last_lba, uint32 /** \brief Perform SCSI READ 10 command to read data from MassStorage device * \param[in] dev_addr device address * \param[in] lun Targeted Logical Unit - * \param[out] p_buffer Buffer used to store data read from device. Must be accessible by USB controller (see \ref TUSB_CFG_ATTR_USBRAM) + * \param[out] p_buffer Buffer used to store data read from device. Must be accessible by USB controller (see \ref CFG_TUSB_ATTR_USBRAM) * \param[in] lba Starting Logical Block Address to be read * \param[in] block_count Number of Block to be read * \retval TUSB_ERROR_NONE on success @@ -118,7 +118,7 @@ tusb_error_t tuh_msc_read10 (uint8_t dev_addr, uint8_t lun, void * p_buffer, uin /** \brief Perform SCSI WRITE 10 command to write data to MassStorage device * \param[in] dev_addr device address * \param[in] lun Targeted Logical Unit - * \param[in] p_buffer Buffer containing data. Must be accessible by USB controller (see \ref TUSB_CFG_ATTR_USBRAM) + * \param[in] p_buffer Buffer containing data. Must be accessible by USB controller (see \ref CFG_TUSB_ATTR_USBRAM) * \param[in] lba Starting Logical Block Address to be written * \param[in] block_count Number of Block to be written * \retval TUSB_ERROR_NONE on success @@ -132,7 +132,7 @@ tusb_error_t tuh_msc_write10(uint8_t dev_addr, uint8_t lun, void const * p_buffe /** \brief Perform SCSI REQUEST SENSE command, used to retrieve sense data from MassStorage device * \param[in] dev_addr device address * \param[in] lun Targeted Logical Unit - * \param[in] p_data Buffer to store response's data from device. Must be accessible by USB controller (see \ref TUSB_CFG_ATTR_USBRAM) + * \param[in] p_data Buffer to store response's data from device. Must be accessible by USB controller (see \ref CFG_TUSB_ATTR_USBRAM) * \retval TUSB_ERROR_NONE on success * \retval TUSB_ERROR_INTERFACE_IS_BUSY if the interface is already transferring data with device * \retval TUSB_ERROR_DEVICE_NOT_READY if device is not yet configured (by SET CONFIGURED request) -- cgit v1.3.1