USB device operating mode configuration
[USB application configuration]

Collaboration diagram for USB device operating mode configuration:


Modules

 USB device custom actions

Defines

#define NB_ENDPOINTS   4
#define TX_EP   0x03
#define RX_EP   0x02
#define INT_EP   0x01
#define Usb_unicode(a)   ((U16)(a))

Functions

void sof_action (void)
 sof_action
void suspend_action (void)

Define Documentation

#define NB_ENDPOINTS   4

Definition at line 93 of file conf_usb.h.

#define TX_EP   0x03

Definition at line 94 of file conf_usb.h.

Referenced by usb_getchar(), usb_test_hit(), and usb_user_endpoint_init().

#define RX_EP   0x02

Definition at line 95 of file conf_usb.h.

Referenced by usb_flush(), usb_putchar(), and usb_user_endpoint_init().

#define INT_EP   0x01

Definition at line 96 of file conf_usb.h.

Referenced by usb_user_endpoint_init().

#define Usb_unicode (  )     ((U16)(a))

Definition at line 99 of file conf_usb.h.


Function Documentation

void sof_action ( void   ) 

sof_action

USB Start Of Frame Interrupt user subroutine, executed each 1ms

Parameters:
none 
Returns:
none

Definition at line 189 of file cdc_rf_task.c.

References cpt_sof, cpt_sof_led, Led0_off, Led0_on, Led1_off, Led1_on, LED_FLASH_DELAY, led_rx_flash, led_tx_flash, RF_LEDS_FLASH_DELAY, and RF_LEDS_OFF_DELAY.

00190 {
00191 
00192    cpt_sof++;
00193    if(led_tx_flash<=LED_FLASH_DELAY)
00194    {
00195      led_tx_flash++;
00196    }
00197    if(led_tx_flash==LED_FLASH_DELAY)
00198    {
00199       Led1_off();     
00200    }
00201    
00202    if(led_rx_flash<=LED_FLASH_DELAY)
00203    {
00204      led_rx_flash++;
00205    }
00206    if(led_rx_flash==LED_FLASH_DELAY)
00207    {
00208       Led0_off();     
00209    }
00210    
00211 
00212    if(cpt_sof_led++>=RF_LEDS_OFF_DELAY+RF_LEDS_FLASH_DELAY+1) cpt_sof_led=0;
00213    if(cpt_sof_led==RF_LEDS_OFF_DELAY)
00214    {
00215        Led0_on();
00216        Led1_on();
00217    }
00218    if(cpt_sof_led==RF_LEDS_OFF_DELAY+RF_LEDS_FLASH_DELAY)
00219    {
00220        Led0_off();
00221        Led1_off();
00222    }
00223 
00224 }

void suspend_action ( void   ) 


Generated on Mon May 5 15:58:22 2008 for ATMEL by  doxygen 1.5.1-p1