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 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 |
#define Usb_unicode | ( | a | ) | ((U16)(a)) |
Definition at line 99 of file conf_usb.h.
void sof_action | ( | void | ) |
sof_action
USB Start Of Frame Interrupt user subroutine, executed each 1ms
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 | ) |