tinyusb  0.4
Click here to lend your support to tinyusb donation and make a donation at pledgie.com
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Configuration tusb_config.h

Modules

 Host Options
 
 Device Options
 
 Controller Mode Selection
 TUSB_CFG_CONTROLLER_N_MODE must be defined with these.
 

Macros

#define TUSB_CFG_CONTROLLER_0_MODE
 tell the stack which mode (host/device/otg) the usb controller0 will be operated on. Possible value is from Controller Mode Selection. Note the hardware usb controller must support the selected mode.
 
#define TUSB_CFG_ATTR_USBRAM
 
#define TUSB_CFG_MCU
 Select one of the supported MCU, the value must be from Supported MCU.
 
#define TUSB_CFG_OS
 Select one of the supported RTOS, the value must be from Supported RTOS.
 
#define TUSB_CFG_OS_TASK_PRIO
 If TUSB_CFG_OS is configured to use a real RTOS (other than TUSB_OS_NONE). This determines the priority of the usb stack task.
 
#define TUSB_CFG_TICKS_HZ
 The rate ticks in hert. This is used in conjunction with tusb_tick_get to calculate timing.
 
#define CONTROLLER_HOST_NUMBER
 
#define CONTROLLER_DEVICE_NUMBER
 
#define MODE_HOST_SUPPORTED   (CONTROLLER_HOST_NUMBER > 0)
 
#define MODE_DEVICE_SUPPORTED   (CONTROLLER_DEVICE_NUMBER > 0)
 
#define TUSB_CFG_DEBUG   0
 
#define TUSB_CFG_HOST_DEVICE_MAX   1
 
#define HOST_CLASS_HID   ( TUSB_CFG_HOST_HID_KEYBOARD + TUSB_CFG_HOST_HID_MOUSE + TUSB_CFG_HOST_HID_GENERIC )
 
#define TUSB_CFG_HOST_ENUM_BUFFER_SIZE   256
 

Detailed Description

Macro Definition Documentation

#define CONTROLLER_DEVICE_NUMBER
Value:
(\
((TUSB_CFG_CONTROLLER_1_MODE & TUSB_MODE_DEVICE) ? 1 : 0))
#define TUSB_CFG_CONTROLLER_0_MODE
tell the stack which mode (host/device/otg) the usb controller0 will be operated on. Possible value is from Controller Mode Selection. Note the hardware usb controller must support the selected mode.
#define TUSB_MODE_DEVICE
Device Mode.
Definition: tusb_option.h:78

Definition at line 94 of file tusb_option.h.

#define CONTROLLER_HOST_NUMBER
Value:
(\
((TUSB_CFG_CONTROLLER_1_MODE & TUSB_MODE_HOST) ? 1 : 0))
#define TUSB_CFG_CONTROLLER_0_MODE
tell the stack which mode (host/device/otg) the usb controller0 will be operated on. Possible value is from Controller Mode Selection. Note the hardware usb controller must support the selected mode.
#define TUSB_MODE_HOST
Host Mode.
Definition: tusb_option.h:77

Definition at line 90 of file tusb_option.h.

#define TUSB_CFG_ATTR_USBRAM

USB controller in MCU often has limited access to specific RAM section. The Stack will use this macro to place internal variables into the USB RAM section as follows. if your mcu's usb controller has no such limit, define TUSB_CFG_ATTR_USBRAM as empty macro.

TUSB_CFG_ATTR_USBRAM uint8_t usb_xfer_buffer[10];

Definition at line 19 of file configuration.txt.

#define TUSB_CFG_DEBUG   0

determines the debug level for the stack

  • Level 3: TBD
  • Level 2: ATTR_ALWAYS_INLINE is null –> no function is inline
  • Level 1: Print out if Assert failed. STATIC_VAR is NULL –> accessible when debugging
  • Level 0: no debug information is generated

Definition at line 116 of file tusb_option.h.