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

Files

file  arch/cpu/nrf/dev/usb-arch.c
 USB implementation for the nRF.
file  arch/cpu/nrf/usb/usb.c
 USB driver for the nRF.
file  arch/cpu/nrf/usb/usb.h
 USB header file for the nRF.
file  arch/cpu/nrf/usb/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 235 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 220 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 225 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 230 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 116 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 68 of file usb.c.

References process_poll().

◆ usb_set_input()

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

Sets the input handler called in the event handler.

Parameters
inputcharacter that has been read

Definition at line 79 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 98 of file usb.c.

References usb_flush().