1/* ----------------------------------------------------------------------------- 2 * Copyright (c) 2011 Ozmo Inc 3 * Released under the GNU General Public License Version 2 (GPLv2). 4 * ----------------------------------------------------------------------------- 5 */ 6#ifndef _OZUSBSVC_H 7#define _OZUSBSVC_H 8 9/*------------------------------------------------------------------------------ 10 * Per PD context info stored in application context area of PD. 11 * This object is reference counted to ensure it doesn't disappear while 12 * still in use. 13 */ 14struct oz_usb_ctx { 15 atomic_t ref_count; 16 u8 tx_seq_num; 17 u8 rx_seq_num; 18 struct oz_pd *pd; 19 void *hport; 20 int stopped; 21}; 22 23int oz_usb_init(void); 24void oz_usb_term(void); 25int oz_usb_start(struct oz_pd *pd, int resume); 26void oz_usb_stop(struct oz_pd *pd, int pause); 27void oz_usb_rx(struct oz_pd *pd, struct oz_elt *elt); 28int oz_usb_heartbeat(struct oz_pd *pd); 29void oz_usb_farewell(struct oz_pd *pd, u8 ep_num, u8 *data, u8 len); 30 31#endif /* _OZUSBSVC_H */ 32 33