Functions | |
void | rndis_packetFilter (uint32_t newfilter) |
Set the packet filter - currently distinguishes between promiscuous mode and normal mode. | |
uint8_t | rndis_send_encapsulated_command (uint16_t wLength) |
Handles a "SEND ENCAPSULATED COMMAND" message. | |
void | rndis_send_interrupt (void) |
Send an interrupt over the interrupt endpoint to the host. | |
void | rndis_query_process (void) |
Function to handle a RNDIS "QUERY" command in the encapsulated_buffer. | |
void | rndis_set_process (void) |
Function to deal with a RNDIS "SET" command present in the encapsulated_buffer. | |
uint8_t | rndis_get_encapsulated_command (void) |
Handle "GET ENCAPSULATED COMMAND". | |
uint8_t | rndis_send_status (rndis_Status_t stat) |
Send a status packet back to the host. | |
uint8_t | rndis_send (uint8_t *senddata, uint16_t sendlen, uint8_t led) |
Send data over RNDIS interface, data is in uipbuf and length is uiplen. | |
void | rx_start_led (void) |
This will enable the RX_START LED for a period. | |
void | tx_end_led (void) |
This will enable the TRX_END LED for a period. | |
PROCESS_THREAD (usb_eth_process, ev, data_proc) | |
RNDIS Process. | |
uint8_t | usb_eth_send (uint8_t *senddata, uint16_t sendlen, uint8_t led) |
Sends a single ethernet frame over USB using appropriate low-level protocol (EEM or RNDIS). | |
Variables | |
prog_uint32_t | OIDSupportedList [] |
List of supported RNDIS OID's. | |
uint8_t | usb_eth_data_buffer [64] |
Temp data buffer when adding RNDIS headers. | |
uint8_t | usb_eth_data_buffer [64] |
Temp data buffer when adding RNDIS headers. | |
uint8_t | led1_timer |
Timers for LEDs. |
PROCESS_THREAD | ( | usb_eth_process | , | |
ev | , | |||
data_proc | ||||
) |
RNDIS Process.
This is the link between USB and the "good stuff". In this routine data is received and processed by RNDIS, CDC-ECM, or CDC-EEM
Definition at line 243 of file rndis_task.c.
References CLOCK_SECOND, etimer_expired(), etimer_set(), Is_device_enumerated, PROCESS_BEGIN, PROCESS_END, PROCESS_WAIT_EVENT_UNTIL, and usb_configuration_nb.
uint8_t rndis_get_encapsulated_command | ( | void | ) |
Handle "GET ENCAPSULATED COMMAND".
This function assumes the message has already set up in the "encapsulated_buffer" variable. This will be done by the "SEND ENCAPSULATED COMMAND" message, which will trigger and interrupt on the host so it knows data is ready.
< Send data until necessary
< Check endpoint 0 size
Referenced by usb_user_read_request().
uint8_t rndis_send_encapsulated_command | ( | uint16_t | wLength | ) |
Handles a "SEND ENCAPSULATED COMMAND" message.
Referenced by usb_user_read_request().
uint8_t rndis_send_status | ( | rndis_Status_t | stat | ) |
Send a status packet back to the host.
1 | Success | |
0 | Failure |
void rx_start_led | ( | void | ) |
This will enable the RX_START LED for a period.
Hook Documentation USB_ETH_HOOK_RX_START() USB_ETH_HOOK_RX_END() USB_ETH_HOOK_RX_ERROR(string_reason)
USB_ETH_HOOK_TX_START() USB_ETH_HOOK_TX_END() USB_ETH_HOOK_TX_ERROR(string_reason)
USB_ETH_HOOK_INITIALIZED() USB_ETH_HOOK_UNINITIALIZED()
USB_ETH_HOOK_INIT()
USB_ETH_HOOK_SET_PROMISCIOUS_MODE(bool)
USB_ETH_HOOK_HANDLE_INBOUND_PACKET(buffer,len) USB_ETH_HOOK_IS_READY_FOR_INBOUND_PACKET()
uint8_t usb_eth_send | ( | uint8_t * | senddata, | |
uint16_t | sendlen, | |||
uint8_t | led | |||
) |
Sends a single ethernet frame over USB using appropriate low-level protocol (EEM or RNDIS).
senddata | Data to send | |
sendlen | Length of data to send | |
led | Should the LED be light up for this frame? |
Referenced by mac_LowpanToEthernet().