rename CFG_TUSB_HOST_DEVICE_MAX to CFG_TUH_DEVICE_MAX
This commit is contained in:
@@ -51,7 +51,7 @@ typedef struct {
|
||||
//--------------------------------------------------------------------+
|
||||
// INTERNAL OBJECT & FUNCTION DECLARATION
|
||||
//--------------------------------------------------------------------+
|
||||
static cdch_data_t cdch_data[CFG_TUSB_HOST_DEVICE_MAX];
|
||||
static cdch_data_t cdch_data[CFG_TUH_DEVICE_MAX];
|
||||
|
||||
static inline cdch_data_t* get_itf(uint8_t dev_addr)
|
||||
{
|
||||
@@ -146,7 +146,7 @@ bool tuh_cdc_set_control_line_state(uint8_t dev_addr, bool dtr, bool rts, tuh_co
|
||||
//--------------------------------------------------------------------+
|
||||
void cdch_init(void)
|
||||
{
|
||||
tu_memclr(cdch_data, sizeof(cdch_data_t)*CFG_TUSB_HOST_DEVICE_MAX);
|
||||
tu_memclr(cdch_data, sizeof(cdch_data_t)*CFG_TUH_DEVICE_MAX);
|
||||
}
|
||||
|
||||
bool cdch_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *itf_desc, uint16_t max_len)
|
||||
|
||||
@@ -40,10 +40,10 @@
|
||||
//--------------------------------------------------------------------+
|
||||
#define RNDIS_MSG_PAYLOAD_MAX (1024*4)
|
||||
|
||||
CFG_TUSB_MEM_SECTION static uint8_t msg_notification[CFG_TUSB_HOST_DEVICE_MAX][8];
|
||||
CFG_TUSB_MEM_SECTION static uint8_t msg_notification[CFG_TUH_DEVICE_MAX][8];
|
||||
CFG_TUSB_MEM_SECTION TU_ATTR_ALIGNED(4) static uint8_t msg_payload[RNDIS_MSG_PAYLOAD_MAX];
|
||||
|
||||
static rndish_data_t rndish_data[CFG_TUSB_HOST_DEVICE_MAX];
|
||||
static rndish_data_t rndish_data[CFG_TUH_DEVICE_MAX];
|
||||
|
||||
// TODO Microsoft requires message length for any get command must be at least 4096 bytes
|
||||
|
||||
@@ -88,7 +88,7 @@ static tusb_error_t rndis_body_subtask(void)
|
||||
|
||||
OSAL_SUBTASK_BEGIN
|
||||
|
||||
for (relative_addr = 0; relative_addr < CFG_TUSB_HOST_DEVICE_MAX; relative_addr++)
|
||||
for (relative_addr = 0; relative_addr < CFG_TUH_DEVICE_MAX; relative_addr++)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -103,12 +103,12 @@ static tusb_error_t rndis_body_subtask(void)
|
||||
//--------------------------------------------------------------------+
|
||||
void rndish_init(void)
|
||||
{
|
||||
tu_memclr(rndish_data, sizeof(rndish_data_t)*CFG_TUSB_HOST_DEVICE_MAX);
|
||||
tu_memclr(rndish_data, sizeof(rndish_data_t)*CFG_TUH_DEVICE_MAX);
|
||||
|
||||
//------------- Task creation -------------//
|
||||
|
||||
//------------- semaphore creation for notificaiton pipe -------------//
|
||||
for(uint8_t i=0; i<CFG_TUSB_HOST_DEVICE_MAX; i++)
|
||||
for(uint8_t i=0; i<CFG_TUH_DEVICE_MAX; i++)
|
||||
{
|
||||
rndish_data[i].sem_notification_hdl = osal_semaphore_create( OSAL_SEM_REF(rndish_data[i].semaphore_notification) );
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ typedef struct
|
||||
hidh_interface_t instances[CFG_TUH_HID];
|
||||
} hidh_device_t;
|
||||
|
||||
static hidh_device_t _hidh_dev[CFG_TUSB_HOST_DEVICE_MAX-1];
|
||||
static hidh_device_t _hidh_dev[CFG_TUH_DEVICE_MAX-1];
|
||||
|
||||
//------------- Internal prototypes -------------//
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ typedef struct
|
||||
msc_csw_t csw;
|
||||
}msch_interface_t;
|
||||
|
||||
CFG_TUSB_MEM_SECTION static msch_interface_t _msch_itf[CFG_TUSB_HOST_DEVICE_MAX];
|
||||
CFG_TUSB_MEM_SECTION static msch_interface_t _msch_itf[CFG_TUH_DEVICE_MAX];
|
||||
|
||||
// buffer used to read scsi information when mounted
|
||||
// largest response data currently is inquiry TODO Inquiry is not part of enum anymore
|
||||
@@ -291,7 +291,7 @@ bool tuh_msc_reset(uint8_t dev_addr)
|
||||
//--------------------------------------------------------------------+
|
||||
void msch_init(void)
|
||||
{
|
||||
tu_memclr(_msch_itf, sizeof(msch_interface_t)*CFG_TUSB_HOST_DEVICE_MAX);
|
||||
tu_memclr(_msch_itf, sizeof(msch_interface_t)*CFG_TUH_DEVICE_MAX);
|
||||
}
|
||||
|
||||
void msch_close(uint8_t dev_addr)
|
||||
|
||||
4
src/class/vendor/vendor_host.c
vendored
4
src/class/vendor/vendor_host.c
vendored
@@ -41,7 +41,7 @@
|
||||
//--------------------------------------------------------------------+
|
||||
// INTERNAL OBJECT & FUNCTION DECLARATION
|
||||
//--------------------------------------------------------------------+
|
||||
custom_interface_info_t custom_interface[CFG_TUSB_HOST_DEVICE_MAX];
|
||||
custom_interface_info_t custom_interface[CFG_TUH_DEVICE_MAX];
|
||||
|
||||
static tusb_error_t cush_validate_paras(uint8_t dev_addr, uint16_t vendor_id, uint16_t product_id, void * p_buffer, uint16_t length)
|
||||
{
|
||||
@@ -90,7 +90,7 @@ tusb_error_t tusbh_custom_write(uint8_t dev_addr, uint16_t vendor_id, uint16_t p
|
||||
//--------------------------------------------------------------------+
|
||||
void cush_init(void)
|
||||
{
|
||||
tu_memclr(&custom_interface, sizeof(custom_interface_info_t) * CFG_TUSB_HOST_DEVICE_MAX);
|
||||
tu_memclr(&custom_interface, sizeof(custom_interface_info_t) * CFG_TUH_DEVICE_MAX);
|
||||
}
|
||||
|
||||
tusb_error_t cush_open_subtask(uint8_t dev_addr, tusb_desc_interface_t const *p_interface_desc, uint16_t *p_length)
|
||||
|
||||
Reference in New Issue
Block a user