Contiki-NG
Loading...
Searching...
No Matches

Files

file  usb-arch.c
 USB implementation for the nRF.
 
file  usb.c
 USB driver for the nRF.
 
file  usb.h
 USB header file for the nRF.
 
file  usb_descriptors.h
 USB descriptors header file for the nRF.
 

Functions

void usb_interrupt_handler (void)
 Handles the interrupt.
 
void usb_set_input (int(*input)(unsigned char c))
 Sets the input handler called in the event handler.
 
void usb_init (void)
 Initialize the USB driver.
 
void usb_write (uint8_t *buffer, uint32_t buffer_size)
 Writes to the USB driver.
 
void usb_flush (void)
 Flush USB buffer.
 
void usb_arch_init (void)
 Initialize the architecture specific USB driver.
 
void usb_descriptor_set_manufacturer (char *manufacturer)
 Set the manufactorer.
 
void usb_descriptor_set_product (char *product)
 Set the product.
 
void usb_descriptor_set_serial (char *serial)
 Set the serial.
 
void usb_descriptor_set_cdc_interface (char *cdc_interface)
 Set the cdc interface.
 

Detailed Description

Function Documentation

◆ usb_descriptor_set_cdc_interface()

void usb_descriptor_set_cdc_interface ( char * cdc_interface)

Set the cdc interface.

Parameters
cdc_interfacepointer to cdc interface string

Definition at line 181 of file usb_descriptors.c.

Referenced by usb_init().

◆ usb_descriptor_set_manufacturer()

void usb_descriptor_set_manufacturer ( char * manufacturer)

Set the manufactorer.

Parameters
manufacturerpointer to manufactorer string

Definition at line 166 of file usb_descriptors.c.

Referenced by usb_init().

◆ usb_descriptor_set_product()

void usb_descriptor_set_product ( char * product)

Set the product.

Parameters
productpointer to product string

Definition at line 171 of file usb_descriptors.c.

Referenced by usb_init().

◆ usb_descriptor_set_serial()

void usb_descriptor_set_serial ( char * serial)

Set the serial.

Parameters
serialpointer to serial string

Definition at line 176 of file usb_descriptors.c.

◆ usb_flush()

void usb_flush ( void )

Flush USB buffer.

Precondition
usb_init must have been called
Data must be written by usb_write prior

Definition at line 112 of file usb.c.

Referenced by usb_write().

◆ usb_interrupt_handler()

void usb_interrupt_handler ( void )

Handles the interrupt.

Remarks
Must be called from the arch interrupt handler

Definition at line 64 of file usb.c.

References process_poll().

◆ usb_set_input()

void usb_set_input ( int(*)(unsigned char c) input)

Sets the input handler called in the event handler.

Parameters
inputcharacter that has been read

Definition at line 75 of file usb.c.

Referenced by platform_init_stage_two().

◆ usb_write()

void usb_write ( uint8_t * buffer,
uint32_t buffer_size )

Writes to the USB driver.

Parameters
bufferdata to be transferred
buffer_sizesize of data
Precondition
usb_init must have been called

Definition at line 94 of file usb.c.

References usb_flush().