added hcd_edpt_close() stub for other ports
This commit is contained in:
		@@ -36,24 +36,19 @@
 | 
			
		||||
 | 
			
		||||
// optional hcd configuration, called by tuh_configure()
 | 
			
		||||
bool hcd_configure(uint8_t rhport, uint32_t cfg_id, const void* cfg_param) {
 | 
			
		||||
  (void) rhport;
 | 
			
		||||
  (void) cfg_id;
 | 
			
		||||
  (void) cfg_param;
 | 
			
		||||
 | 
			
		||||
  (void) rhport; (void) cfg_id; (void) cfg_param;
 | 
			
		||||
  return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Initialize controller to host mode
 | 
			
		||||
bool hcd_init(uint8_t rhport, const tusb_rhport_init_t* rh_init) {
 | 
			
		||||
  (void) rhport;
 | 
			
		||||
  (void) rh_init;
 | 
			
		||||
  (void) rhport; (void) rh_init;
 | 
			
		||||
  return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Interrupt Handler
 | 
			
		||||
void hcd_int_handler(uint8_t rhport, bool in_isr) {
 | 
			
		||||
  (void) rhport;
 | 
			
		||||
  (void) in_isr;
 | 
			
		||||
  (void) rhport; (void) in_isr;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Enable USB interrupt
 | 
			
		||||
@@ -69,7 +64,6 @@ void hcd_int_disable(uint8_t rhport) {
 | 
			
		||||
// Get frame number (1ms)
 | 
			
		||||
uint32_t hcd_frame_number(uint8_t rhport) {
 | 
			
		||||
  (void) rhport;
 | 
			
		||||
 | 
			
		||||
  return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -80,7 +74,6 @@ uint32_t hcd_frame_number(uint8_t rhport) {
 | 
			
		||||
// Get the current connect status of roothub port
 | 
			
		||||
bool hcd_port_connect_status(uint8_t rhport) {
 | 
			
		||||
  (void) rhport;
 | 
			
		||||
 | 
			
		||||
  return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -98,14 +91,12 @@ void hcd_port_reset_end(uint8_t rhport) {
 | 
			
		||||
// Get port link speed
 | 
			
		||||
tusb_speed_t hcd_port_speed_get(uint8_t rhport) {
 | 
			
		||||
  (void) rhport;
 | 
			
		||||
 | 
			
		||||
  return TUSB_SPEED_FULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// HCD closes all opened endpoints belong to this device
 | 
			
		||||
void hcd_device_close(uint8_t rhport, uint8_t dev_addr) {
 | 
			
		||||
  (void) rhport;
 | 
			
		||||
  (void) dev_addr;
 | 
			
		||||
  (void) rhport; (void) dev_addr;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
@@ -114,49 +105,37 @@ void hcd_device_close(uint8_t rhport, uint8_t dev_addr) {
 | 
			
		||||
 | 
			
		||||
// Open an endpoint
 | 
			
		||||
bool hcd_edpt_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_endpoint_t const * ep_desc) {
 | 
			
		||||
  (void) rhport;
 | 
			
		||||
  (void) dev_addr;
 | 
			
		||||
  (void) ep_desc;
 | 
			
		||||
 | 
			
		||||
  (void) rhport; (void) dev_addr; (void) ep_desc;
 | 
			
		||||
  return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool hcd_edpt_close(uint8_t rhport, uint8_t daddr, uint8_t ep_addr) {
 | 
			
		||||
  (void) rhport; (void) daddr; (void) ep_addr;
 | 
			
		||||
  return false; // TODO not implemented yet
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Submit a transfer, when complete hcd_event_xfer_complete() must be invoked
 | 
			
		||||
bool hcd_edpt_xfer(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr, uint8_t * buffer, uint16_t buflen) {
 | 
			
		||||
  (void) rhport;
 | 
			
		||||
  (void) dev_addr;
 | 
			
		||||
  (void) ep_addr;
 | 
			
		||||
  (void) buffer;
 | 
			
		||||
  (void) buflen;
 | 
			
		||||
 | 
			
		||||
  (void) rhport; (void) dev_addr; (void) ep_addr; (void) buffer; (void) buflen;
 | 
			
		||||
  return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Abort a queued transfer. Note: it can only abort transfer that has not been started
 | 
			
		||||
// Return true if a queued transfer is aborted, false if there is no transfer to abort
 | 
			
		||||
bool hcd_edpt_abort_xfer(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr) {
 | 
			
		||||
  (void) rhport;
 | 
			
		||||
  (void) dev_addr;
 | 
			
		||||
  (void) ep_addr;
 | 
			
		||||
 | 
			
		||||
  (void) rhport; (void) dev_addr; (void) ep_addr;
 | 
			
		||||
  return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Submit a special transfer to send 8-byte Setup Packet, when complete hcd_event_xfer_complete() must be invoked
 | 
			
		||||
bool hcd_setup_send(uint8_t rhport, uint8_t dev_addr, uint8_t const setup_packet[8]) {
 | 
			
		||||
  (void) rhport;
 | 
			
		||||
  (void) dev_addr;
 | 
			
		||||
  (void) setup_packet;
 | 
			
		||||
 | 
			
		||||
  (void) rhport; (void) dev_addr; (void) setup_packet;
 | 
			
		||||
  return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// clear stall, data toggle is also reset to DATA0
 | 
			
		||||
bool hcd_edpt_clear_stall(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr) {
 | 
			
		||||
  (void) rhport;
 | 
			
		||||
  (void) dev_addr;
 | 
			
		||||
  (void) ep_addr;
 | 
			
		||||
 | 
			
		||||
  (void) rhport; (void) dev_addr; (void) ep_addr;
 | 
			
		||||
  return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user