#include "conf\conf_usb.h"
Go to the source code of this file.
Defines | |
| #define | EP_CONTROL 0 |
| #define | EP_1 1 |
| #define | EP_2 2 |
| #define | EP_3 3 |
| #define | EP_4 4 |
| #define | EP_5 5 |
| #define | EP_6 6 |
| #define | EP_7 7 |
| #define | MSK_EP_DIR 0x7F |
| #define | TYPE_CONTROL 0 |
| Parameters for endpoint configuration These define are the values used to enable and configure an endpoint. | |
| #define | TYPE_ISOCHRONOUS 1 |
| #define | TYPE_BULK 2 |
| #define | TYPE_INTERRUPT 3 |
| #define | DIRECTION_OUT 0 |
| #define | DIRECTION_IN 1 |
| #define | SIZE_8 0 |
| #define | SIZE_16 1 |
| #define | SIZE_32 2 |
| #define | SIZE_64 3 |
| #define | SIZE_128 4 |
| #define | SIZE_256 5 |
| #define | SIZE_512 6 |
| #define | SIZE_1024 7 |
| #define | ONE_BANK 0 |
| #define | TWO_BANKS 1 |
| #define | NYET_ENABLED 0 |
| #define | NYET_DISABLED 1 |
| #define | Usb_build_ep_config0(type, dir, nyet) ((type<<6) | (nyet<<1) | (dir)) |
| #define | Usb_build_ep_config1(size, bank) ((size<<4) | (bank<<2) ) |
| #define | usb_configure_endpoint(num, type, dir, size, bank, nyet) |
| #define | Usb_enable() (USBCON |= MSK_USBE) |
| General USB management These macros manage the USB controller. | |
| #define | Usb_disable() (USBCON &= ~MSK_USBE) |
| #define | Usb_select_device() |
| #define | Usb_select_host() |
| #define | Usb_freeze_clock() (USBCON |= MSK_SUSPCLK) |
| #define | Usb_unfreeze_clock() (USBCON &= ~MSK_SUSPCLK) |
| #define | Usb_enable_id_interrupt() |
| #define | Usb_disable_id_interrupt() |
| #define | Usb_enable_vbus_interrupt() |
| #define | Usb_disable_vbus_interrupt() |
| #define | Is_usb_enabled() (USBCON & MSK_USBE == MSK_USBE) |
| #define | Is_usb_host_enabled() (FALSE) |
| #define | Is_usb_clock_freezed() (USBCON & MSK_SUSPCLK == MSK_SUSPCLK) |
| #define | Is_usb_vbus_high() (TRUE) |
| #define | Is_usb_high_speed() (FALSE) |
| #define | Is_usb_id_device() (TRUE) |
| #define | Usb_ack_id_transition() |
| #define | Usb_ack_vbus_transition() |
| #define | Is_usb_id_transition() (FALSE) |
| #define | Is_usb_vbus_transition() (FALSE) |
| #define | Usb_enter_dpram_mode() |
| #define | Usb_exit_dpram_mode() |
| #define | Usb_set_dpram_address(addr) |
| #define | Usb_enable_vbus() |
| #define | Usb_disable_vbus() |
| #define | Usb_device_initiate_hnp() |
| #define | Usb_host_accept_hnp() |
| #define | Usb_host_reject_hnp() |
| #define | Usb_device_initiate_srp() |
| #define | Usb_select_vbus_srp_method() |
| #define | Usb_select_data_srp_method() |
| #define | Usb_enable_vbus_hw_control() |
| #define | Usb_disable_vbus_hw_control() |
| #define | Is_usb_vbus_enabled() (TRUE) |
| #define | Is_usb_hnp() (FALSE) |
| #define | Is_usb_device_srp() (FALSE) |
| #define | Usb_enable_suspend_time_out_interrupt() |
| #define | Usb_enable_hnp_error_interrupt() |
| #define | Usb_enable_role_exchange_interrupt() |
| #define | Usb_enable_bconnection_error_interrupt() |
| #define | Usb_enable_vbus_error_interrupt() |
| #define | Usb_enable_srp_interrupt() |
| #define | Usb_disable_suspend_time_out_interrupt() |
| #define | Usb_disable_hnp_error_interrupt() |
| #define | Usb_disable_role_exchange_interrupt() |
| #define | Usb_disable_bconnection_error_interrupt() |
| #define | Usb_disable_vbus_error_interrupt() |
| #define | Usb_disable_srp_interrupt() |
| #define | Usb_ack_suspend_time_out_interrupt() |
| #define | Usb_ack_hnp_error_interrupt() |
| #define | Usb_ack_role_exchange_interrupt() |
| #define | Usb_ack_bconnection_error_interrupt() |
| #define | Usb_ack_vbus_error_interrupt() |
| #define | Usb_ack_srp_interrupt() |
| #define | Is_usb_suspend_time_out_interrupt() (FALSE) |
| #define | Is_usb_hnp_error_interrupt() (FALSE) |
| #define | Is_usb_role_exchange_interrupt() (FALSE) |
| #define | Is_usb_bconnection_error_interrupt() (FALSE) |
| #define | Is_usb_vbus_error_interrupt() (FALSE) |
| #define | Is_usb_srp_interrupt() (FALSE) |
| #define | Usb_initiate_remote_wake_up() (USBCON |= MSK_SDRMWKUP) |
| USB Device management These macros manage the USB Device controller. | |
| #define | Usb_detach() (USBCON |= MSK_DETACH) |
| #define | Usb_attach() (USBCON &= ~MSK_DETACH) |
| #define | Is_usb_pending_remote_wake_up() (USBCON & MSK_UPRSM == MSK_UPRSM) |
| #define | Is_usb_detached() (USBCON & MSK_DETACH == MSK_DETACH) |
| #define | Usb_ack_remote_wake_up_start() (USBCON &= ~MSK_SDRMWUP) |
| #define | Usb_ack_resume() (USBINT &= ~MSK_WUPCPU) |
| #define | Usb_ack_wake_up() (USBINT &= ~MSK_WUPCPU) |
| #define | Usb_ack_reset() (USBINT &= ~MSK_EORINT) |
| #define | Usb_ack_sof() (USBINT &= ~MSK_SOFINT) |
| #define | Usb_ack_micro_sof() |
| #define | Usb_ack_suspend() (USBINT &= ~MSK_SPINT) |
| #define | Is_usb_remote_wake_up_start() (USBCON & MSK_SDRMWUP) |
| #define | Is_usb_resume() (USBINT & MSK_WUPCPU) |
| #define | Is_usb_wake_up() (USBINT & MSK_WUPCPU) |
| #define | Is_usb_reset() (USBINT & MSK_EORINT) |
| #define | Is_usb_sof() (USBINT & MSK_SOFINT) |
| #define | Is_usb_micro_sof() (FALSE) |
| #define | Is_usb_suspend() (USBINT & MSK_SPINT == MSK_SPINT) |
| #define | Usb_enable_remote_wake_up_interrupt() |
| #define | Usb_enable_resume_interrupt() (USBIEN |= MSK_EWUPCPU) |
| #define | Usb_enable_wake_up_interrupt() (USBIEN |= MSK_EWUPCPU) |
| #define | Usb_enable_reset_interrupt() (USBIEN |= MSK_EEORINT) |
| #define | Usb_enable_sof_interrupt() (USBIEN |= MSK_ESOFINT) |
| #define | Usb_enable_micro_sof_interrupt() |
| #define | Usb_enable_suspend_interrupt() (USBIEN |= MSK_ESPINT) |
| #define | Usb_disable_remote_wake_up_interrupt() |
| #define | Usb_disable_resume_interrupt() (USBIEN &= ~MSK_EWUPCPU) |
| #define | Usb_disable_wake_up_interrupt() (USBIEN &= ~MSK_EWUPCPU) |
| #define | Usb_disable_reset_interrupt() (USBIEN &= ~MSK_EEORINT) |
| #define | Usb_disable_sof_interrupt() (USBIEN &= ~MSK_ESOFINT) |
| #define | Usb_disable_micro_sof_interrupt() |
| #define | Usb_disable_suspend_interrupt() (USBIEN &= ~MSK_ESPINT) |
| #define | Usb_enable_address() (USBADDR |= MSK_FEN) |
| #define | Usb_disable_address() (USBADDR &= ~MSK_FEN) |
| #define | Usb_configure_address(addr) (Usb_disable_address(), USBADDR = (U8)addr) |
| #define | Usb_frame_number() ((U16)((((U16)UFNUMH & 0x07) << 8) | ((U16)UDNUML))) |
| #define | Usb_micro_frame_number() (0) |
| #define | Is_usb_frame_number_crc_error() (UFNUMH & MSK_CRCERR == MSK_CRCERR) |
| #define | Usb_enter_test_packet_mode() |
| #define | Usb_enter_test_k_mode() |
| #define | Usb_enter_test_j_mode() |
| #define | Usb_force_normal_speed() |
| #define | Usb_force_full_speed() |
| #define | Usb_force_high_speed() |
| #define | Usb_force_full_speed_utmi() |
| #define | Usb_exit_test_packet_mode() |
| #define | Usb_exit_test_k_mode() |
| #define | Usb_exit_test_j_mode() |
| #define | Usb_set_loopback_mode() |
| #define | Usb_select_endpoint(ep) (UEPNUM = (U8)ep) |
| General endpoint management These macros manage the common features of the endpoints. | |
| #define | Usb_select_endpoint_dfc(ep) (UEPNUM = (U8)ep) |
| #define | Usb_reset_endpoint(ep) (UEPRST = 1 << (U8)ep, UEPRST = 0) |
| #define | Usb_enable_endpoint() (UEPCONX |= MSK_EPEN) |
| #define | Usb_enable_stall_handshake() (UEPSTAX |= MSK_STALLRQ) |
| #define | Usb_reset_data_toggle() |
| #define | Usb_select_epnum_for_dfc() |
| #define | Usb_enable_dfc() |
| #define | Usb_disable_endpoint() (UEPCONX &= ~MSK_EPEN) |
| #define | Usb_disable_stall_handshake() (UEPSTAX &= ~MSK_STALLRQ) |
| #define | Usb_select_epnum_for_cpu() |
| #define | Usb_disable_dfc() |
| #define | Is_usb_endpoint_enabled() (UEPCONX & MSK_EPEN) |
| #define | Is_usb_endpoint_stall_requested() (UEPSTAX & MSK_STALLRQ) |
| #define | Usb_configure_endpoint_type(type) (UEPCONX = (UEPCONX & ~MSK_EPTYPE) | ((U8)type)) |
| #define | Usb_enable_iso_autoswitch() |
| #define | Usb_enable_autoswitch() |
| #define | Usb_enable_nyet() |
| #define | Usb_disable_iso_autoswitch() |
| #define | Usb_disable_autoswitch() |
| #define | Usb_disable_nyet() |
| #define | Usb_configure_endpoint_direction(dir) (UEPCONX = (UEPCONX & ~MSK_EPDIR) | ((U8)dir << 2)) |
| #define | Usb_configure_endpoint_size(size) |
| #define | Usb_configure_endpoint_bank(bank) |
| #define | Usb_allocate_memory() |
| #define | Usb_unallocate_memory() |
| #define | Usb_ack_overflow_interrupt() |
| #define | Usb_ack_underflow_interrupt() |
| #define | Usb_ack_zlp() |
| #define | Usb_data_toggle() |
| #define | Usb_nb_busy_bank() (0xFF) |
| #define | Is_usb_one_bank_busy() (FALSE) |
| #define | Is_endpoint_configured() (UEPCONX & MSK_EPEN == MSK_EPEN) |
| #define | Is_usb_overflow() (FALSE) |
| #define | Is_usb_underflow() (FALSE) |
| #define | Is_usb_zlp() (FALSE) |
| #define | Usb_control_direction() (UEPCONX & MSK_EPDIR) |
| #define | Usb_current_bank() (0xFF) |
| #define | Usb_ack_fifocon() |
| #define | Usb_ack_nak_in() |
| #define | Usb_ack_nak_out() |
| #define | Usb_ack_receive_setup() (UEPSTAX &= ~MSK_RXSETUP) |
| #define | Usb_ack_receive_out() (UEPSTAX &= ~MSK_RXOUT) |
| #define | Usb_ack_stalled() (UEPSTAX &= ~MSK_STALLED) |
| #define | Usb_ack_in_ready() (UEPSTAX &= ~MSK_TXCMPL) |
| #define | Usb_kill_last_in_bank() |
| #define | Is_usb_read_enabled() (TRUE) |
| #define | Is_usb_write_enabled() (TRUE) |
| #define | Is_usb_read_control_enabled() (UEPSTAX & MSK_TXCMPL) |
| #define | Is_usb_receive_setup() (UEPSTAX & MSK_RXSETUP) |
| #define | Is_usb_receive_out() (UEPSTAX & MSK_RXOUTB0B1) |
| #define | Usb_ack_receive_out_ms() {if(rx_bank){UEPSTAX&=~MSK_RXOUTB1;}else{UEPSTAX&=(~MSK_RXOUTB0);}rx_bank=~rx_bank;} |
| #define | Is_usb_receive_out_ms() Is_usb_receive_out() |
| #define | Usb_ack_receive_out_hid() {if(rx_bank){UEPSTAX&=~MSK_RXOUTB1;}else{UEPSTAX&=(~MSK_RXOUTB0);}rx_bank=~rx_bank;} |
| #define | Is_usb_receive_out_hid() Is_usb_receive_out() |
| #define | Is_usb_in_ready() (UEPSTAX & MSK_TXCMPL) |
| #define | Usb_send_in() UEPSTAX |= MSK_TXRDY; while(!Is_usb_in_ready());Usb_ack_in_ready() |
| #define | Usb_send_control_in() (UEPSTAX |= MSK_TXRDY) |
| #define | Usb_free_out_bank() (UEPSTAX |= MSK_RXOUT) |
| #define | Usb_ack_control_out() (UEPSTAX |= MSK_RXOUT) |
| #define | Usb_set_DIR() (UEPSTAX |= MSK_DIR) |
| #define | Usb_enable_flow_error_interrupt() |
| #define | Usb_enable_nak_in_interrupt() |
| #define | Usb_enable_nak_out_interrupt() |
| #define | Usb_enable_receive_setup_interrupt() |
| #define | Usb_enable_receive_out_interrupt() |
| #define | Usb_enable_stalled_interrupt() |
| #define | Usb_enable_in_ready_interrupt() |
| #define | Usb_disable_flow_error_interrupt() |
| #define | Usb_disable_nak_in_interrupt() |
| #define | Usb_disable_nak_out_interrupt() |
| #define | Usb_disable_receive_setup_interrupt() |
| #define | Usb_disable_receive_out_interrupt() |
| #define | Usb_disable_stalled_interrupt() |
| #define | Usb_disable_in_ready_interrupt() |
| #define | Usb_read_byte() (UEPDATX) |
| #define | Usb_write_byte(byte) (UEPDATX = (U8)byte) |
| #define | Usb_byte_counter() ((((U16)UBYCTHX) << 8) | (UBYCTLX)) |
| #define | Usb_byte_counter_8() ((U8)UBYCTLX) |
| #define | Usb_interrupt_flags() (UEPINT != 0x00) |
| #define | Is_usb_endpoint_event() (Usb_interrupt_flags()) |
| #define | Usb_select_ep_for_cpu(ep) |
| #define | Usb_select_ep_for_dfc(ep) |
| #define | Usb_set_cfg0(cfg0) (cfg0 = cfg0) |
| #define | Usb_set_cfg1(cfg1) (cfg1 = cfg1) |
| #define | wSWAP(x) |
| wSWAP This macro swaps the U8 order in words. | |
| #define | PLL_3MHz 0xF0 |
| dwSWAP This macro swaps the U8 order in double words. | |
| #define | PLL_4MHz 0xC0 |
| #define | PLL_6MHz 0x70 |
| #define | PLL_8MHz 0x50 |
| #define | PLL_12MHz 0x30 |
| #define | PLL_16MHz 0x20 |
| #define | PLL_18MHz 0x72 |
| #define | PLL_20MHz 0xB4 |
| #define | PLL_24MHz 0x10 |
| #define | PLL_32MHz 0x21 |
| #define | PLL_40MHz 0xB9 |
| #define | Pll_stop() (PLLCON &= ~MSK_PLLEN) |
| #define | Pll_set_div(n) (PLLDIV = n) |
| #define | Pll_enable() (PLLCON |= MSK_PLLEN) |
Typedefs | |
| typedef enum endpoint_parameter | t_endpoint_parameter |
Enumerations | |
| enum | endpoint_parameter { ep_num, ep_type, ep_direction, ep_size, ep_bank, nyet_status } |
Functions | |
| U8 | usb_config_ep (U8, U8) |
| usb_configure_endpoint. | |
| U8 | usb_select_enpoint_interrupt (void) |
| usb_select_endpoint_interrupt. | |
| U16 | usb_get_nb_byte_epw (void) |
| U8 | usb_send_packet (U8, U8 *, U8) |
| usb_send_packet. | |
| U8 | usb_read_packet (U8, U8 *, U8) |
| usb_read_packet. | |
| void | usb_halt_endpoint (U8) |
| void | usb_reset_endpoint (U8) |
| U8 | usb_init_device (void) |
| usb_init_device. | |
| void | usb_generate_clock (void) |
| Usb_configure_clock. | |
Variables | |
| bdata bit | rx_bank |
Use of this program is subject to Atmel's End User License Agreement. Please read file license.txt for copyright notice.
Definition in file usb_drv.h.
|
|
Definition at line 29 of file usb_drv.h. Referenced by usb_clear_feature(), usb_init_device(), usb_process_request(), usb_set_feature(), and usb_task(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parameters for endpoint configuration These define are the values used to enable and configure an endpoint.
Definition at line 42 of file usb_drv.h. Referenced by usb_init_device(). |
|
|
|
|
|
|
|
|
Definition at line 45 of file usb_drv.h. Referenced by usb_user_endpoint_init(). |
|
|
Definition at line 47 of file usb_drv.h. Referenced by usb_init_device(), and usb_user_endpoint_init(). |
|
|
Definition at line 48 of file usb_drv.h. Referenced by usb_user_endpoint_init(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 53 of file usb_drv.h. Referenced by usb_init_device(), and usb_user_endpoint_init(). |
|
|
|
|
|
|
|
|
Definition at line 56 of file usb_drv.h. Referenced by usb_user_endpoint_init(). |
|
|
|
|
|
Definition at line 59 of file usb_drv.h. Referenced by usb_init_device(). |
|
|
Definition at line 60 of file usb_drv.h. Referenced by usb_user_endpoint_init(). |
|
|
Definition at line 62 of file usb_drv.h. Referenced by usb_user_endpoint_init(). |
|
|
Definition at line 63 of file usb_drv.h. Referenced by usb_init_device(). |
|
|
|
|
|
|
|
|
Value:
Definition at line 67 of file usb_drv.h. Referenced by usb_init_device(), and usb_user_endpoint_init(). |
|
|
General USB management These macros manage the USB controller.
Definition at line 76 of file usb_drv.h. Referenced by usb_task_init(). |
|
|
Definition at line 77 of file usb_drv.h. Referenced by user_application_task(). |
|
|
|
|
|
|
|
|
Definition at line 80 of file usb_drv.h. Referenced by usb_interrupt(). |
|
|
Definition at line 81 of file usb_drv.h. Referenced by usb_interrupt(), and usb_start_device(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 91 of file usb_drv.h. Referenced by usb_user_endpoint_init(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
USB Device management These macros manage the USB Device controller.
|
|
|
Definition at line 149 of file usb_drv.h. Referenced by usb_start_device(), and user_application_task(). |
|
|
Definition at line 150 of file usb_drv.h. Referenced by usb_start_device(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 156 of file usb_drv.h. Referenced by usb_interrupt(). |
|
|
Definition at line 157 of file usb_drv.h. Referenced by usb_interrupt(). |
|
|
Definition at line 158 of file usb_drv.h. Referenced by usb_interrupt(). |
|
|
|
|
|
Definition at line 160 of file usb_drv.h. Referenced by usb_interrupt(), and usb_start_device(). |
|
|
|
|
|
|
|
|
Definition at line 163 of file usb_drv.h. Referenced by usb_interrupt(). |
|
|
Definition at line 164 of file usb_drv.h. Referenced by usb_interrupt(). |
|
|
Definition at line 165 of file usb_drv.h. Referenced by usb_interrupt(). |
|
|
|
|
|
Definition at line 167 of file usb_drv.h. Referenced by usb_interrupt(). |
|
|
|
|
|
Definition at line 170 of file usb_drv.h. Referenced by usb_start_device(). |
|
|
Definition at line 171 of file usb_drv.h. Referenced by usb_interrupt(), and usb_start_device(). |
|
|
Definition at line 172 of file usb_drv.h. Referenced by usb_start_device(). |
|
|
Definition at line 173 of file usb_drv.h. Referenced by usb_interrupt(), and usb_start_device(). |
|
|
|
|
|
Definition at line 175 of file usb_drv.h. Referenced by usb_interrupt(), and usb_start_device(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 184 of file usb_drv.h. Referenced by usb_set_address(). |
|
|
|
|
|
Definition at line 186 of file usb_drv.h. Referenced by usb_set_address(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
General endpoint management These macros manage the common features of the endpoints.
Definition at line 209 of file usb_drv.h. Referenced by usb_clear_feature(), usb_process_request(), usb_read_packet(), usb_send_packet(), usb_set_feature(), usb_task(), and usb_write_continuous(). |
|
|
|
|
|
Definition at line 212 of file usb_drv.h. Referenced by usb_clear_feature(). |
|
|
Definition at line 214 of file usb_drv.h. Referenced by usb_config_ep(). |
|
|
Definition at line 215 of file usb_drv.h. Referenced by usb_clear_feature(), usb_get_descriptor(), usb_get_status(), usb_process_request(), usb_set_configuration(), and usb_set_feature(). |
|
|
Definition at line 216 of file usb_drv.h. Referenced by usb_clear_feature(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 220 of file usb_drv.h. Referenced by usb_clear_feature(). |
|
|
|
|
|
|
|
|
Definition at line 223 of file usb_drv.h. Referenced by usb_clear_feature(), and usb_set_feature(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 237 of file usb_drv.h. Referenced by usb_config_ep(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 257 of file usb_drv.h. Referenced by usb_clear_feature(), usb_get_configuration(), usb_get_descriptor(), usb_get_status(), usb_process_request(), usb_set_address(), usb_set_configuration(), usb_set_feature(), and usb_user_read_request(). |
|
|
Definition at line 258 of file usb_drv.h. Referenced by usb_get_configuration(), usb_get_descriptor(), usb_get_status(), and usb_user_read_request(). |
|
|
|
|
|
Definition at line 260 of file usb_drv.h. Referenced by usb_get_configuration(), usb_get_descriptor(), usb_get_status(), usb_set_address(), usb_set_configuration(), usb_task(), and usb_user_read_request(). |
|
|
|
|
|
Definition at line 262 of file usb_drv.h. Referenced by usb_read_packet(). |
|
|
Definition at line 263 of file usb_drv.h. Referenced by usb_send_packet(). |
|
|
Definition at line 264 of file usb_drv.h. Referenced by usb_get_descriptor(). |
|
|
Definition at line 265 of file usb_drv.h. Referenced by usb_task(). |
|
|
Definition at line 266 of file usb_drv.h. Referenced by usb_get_configuration(), usb_get_descriptor(), usb_get_status(), and usb_user_read_request(). |
|
|
|
|
|
|
|
|
Definition at line 278 of file usb_drv.h. Referenced by usb_read_continuous(). |
|
|
|
|
|
Definition at line 281 of file usb_drv.h. Referenced by usb_get_configuration(), usb_get_status(), usb_set_address(), usb_set_configuration(), usb_task(), and usb_user_read_request(). |
|
|
|
|
|
Definition at line 283 of file usb_drv.h. Referenced by usb_clear_feature(), usb_get_configuration(), usb_get_descriptor(), usb_get_status(), usb_send_packet(), usb_set_address(), usb_set_configuration(), usb_set_feature(), usb_user_read_request(), and usb_write_continuous(). |
|
|
|
|
|
|
|
|
Definition at line 287 of file usb_drv.h. Referenced by usb_get_configuration(), usb_get_descriptor(), usb_get_status(), and usb_user_read_request(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 305 of file usb_drv.h. Referenced by usb_clear_feature(), usb_get_descriptor(), usb_get_status(), usb_process_request(), usb_read_packet(), usb_set_address(), usb_set_configuration(), usb_set_feature(), and usb_user_read_request(). |
|
|
Definition at line 306 of file usb_drv.h. Referenced by usb_get_configuration(), usb_get_descriptor(), usb_get_status(), usb_send_packet(), usb_user_read_request(), and usb_write_continuous(). |
|
|
|
|
|
Definition at line 309 of file usb_drv.h. Referenced by usb_read_continuous(). |
|
|
Definition at line 311 of file usb_drv.h. Referenced by usb_select_enpoint_interrupt(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 319 of file usb_drv.h. Referenced by usb_config_ep(). |
|
|
Definition at line 320 of file usb_drv.h. Referenced by usb_config_ep(). |
|
|
Value: wSWAP This macro swaps the U8 order in words.
|
|
|
dwSWAP This macro swaps the U8 order in double words.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 363 of file usb_drv.h. Referenced by usb_generate_clock(), usb_task(), and user_application_task(). |
|
|
Definition at line 364 of file usb_drv.h. Referenced by usb_generate_clock(). |
|
|
Definition at line 365 of file usb_drv.h. Referenced by usb_generate_clock(), and usb_interrupt(). |
|
|
|
|
|
Definition at line 21 of file usb_drv.h.
|
|
||||||||||||
|
usb_configure_endpoint. This function configures an endpoint with the selected type.
EXAMPLE: usb_configure_endpoint(EP_CONTROL,TYPE_CONTROL, DIRECTION_OUT, SIZE_64, ONE_BANK, NYET_DISABLED); NOTE: The endpoint 0 shall always be configured in CONTROL type. Definition at line 52 of file usb_drv.c. References MSK_EPEN, TRUE, U8, Usb_allocate_memory, Usb_enable_endpoint, Usb_set_cfg0, and Usb_set_cfg1.
|
|
|
usb_select_endpoint_interrupt. This function select the endpoint where an event occurs and returns the number of this endpoint. If no event occurs on the endpoints, this function returns 0.
Definition at line 74 of file usb_drv.c. References ep_num, U8, and Usb_interrupt_flags.
|
|
|
|
|
||||||||||||||||
|
usb_send_packet. This function moves the data pointed by tbuf to the selected endpoint fifo and sends it through the USB.
Note: tbuf is incremented of 'data_length'. Definition at line 118 of file usb_drv.c. References ep_num, Is_usb_write_enabled, U8, Usb_select_endpoint, Usb_send_control_in, and Usb_write_byte.
|
|
||||||||||||||||
|
usb_read_packet. This function moves the data stored in the selected endpoint fifo to the address specified by *rbuf.
Note: rbuf is incremented of 'data_length'. Definition at line 155 of file usb_drv.c. References ep_num, Is_usb_read_enabled, U8, Usb_read_byte, and Usb_select_endpoint. Referenced by usb_read_continuous().
|
|
|
|
|
|
|
|
|
usb_init_device. This function initializes the USB device controller and configures the Default Control Endpoint.
Definition at line 200 of file usb_drv.c. References DIRECTION_OUT, EP_CONTROL, NYET_DISABLED, ONE_BANK, SIZE_64, TRUE, TYPE_CONTROL, U8, and usb_configure_endpoint. Referenced by usb_start_device().
|
|
|
Usb_configure_clock. This function configure the PLL to generate the 48MHz clock required by the USB controller, considering the FOSC defined in the "config.h" file.
Definition at line 235 of file usb_drv.c. References MSK_SOFINT, MSK_T0X2, MSK_X2, PLL_12MHz, PLL_16MHz, PLL_18MHz, PLL_20MHz, PLL_24MHz, PLL_32MHz, PLL_3MHz, PLL_40MHz, PLL_4MHz, PLL_6MHz, PLL_8MHz, Pll_enable, Pll_set_div, Pll_stop, and Uchar. Referenced by usb_start_device().
|
|
|
Definition at line 24 of file usb_drv.h. Referenced by usb_enum_var_init(). |
1.3.7