- wakeup() removed
This commit is contained in:
		
							parent
							
								
									fb894c4703
								
							
						
					
					
						commit
						9753e7ded8
					
				
							
								
								
									
										16
									
								
								usb.c
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								usb.c
									
									
									
									
									
								
							@ -20,15 +20,15 @@
 | 
				
			|||||||
// ---------------
 | 
					// ---------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static uint8_t tx_assembly_buf[USB_RX_BUF_SIZE] DWORD_ALIGN; ///< Buffer for assembling packets
 | 
					static uint8_t tx_assembly_buf[USB_RX_BUF_SIZE] DWORD_ALIGN; ///< Buffer for assembling packets
 | 
				
			||||||
static Usb_SetupTransferState stups; ///< Setup transfer state.
 | 
					static Usb_SetupTransferState stups;                         ///< Setup transfer state.
 | 
				
			||||||
static UsbDrv_DrvIntf *drv; ///< Mutable pointer to the driver interface
 | 
					static UsbDrv_DrvIntf *drv;                                  ///< Mutable pointer to the driver interface
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ----------------
 | 
					// ----------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * @fn void usb_event_callback(USB_CallbackEvent *cbevt)
 | 
					 * @fn void usb_event_callback(USB_CallbackEvent *cbevt)
 | 
				
			||||||
 * Prototype for the USB event callback.
 | 
					 * Prototype for the USB event callback.
 | 
				
			||||||
 * 
 | 
					 *
 | 
				
			||||||
 * @param cbevt pointer to the event data
 | 
					 * @param cbevt pointer to the event data
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
__attribute__((weak)) void usb_event_callback(Usb_CallbackEvent *cbevt) {
 | 
					__attribute__((weak)) void usb_event_callback(Usb_CallbackEvent *cbevt) {
 | 
				
			||||||
@ -66,7 +66,7 @@ void usbcore_reset() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Process SETUP packets.
 | 
					 * Process SETUP packets.
 | 
				
			||||||
 * 
 | 
					 *
 | 
				
			||||||
 * @param data pointer to the SETUP packet
 | 
					 * @param data pointer to the SETUP packet
 | 
				
			||||||
 * @param size size of the packet
 | 
					 * @param size size of the packet
 | 
				
			||||||
 * @param stage stage of the SETUP transaction
 | 
					 * @param stage stage of the SETUP transaction
 | 
				
			||||||
@ -205,7 +205,7 @@ void usbcore_process_setup_pckt(const uint8_t *data, uint16_t size, uint8_t stag
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Process the non-SETUP packets.
 | 
					 * Process the non-SETUP packets.
 | 
				
			||||||
 * 
 | 
					 *
 | 
				
			||||||
 * @param cbcpd pointer to callback compound
 | 
					 * @param cbcpd pointer to callback compound
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
void usbcore_process_nonsetup_event(UsbDrv_CallbackCompound *cbcpd) {
 | 
					void usbcore_process_nonsetup_event(UsbDrv_CallbackCompound *cbcpd) {
 | 
				
			||||||
@ -250,11 +250,9 @@ void usbcore_process_nonsetup_event(UsbDrv_CallbackCompound *cbcpd) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void usbcore_wake_up_endpoint(uint8_t ep, uint8_t dir) {
 | 
					 | 
				
			||||||
    drv->en_ep_irq(ep, dir, true);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void usbcore_register_IN_callback(uint8_t ep, UsbDrv_IN_cb cb) {
 | 
					void usbcore_register_IN_callback(uint8_t ep, UsbDrv_IN_cb cb) {
 | 
				
			||||||
 | 
					    bool en = cb != NULL;
 | 
				
			||||||
 | 
					    drv->en_ep_irq(ep, USB_IN, en);
 | 
				
			||||||
    drv->reg_IN_cb(ep, cb);
 | 
					    drv->reg_IN_cb(ep, cb);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										8
									
								
								usb.h
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								usb.h
									
									
									
									
									
								
							@ -58,14 +58,6 @@ uint32_t usbcore_schedule_transmission(uint8_t ep, const uint8_t *data, uint16_t
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
uint32_t usbcore_schedule_reception(uint8_t ep, uint16_t size);
 | 
					uint32_t usbcore_schedule_reception(uint8_t ep, uint16_t size);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * Wake up an Endpoint.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * @param ep index of the Endpoint
 | 
					 | 
				
			||||||
 * @param dir direction of the Endpoint
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
void usbcore_wake_up_endpoint(uint8_t ep, uint8_t dir);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Register a callback for IN transmission completion.
 | 
					 * Register a callback for IN transmission completion.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user