pic_usb.c File Reference

Pic USB routines. More...

#include "pic_usb.h"
#include "pic_serial.h"
#include "memory.h"
#include "config.h"
#include "pic_usb_buffer_mgt.h"

Include dependency graph for pic_usb.c:

Go to the source code of this file.

Functions

void usb_configure_endpoints ()
void usb_enable_module ()
usb_state_type usb_get_state ()
void usb_handle_isr ()
void usb_handle_reset ()
void usb_handle_stall ()
void usb_handle_standard_request (setup_data_packet sdp)
void usb_handle_transaction ()
void usb_prime_ep0_out ()
void usb_send_data (uns8 ep, uns8 *data, uns8 send_count, bit first)
void usb_send_data_chunk ()
void usb_send_empty_data_pkt ()
void usb_send_one_byte (uns8 data)
void usb_setup ()
void usb_stall_ep0 ()

Variables

uns8 buffer_byte
control_mode_type control_mode
buffer_descriptordelivery_bd
uns8 * delivery_buffer
uns8 delivery_buffer_size
uns16 delivery_bytes_max_send
uns16 delivery_bytes_sent
uns16 delivery_bytes_to_send
uns8 * delivery_ptr
uns8 usb_address
setup_data_packet usb_sdp
usb_state_type usb_state = st_POWERED
usb_status_type usb_status


Detailed Description

It's the way cool interrupt driven usb library

Ian Harris 2008 imharris [at] gmail.com

Released under the "do whatever you like with this but if it breaks, you get to keep both pieces" license

Definition in file pic_usb.c.


Function Documentation

void usb_configure_endpoints (  ) 

Definition at line 40 of file pic_usb.c.

References _buffer_descriptor::addr, BC8, BC9, bd1in, bd1out, bd2in, bd2out, bd3in, bd3out, BSTALL, _buffer_descriptor::count, DTS, DTSEN, INCDIS, KEN, serial_print_str(), _buffer_descriptor::stat, and UOWN.

Referenced by usb_handle_standard_request().

Here is the call graph for this function:

Here is the caller graph for this function:

void usb_enable_module (  ) 

Definition at line 736 of file pic_usb.c.

usb_state_type usb_get_state (  ) 

Definition at line 743 of file pic_usb.c.

References usb_state.

void usb_handle_isr (  ) 

Definition at line 643 of file pic_usb.c.

void usb_handle_reset (  ) 

Definition at line 589 of file pic_usb.c.

References _buffer_descriptor::addr, BC8, BC9, bd0in, bd0out, BSTALL, cm_IDLE, control_mode, _buffer_descriptor::count, DTS, DTSEN, INCDIS, KEN, serial_print_int_hex(), serial_print_str(), _buffer_descriptor::stat, UOWN, us_IDLE, usb_address, and usb_status.

Referenced by usb_handle_isr().

Here is the call graph for this function:

Here is the caller graph for this function:

void usb_handle_stall (  ) 

Definition at line 637 of file pic_usb.c.

References serial_print_str().

Referenced by usb_handle_isr().

Here is the call graph for this function:

Here is the caller graph for this function:

void usb_handle_standard_request ( setup_data_packet  sdp  ) 

void usb_handle_transaction (  ) 

void usb_prime_ep0_out (  ) 

Definition at line 306 of file pic_usb.c.

References _buffer_descriptor::addr, BC8, BC9, bd0out, BSTALL, _buffer_descriptor::count, DTS, DTSEN, INCDIS, KEN, serial_putc(), _buffer_descriptor::stat, UOWN, and USB_EP0_OUT_ADDR.

Referenced by usb_handle_transaction().

Here is the call graph for this function:

Here is the caller graph for this function:

void usb_send_data ( uns8  ep,
uns8 *  data,
uns8  send_count,
bit  first 
)

Definition at line 183 of file pic_usb.c.

References _buffer_descriptor::addr, BC8, BC9, BSTALL, _buffer_descriptor::count, DTS, DTSEN, ep_in_bd_location, ep_in_buffer_location, INCDIS, KEN, serial_print_str(), serial_putc(), _buffer_descriptor::stat, uns16, uns8, and UOWN.

Referenced by usb_handle_class_request().

Here is the call graph for this function:

Here is the caller graph for this function:

void usb_send_data_chunk (  ) 

void usb_send_empty_data_pkt (  ) 

void usb_send_one_byte ( uns8  data  ) 

Definition at line 292 of file pic_usb.c.

References bd0in, buffer_0_in, buffer_byte, delivery_buffer, delivery_buffer_size, delivery_bytes_max_send, delivery_bytes_sent, delivery_bytes_to_send, delivery_ptr, DTS, _buffer_descriptor::stat, uns8, and usb_send_data_chunk().

Referenced by usb_handle_standard_request().

Here is the call graph for this function:

Here is the caller graph for this function:

void usb_setup (  ) 

void usb_stall_ep0 (  ) 

Definition at line 175 of file pic_usb.c.

References bd0in, bd0out, BSTALL, _buffer_descriptor::stat, and UOWN.

Referenced by usb_handle_class_request(), and usb_handle_standard_request().

Here is the caller graph for this function:


Variable Documentation

Definition at line 290 of file pic_usb.c.

Referenced by usb_send_one_byte().

Definition at line 36 of file pic_usb.c.

uns8* delivery_ptr

Definition at line 28 of file pic_usb.c.

Referenced by usb_handle_reset(), usb_handle_standard_request(), and usb_handle_transaction().

Definition at line 26 of file pic_usb.c.

Referenced by usb_handle_ctrl_read_class(), and usb_handle_ctrl_write_class().

usb_state_type usb_state = st_POWERED

Definition at line 38 of file pic_usb.c.

Referenced by usb_handle_reset(), usb_handle_standard_request(), and usb_handle_transaction().


Generated on Tue Jul 22 09:32:42 2008 for Pic Pack by  doxygen 1.5.5