USBCSwitch

Class

class aUSBCSwitch : public Acroname::BrainStem::Module

Concrete Module implementation of a USBCSwitch Allows a user to connect to and control an attached switch.

Public Types

enum EQUALIZER_3P0_TRANSMITTER_CONFIGS

Equalizer 3P0 transmitter configs

Values:

enumerator MUX_1db_COM_0db_900mV
enumerator MUX_0db_COM_1db_900mV
enumerator MUX_1db_COM_1db_900mV
enumerator MUX_0db_COM_0db_900mV
enumerator MUX_0db_COM_0db_1100mV
enumerator MUX_1db_COM_0db_1100mV
enumerator MUX_0db_COM_1db_1100mV
enumerator MUX_2db_COM_2db_1100mV
enumerator MUX_0db_COM_0db_1300mV
enum EQUALIZER_3P0_RECEIVER_CONFIGS

Equalizer 3P0 receiver configs

Values:

enumerator LEVEL_1_3P0
enumerator LEVEL_2_3P0
enumerator LEVEL_3_3P0
enumerator LEVEL_4_3P0
enumerator LEVEL_5_3P0
enumerator LEVEL_6_3P0
enumerator LEVEL_7_3P0
enumerator LEVEL_8_3P0
enumerator LEVEL_9_3P0
enumerator LEVEL_10_3P0
enumerator LEVEL_11_3P0
enumerator LEVEL_12_3P0
enumerator LEVEL_13_3P0
enumerator LEVEL_14_3P0
enumerator LEVEL_15_3P0
enumerator LEVEL_16_3P0
enum EQUALIZER_2P0_TRANSMITTER_CONFIGS

Equalizer 2P0 transmitter configs

Values:

enumerator TRANSMITTER_2P0_40mV
enumerator TRANSMITTER_2P0_60mV
enumerator TRANSMITTER_2P0_80mV
enumerator TRANSMITTER_2P0_0mV
enum EQUALIZER_2P0_RECEIVER_CONFIGS

Equalizer 3P0 receiver configs

Values:

enumerator LEVEL_1_2P0
enumerator LEVEL_2_2P0
enum EQUALIZER_CHANNELS

Equalizer channels

Values:

enumerator BOTH
enumerator MUX
enumerator COMMON
enum daughtercard_type

Daughter Cards

Values:

enumerator NO_DAUGHTERCARD
enumerator PASSIVE_DAUGHTERCARD
enumerator REDRIVER_DAUGHTERCARD
enumerator UNKNOWN_DAUGHTERCARD

Public Members

Acroname::BrainStem::AppClass app[aUSBCSWITCH_NUM_APPS]

App Class

Acroname::BrainStem::MuxClass mux

Mux Class

Acroname::BrainStem::PointerClass pointer[aUSBCSWITCH_NUM_POINTERS]

Pointer Class

Acroname::BrainStem::StoreClass store[aUSBCSWITCH_NUM_STORES]

Store Class

Acroname::BrainStem::SystemClass system

System Class

Acroname::BrainStem::TimerClass timer[aUSBCSWITCH_NUM_TIMERS]

Timer Class

Acroname::BrainStem::USBClass usb

USB Class

Acroname::BrainStem::EqualizerClass equalizer[aUSBCSWITCH_NUM_EQ]

Equalizer Class

Defines

aUSBCSWITCH_MODULE 6

USBCSwitch module number

aUSBCSWITCH_NUM_APPS 4

Number of App instances available

aUSBCSWITCH_NUM_POINTERS 4

Number of Pointer instances available

aUSBCSWITCH_NUM_STORES 2

Number of Store instances available

aUSBCSWITCH_NUM_INTERNAL_SLOTS 12

Store: Number of internal slots instances available

aUSBCSWITCH_NUM_RAM_SLOTS 1

Store: Number of RAM slot instances available

aUSBCSWITCH_NUM_TIMERS 8

Number of Timer instances available

aUSBCSWITCH_NUM_USB 1

Number of USB instances available

aUSBCSWITCH_NUM_MUX 1

Number of Mux instances available

aUSBCSWITCH_NUM_EQ 2

Number of Equalizer instances available

aUSBCSWITCH_NUM_MUX_CHANNELS 4

Number of Mux channels available

Port State Defines

usbPortStateVBUS 0

USB VBUS current state

usbPortStateUSB2A 1

USB2 side A current state

usbPortStateUSB2B 2

USB2 side B current state

usbPortStateSBU 3

SBU current state

usbPortStateSS1 4

SS1 current state

usbPortStateSS2 5

SS2 A current state

usbPortStateCC1 6

CC1 current state

usbPortStateCC2 7

CC2 A current state

set_usbPortStateCOM_ORIENT_STATUS(var, state) ((var & ~(3 << 8 )) | (state << 8))

Common side orientation status

get_usbPortStateCOM_ORIENT_STATUS(var) ((var &  (3 << 8 )) >> 8)

Common side orientation status

set_usbPortStateMUX_ORIENT_STATUS(var, state) ((var & ~(3 << 10 )) | (state << 10))

Mux side orientation status

get_usbPortStateMUX_ORIENT_STATUS(var) ((var &  (3 << 10 )) >> 10)

Mux side orientation status

set_usbPortStateSPEED_STATUS(var, state) ((var & ~(3 << 12)) | (state << 12))

USB speed status

get_usbPortStateSPEED_STATUS(var) ((var &  (3 << 12)) >> 12)

USB speed status

usbPortStateCCFlip 14

CC flip status

usbPortStateSSFlip 15

SS flip status

usbPortStateSBUFlip 16

SBU flip status

usbPortStateUSB2Flip 17

USB2 flip status

get_usbPortStateDaughterCard(var) ((var & (3 << 18)) >> 18)

Daughter card status

usbPortStateErrorFlag 20

Error indicator for this port

usbPortStateUSB2Boost 21

USB2 boost current state

usbPortStateUSB3Boost 22

USB3 boost current state

usbPortStateConnectionEstablished 23

Connection established state

usbPortStateCC1Inject 26

CC1 inject current state

usbPortStateCC2Inject 27

CC2 inject current state

usbPortStateCC1Detect 28

CC1 detect current state

usbPortStateCC2Detect 29

CC2 detect current state

usbPortStateCC1LogicState 30

CC1 logic current state

usbPortStateCC2LogicState 31

CC2 logic current state

Port State Error Defines

usbPortStateOff 0

Indicator for port state off

usbPortStateSideA 1

Indicator for port side A

usbPortStateSideB 2

Indicator for port side B

usbPortStateSideUndefined 3

Indicator for port side undefined