Hanna
Sourcecode Kontrollplatine
Funktionen | Variablen
usb_cdc.c-Dateireferenz

Bibliothek zur USB-Kommunikation von Jürgen W. Mehr ...

#include <util/atomic.h>
#include <avr/io.h>
#include "usb_defaults.h"
#include "usb_xm.h"
#include "usb_cdc.h"
Include-Abhängigkeitsdiagramm für usb_cdc.c:

gehe zum Quellcode dieser Datei

Funktionen

 EP_DEF (ep_in, CDC_TX_EPADDR|USB_EP_PP, USB_EP_TYPE_BULK_gc, CDC_TXRX_EPSIZE, usb_handle_ring_tx)
 
 EP_DEF (ep_out, CDC_RX_EPADDR|USB_EP_PP, USB_EP_TYPE_BULK_gc, CDC_TXRX_EPSIZE, usb_handle_ring_rx)
 
 EP_DEF (ep_note, CDC_NOTIFICATION_EPADDR|USB_EP_PP, USB_EP_TYPE_BULK_gc, CDC_TXRX_EPSIZE, usb_handle_ring_note)
 
void EVENT_USB_Device_ConfigurationChanged (uint8_t config)
 
void EVENT_USB_Device_ControlOUT (uint8_t *data, uint8_t len)
 
bool EVENT_USB_Device_ControlRequest (USB_Request_Header_t *req)
 
void EVENT_USB_Device_Reset (void)
 
bool EVENT_USB_Device_SetInterface (uint8_t interface, uint8_t altsetting)
 
void EVENT_USB_Device_Suspend (void)
 
void EVENT_USB_Device_WakeUp (void)
 
void usb_cdc_dcd_off (void)
 
void usb_cdc_dcd_on (void)
 
unsigned int usb_handle_ring_note (void *pt, unsigned int)
 
unsigned int usb_handle_ring_rx (void *pt, unsigned int)
 
unsigned int usb_handle_ring_tx (void *pt, unsigned int)
 
void usb_init (void)
 

Variablen

EP_buffer cdc_rxb
 
EP_buffer cdc_txb
 
CDC_LineEncoding_t LineEncoding
 
volatile unsigned char usb_notify_state = EP_NOTE_IDLE
 
volatile unsigned char usb_stored_control = 0
 

Ausführliche Beschreibung

Bibliothek zur USB-Kommunikation von Jürgen W.

Autoren
: Jürgen H. (woodym) aus http://www.mikrocontroller.net/topic/295339
Datum
03.05.2013 / 30.08.2015
                $Revision: 464 $
                $Date: 2016-04-02 12:30:30 +0200 (Sa, 02 Apr 2016) $

Definiert in Datei usb_cdc.c.

Dokumentation der Funktionen

void EVENT_USB_Device_ConfigurationChanged ( uint8_t  config)

Event when the USB configuration is changed. The configuration is stored in variable USB_Device_ConfigurationNumber

Definiert in Zeile 191 der Datei usb_cdc.c.

void EVENT_USB_Device_ControlOUT ( uint8_t *  data,
uint8_t  len 
)

Event when OUT data is received as part of a control transfer.

Definiert in Zeile 221 der Datei usb_cdc.c.

bool EVENT_USB_Device_ControlRequest ( USB_Request_Header_t req)

Event handler for the library USB Control Request reception event.

Definiert in Zeile 239 der Datei usb_cdc.c.

void EVENT_USB_Device_Reset ( void  )

Event when the host resets the device. Called after the library resets the control endpoint

Definiert in Zeile 215 der Datei usb_cdc.c.

bool EVENT_USB_Device_SetInterface ( uint8_t  interface,
uint8_t  altsetting 
)

Event when an alternate setting for an interface is selected. Return true to accept the alternate setting, or FALSE to send a STALL reply

Definiert in Zeile 183 der Datei usb_cdc.c.

void EVENT_USB_Device_Suspend ( void  )

Event when the USB bus suspends

Definiert in Zeile 201 der Datei usb_cdc.c.

void EVENT_USB_Device_WakeUp ( void  )

Event when the USB bus returns from suspend

Definiert in Zeile 208 der Datei usb_cdc.c.

Variablen-Dokumentation

CDC_LineEncoding_t LineEncoding
Initialisierung:
=
{ .BaudRateBPS = 9600, .CharFormat = CDC_LINEENCODING_OneStopBit, .ParityType =
CDC_PARITY_None, .DataBits = 8 }

Definiert in Zeile 29 der Datei usb_cdc.c.