KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
modem.h File Reference

Definitions to use the Dreamcast modem. More...

#include "mconst.h"

Go to the source code of this file.

Macros

#define MODEM_MODE_REMOTE   0
 Connect to a remote modem.
 
#define MODEM_MODE_ANSWER   1
 Answer a call when a ring is detected.
 
#define MODEM_MODE_NULL   255
 Modem not in use.
 
#define MODEM_SPEED_V22BIS_1200   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V22BIS, MODEM_SPEED_1200)
 1200bps, V.22bis
 
#define MODEM_SPEED_V22BIS_2400   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V22BIS, MODEM_SPEED_2400)
 2400bps, V.22bis
 
#define MODEM_SPEED_V22_1200   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V22, MODEM_SPEED_1200)
 1200bps, V.22
 
#define MODEM_SPEED_V32_4800   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V32, MODEM_SPEED_4800)
 4800bps, V.32
 
#define MODEM_SPEED_V32_9600   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V32, MODEM_SPEED_9600)
 9600bps, V.32
 
#define MODEM_SPEED_V32BIS_7200   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V32BIS, MODEM_SPEED_7200)
 7200bps, V.32bis
 
#define MODEM_SPEED_V32BIS_12000   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V32BIS, MODEM_SPEED_12000)
 12000bps, V.32bis
 
#define MODEM_SPEED_V32BIS_14400   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V32BIS, MODEM_SPEED_14400)
 14400bps, V.32bis
 
#define MODEM_SPEED_V8_2400   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V8, MODEM_SPEED_2400)
 2400bps, V.8
 
#define MODEM_SPEED_V8_4800   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V8, MODEM_SPEED_4800)
 4800bps, V.8
 
#define MODEM_SPEED_V8_7200   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V8, MODEM_SPEED_7200)
 7200bps, V.8
 
#define MODEM_SPEED_V8_9600   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V8, MODEM_SPEED_9600)
 9600bps, V.8
 
#define MODEM_SPEED_V8_12000   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V8, MODEM_SPEED_12000)
 12000bps, V.8
 
#define MODEM_SPEED_V8_14400   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V8, MODEM_SPEED_14400)
 14400bps, V.8
 
#define MODEM_SPEED_V8_16800   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V8, MODEM_SPEED_16800)
 16800bps, V.8
 
#define MODEM_SPEED_V8_19200   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V8, MODEM_SPEED_19200)
 19200bps, V.8
 
#define MODEM_SPEED_V8_21600   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V8, MODEM_SPEED_21600)
 21600bps, V.8
 
#define MODEM_SPEED_V8_24000   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V8, MODEM_SPEED_24000)
 24000bps, V.8
 
#define MODEM_SPEED_V8_26400   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V8, MODEM_SPEED_26400)
 26400bps, V.8
 
#define MODEM_SPEED_V8_28000   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V8, MODEM_SPEED_28000)
 28000bps, V.8
 
#define MODEM_SPEED_V8_31200   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V8, MODEM_SPEED_31200)
 31200bps, V.8
 
#define MODEM_SPEED_V8_33600   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V8, MODEM_SPEED_33600)
 33600bps, V.8
 
#define MODEM_SPEED_V8_AUTO   MODEM_MAKE_SPEED(MODEM_PROTOCOL_V8, MODEM_SPEED_1200)
 Automatically set speed, V.8.
 

Typedefs

typedef void(* MODEMEVENTHANDLERPROC) (modemEvent_t event)
 Type of a modem event handling function.
 

Enumerations

enum  modemEvent_t {
  MODEM_EVENT_CONNECTION_FAILED = 0 , MODEM_EVENT_CONNECTED , MODEM_EVENT_DISCONNECTED , MODEM_EVENT_RX_NOT_EMPTY ,
  MODEM_EVENT_OVERFLOW , MODEM_EVENT_TX_EMPTY
}
 Modem Event Types. More...
 

Functions

int modem_init (void)
 Initialize the modem.
 
void modem_shutdown (void)
 Shut down the modem.
 
int modem_set_mode (int mode, modem_speed_t speed)
 Set the modem up for the specified mode.
 
int modem_wait_dialtone (int ms_timeout)
 Wait for the modem to detect a dialtone.
 
int modem_dial (const char *digits)
 Dial the specified number on the modem.
 
void modem_set_event_handler (MODEMEVENTHANDLERPROC eventHandler)
 Set the event handler for the modem.
 
void modem_disconnect (void)
 Disconnect the modem.
 
int modem_is_connecting (void)
 Check if the modem is connecting.
 
int modem_is_connected (void)
 Check if the modem is connected.
 
unsigned long modem_get_connection_rate (void)
 Get the connection rate that the modem is connected at.
 
int modem_read_data (unsigned char *data, int size)
 Read data from the modem buffers.
 
int modem_write_data (unsigned char *data, int size)
 Write data to the modem buffers.
 
int modem_has_data (void)
 Check if the modem has data waiting to be read.
 

Detailed Description

Definitions to use the Dreamcast modem.

This file contains functions and constants to be used with the Dreamcast modem driver.

Author
Nick Kochakian