wavelength 1.0.0
Loading...
Searching...
No Matches
CxtModem Class Reference

A Conexant USB modem the driver attached to. More...

#include <cxtmodem.h>

Public Types

enum  LoadMode { kLoadModeNormal = 0 , kLoadModeAuto = 1 , kLoadModeTest = 2 }
 Load modes the lmode argument selects. More...
enum  LineBit { kLineActive = 0x01 , kLineConnected = 0x02 , kLineReserved = 0x04 }
 Line bits of the control packet. More...

Static Public Member Functions

static int Probe (int deviceId)
 Report whether the driver takes a device.
static int Connect (int deviceId)
 Attach to a device.
static int Disconnect (int deviceId)
 Detach from a removed device.

Static Public Attributes

static constexpr unsigned char kRegisterWriteCommand = 0x40
 Value written in each RegisterWrite.
static LoadMode sLoadMode
 Load mode from the module arguments.
static int sDeviceFound
 Whether a modem is attached, or for a normal load, whether to stay loaded.
static constexpr int kDialStringSize = 1024
 Size of sDialString.
static char sDialString [kDialStringSize]
 Value of the dial module argument.

Detailed Description

A Conexant USB modem the driver attached to.

The modem library drives it through the record in mModem. The device exposes UART-style registers written through the register endpoint, takes bytes to send on the bulk out endpoint, and reports received bytes and the modem status on the bulk in endpoint.

The module was built without RTTI. The name is inferred from the module's routines.

Member Enumeration Documentation

◆ LoadMode

Load modes the lmode argument selects.

Enumerator
kLoadModeNormal 

Stay loaded.

kLoadModeAuto 

Stay loaded only when a modem is attached.

kLoadModeTest 

Report whether a modem is attached, then unload.

◆ LineBit

Line bits of the control packet.

Enumerator
kLineActive 

Set while the modem is started.

kLineConnected 

Set while the line is connected.

kLineReserved 

Only ever cleared.

Member Function Documentation

◆ Probe()

int CxtModem::Probe ( int deviceId)
static

Report whether the driver takes a device.

Records that a modem is attached.

Parameters
deviceIdDevice identifier.
Returns
Nonzero to take the device. A test load does not take it.
Ghidra address:
NTSC-U/C: 0x00001574

◆ Connect()

int CxtModem::Connect ( int deviceId)
static

Attach to a device.

Open its pipes, select its configuration, read its names, register the modem, and start the firmware download thread.

Parameters
deviceIdDevice identifier.
Returns
Zero, or -1 on failure.
Ghidra address:
NTSC-U/C: 0x00001610

◆ Disconnect()

int CxtModem::Disconnect ( int deviceId)
static

Detach from a removed device.

An active modem only reports the removal and is released by Stop().

Parameters
deviceIdDevice identifier.
Returns
Zero, or -1 when the device has no modem.
Ghidra address:
NTSC-U/C: 0x00001b34

Member Data Documentation

◆ kRegisterWriteCommand

unsigned char CxtModem::kRegisterWriteCommand = 0x40
staticconstexpr

Value written in each RegisterWrite.

◆ sLoadMode

LoadMode CxtModem::sLoadMode
static

Load mode from the module arguments.

◆ sDeviceFound

int CxtModem::sDeviceFound
static

Whether a modem is attached, or for a normal load, whether to stay loaded.

◆ kDialStringSize

int CxtModem::kDialStringSize = 1024
staticconstexpr

Size of sDialString.

◆ sDialString

char CxtModem::sDialString[kDialStringSize]
static

Value of the dial module argument.


The documentation for this class was generated from the following file: