libhd 5.0
Data Structures | Defines | Functions | Variables
Modem devices
Device handling

Modem detection functions. More...

Data Structures

struct  speeds_s

Defines

#define MAX_SPEED   (sizeof speeds / sizeof *speeds)
#define MAX_INIT_STRING   (sizeof init_strings / sizeof *init_strings)

Functions

static void get_serial_modem (hd_data_t *hd_data)
static void add_serial_modem (hd_data_t *hd_data)
static int dev_name_duplicate (hd_data_t *hd_data, char *dev_name)
static void guess_modem_name (hd_data_t *hd_data, ser_device_t *sm)
static void at_cmd (hd_data_t *hd_data, char *at, int raw, int log_it)
static void write_modem (hd_data_t *hd_data, char *msg)
static void read_modem (hd_data_t *hd_data)
static ser_device_tadd_ser_modem_entry (ser_device_t **sm, ser_device_t *new_sm)
static int set_modem_speed (ser_device_t *sm, unsigned baud)
static int init_modem (ser_device_t *mi)
static unsigned chk4id (ser_device_t *mi)
static void dump_ser_modem_data (hd_data_t *hd_data)
void hd_scan_modem (hd_data_t *hd_data)
int check_for_responce (str_list_t *str_list, char *str, int len)
str_list_tstr_list_dup (str_list_t *orig)
int is_pnpinfo (ser_device_t *mi, int ofs)

Variables

static struct speeds_s speeds []
static char * init_strings []

Detailed Description

Modem detection functions.

Note: what about modem speed?


Define Documentation

#define MAX_INIT_STRING   (sizeof init_strings / sizeof *init_strings)

Referenced by get_serial_modem().

#define MAX_SPEED   (sizeof speeds / sizeof *speeds)

Function Documentation

ser_device_t * add_ser_modem_entry ( ser_device_t **  sm,
ser_device_t new_sm 
) [static]

References s_ser_device_t::next.

Referenced by get_serial_modem().

void add_serial_modem ( hd_data_t hd_data) [static]
void at_cmd ( hd_data_t hd_data,
char *  at,
int  raw,
int  log_it 
) [static]
int check_for_responce ( str_list_t str_list,
char *  str,
int  len 
)

References s_str_list_t::next, and s_str_list_t::str.

Referenced by get_serial_modem().

unsigned chk4id ( ser_device_t mi) [static]
int dev_name_duplicate ( hd_data_t hd_data,
char *  dev_name 
) [static]
void dump_ser_modem_data ( hd_data_t hd_data) [static]
void get_serial_modem ( hd_data_t hd_data) [static]
void guess_modem_name ( hd_data_t hd_data,
ser_device_t sm 
) [static]
void hd_scan_modem ( hd_data_t hd_data)
int init_modem ( ser_device_t mi) [static]
int is_pnpinfo ( ser_device_t mi,
int  ofs 
)
void read_modem ( hd_data_t hd_data) [static]

References s_ser_device_t::next, and hd_data_t::ser_modem.

Referenced by at_cmd().

int set_modem_speed ( ser_device_t sm,
unsigned  baud 
) [static]
str_list_t* str_list_dup ( str_list_t orig)
void write_modem ( hd_data_t hd_data,
char *  msg 
) [static]

Variable Documentation

char* init_strings[] [static]
Initial value:
 {
  "Q0 V1 E1",
  "S0=0",
  "&C1",
  "&D2",
  "+FCLASS=0"
}

Referenced by get_serial_modem().

struct speeds_s speeds[] [static]