/****************************************************************************/
/* Copyright 2003-2018 MBARI												*/
/****************************************************************************/
/* Summary	: Definitions for Acoustic Modem for BEDS2 on PIC32MX			*/
/* Filename : modem.h														*/
/* Author	: Robert Herlien (rah)											*/
/* Project	: BEDS (Benthic Event Detection System)							*/	
/* Revision : 1.0															*/
/* Created	: 12/07/2012													*/
/*																			*/
/* MBARI provides this documentation and code "as is", with no warranty,	*/
/* express or implied, of its quality or consistency. It is provided without*/
/* support and without obligation on the part of the Monterey Bay Aquarium	*/
/* Research Institute to assist in its use, correction, modification, or	*/
/* enhancement. This information should not be published or distributed to	*/
/* third parties without specific written permission from MBARI.			*/
/*																			*/
/****************************************************************************/
/* Modification History:													*/
/* 07dec2012 rah - created													*/
/* 28feb2018 rah - Ported to BEDS2 on PIC32MX470							*/
/****************************************************************************/

#ifndef INCmodemh
#define INCmodemh		1

#include <beds.h>				/* Defines DEBUG_MODEM					*/


/****************************************/
/* Function Declarations				*/
/****************************************/

Void	modemInit(Void);
MBool	modemConnectCheck();
Void	modemOn(Void);
Void	modemOff(Void);
Void	checkModemBatt(Void);
CmdRtn	ModemCmd(int argc, char **argv);
CmdRtn	ModemConnectCmd(int argc, char **argv);
CmdRtn	ModemDisconnectCmd(int argc, char **argv, char *cmdline);
CmdRtn	ModemOfflineCmd(int argc, char **argv);
MBool	modemCommandMode(void);
void	modemOnlineMode(void);
int		getSReg(int reg);
int		getRemoteSReg(int modem, int reg);
void	setRemoteSReg(int modem, int reg, int val);
CmdRtn	SRegCmd(int argc, char **argv);

#endif	/* INCmodemh */
