//*** ntk.h contains function prototypes for NORTEK AD2CP
//*** JAN 2013 : bdj
// jun13 updated 
//*******************************************************************

//---------globals-----------------------------------------------


//---mode definitions returned from ntk_inq() request-------------
#define NTK_UPDATE_MODE   0  // firmware-update (should never happen)
#define NTK_MEASURE_MODE  1  // measurement 
#define NTK_CMD_MODE      2  // command 
#define NTK_GETDATA_MODE  4  // data-retrieval 
#define NTK_CONFIRM_MODE  5  // confirmation 

//--- prototype declarations -------------------------------------
void   ntk_rs232_init ( void );
short  ntk_on         ( void );
short  ntk_off        ( void );
void   ntk_alloc      ( struct adp_param *adp); // ** allocate memory 
void   ntk_set_beam   ( void );
short  ntk_cmd_rqst   ( char *s ); 
short  ntk_inq        ( void );
short  ntk_brk        ( void );
short  ntk_sw_mode    ( short newmode);
short  ntk_pwrdwn     ( void );
void   Transparent    ( void );
short  ntk_plan       ( short set);
short  ntk_cp         ( short set);
short  ntk_burst      ( short set);
short  ntk_tm         ( short set);
short  ntk_clk        ( void     );
short  ntk_erase      ( short fid);
short  ntk_fwrite     ( char *s, short fid);
short  ntk_get_sample ( short type);
void   ntk_wait_xmit  ( short sec);
short  ntk_store      ( unsigned char *b, short nbytes); // store sample to memory
void   ntk_pack       ( void ); //average and pack data for use in adp parsing routines
short  ntk_rd16       ( uchar ch, uchar ch1);
long   ntk_rd32       ( uchar ch, uchar ch1, uchar ch2, uchar ch3);
ushort ntk_calc_CRC   ( ushort *pData,  ushort size,  short idx  );
void   ntk_sbd_param  ( void );
short  ntk_start_pro  ( void );
short  ntk_stop_pro   ( void );
short  ntk_led        (  short on  ); // new oct16
void   test_ntk       ( void );  // basic test commands

//--- aug13 altimeter functions ----------------------------------
short  ntk_alt_start  ( void );
short  ntk_altimeter  ( void );
short  process_ntk_alt( void );
short  find_ntk_alt   ( short iddb, short ithr, short ib );

//----------------------------------------------------------------
