|
KallistiOS git master
Independent SDK for the Sega Dreamcast
|
Driver for the Dreamcast's built-in 56k Modem More...
Topics | |
| Modes of Operation | |
| Operating modes for modem | |
| Protocol Values | |
| Modem protocol values | |
| Speed Values | |
| Modem speed values | |
| V.22 Modes | |
| Modem V.22 Modes | |
| V.22bis Modes | |
| Modem V.22bis Modes | |
| V.32 Modes | |
| Modem V.32 Modes | |
| V.32bis Modes | |
| Modem V.32 Modes | |
| V.8 Modes | |
| Modem V.8 Modes | |
Files | |
| file | mconst.h |
| Constants used in the modem driver. | |
| file | modem.h |
| Definitions to use the Dreamcast modem. | |
Macros | |
| #define | MODEM_SPEED_GET_PROTOCOL(x) |
| Extract the protocol from a full speed/protocol value. | |
| #define | MODEM_SPEED_GET_SPEED(x) |
| Extract the speed from a full speed/protocol value. | |
| #define | MODEM_MAKE_SPEED(p, s) |
| Combine a protocol and speed into a single value. | |
Typedefs | |
| typedef unsigned char | modem_speed_t |
| Modem speed/protocol value type. | |
| 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. | |
Driver for the Dreamcast's built-in 56k Modem
| #define MODEM_MAKE_SPEED | ( | p, | |
| s ) |
Combine a protocol and speed into a single value.
| p | The protocol to use. |
| s | The speed to use. |
| #define MODEM_SPEED_GET_PROTOCOL | ( | x | ) |
Extract the protocol from a full speed/protocol value.
| x | The speed/protocol value to look at. |
| #define MODEM_SPEED_GET_SPEED | ( | x | ) |
Extract the speed from a full speed/protocol value.
| x | The speed/protocol value to look at. |
| typedef unsigned char modem_speed_t |
Modem speed/protocol value type.
| typedef void(* MODEMEVENTHANDLERPROC) (modemEvent_t event) |
Type of a modem event handling function.
| enum modemEvent_t |
Modem Event Types.
These are the events that a modem event handler should be expected to receive at any given point in time.
| int modem_dial | ( | const char * | digits | ) |
Dial the specified number on the modem.
| digits | The number to dial, as a string. |
| 0 | On failure. |
| 1 | On success. |
| void modem_disconnect | ( | void | ) |
Disconnect the modem.
This function instructs the modem to disconnect from the remote modem.
Referenced by main().
| unsigned long modem_get_connection_rate | ( | void | ) |
Get the connection rate that the modem is connected at.
Referenced by main().
| int modem_has_data | ( | void | ) |
Check if the modem has data waiting to be read.
Referenced by main().
| int modem_init | ( | void | ) |
Initialize the modem.
This function initializes the modem for use.
| 0 | On failure. |
| 1 | On success. |
Referenced by main().
| int modem_is_connected | ( | void | ) |
Check if the modem is connected.
Referenced by main().
| int modem_is_connecting | ( | void | ) |
Check if the modem is connecting.
Referenced by main().
| int modem_read_data | ( | unsigned char * | data, |
| int | size ) |
Read data from the modem buffers.
| data | The buffer to read into. |
| size | The maximum number of bytes to read. |
Referenced by main().
| void modem_set_event_handler | ( | MODEMEVENTHANDLERPROC | eventHandler | ) |
Set the event handler for the modem.
This function sets up an event handler for when things happen on the modem.
| eventHandler | The function to call when an event occurs. |
| int modem_set_mode | ( | int | mode, |
| modem_speed_t | speed ) |
Set the modem up for the specified mode.
This function sets up the modem's registers for the specified mode and speed combination.
| mode | The mode to use. |
| speed | The speed to use. |
Referenced by main().
| void modem_shutdown | ( | void | ) |
Shut down the modem.
This function shuts down the modem after it has been initialized, resetting all of the registers to their defaults.
| int modem_wait_dialtone | ( | int | ms_timeout | ) |
Wait for the modem to detect a dialtone.
This function waits for a dialtone to be detected on the modem.
| ms_timeout | The number of milliseconds to wait, in multiples of 100. |
| 0 | If a dialtone is detected before timeout. |
| -1 | If no dialtone is detected. |
| int modem_write_data | ( | unsigned char * | data, |
| int | size ) |
Write data to the modem buffers.
| data | The buffer to write from. |
| size | The maximum number of bytes to write. |
Referenced by main().