//*****************************************************************************
//*****************************************************************************
//  FILENAME:  ADCINC12_1.h
//  Version: 5.2.0.8, Updated on 2004/06/30 at 16:34:34
//  Generated by PSoC Designer ver 4.2 BETA b1005 : 09 July, 2004
//
//  DESCRIPTION:
//    C declarations for the ACDINC12 User Module.
//-----------------------------------------------------------------------------
//      Copyright (c) Cypress MicroSystems 2002-2003. All Rights Reserved.
//*****************************************************************************
//*****************************************************************************


#include <M8C.h>


#pragma fastcall16 ADCINC12_1_Start
#pragma fastcall16 ADCINC12_1_SetPower
#pragma fastcall16 ADCINC12_1_GetSamples
#pragma fastcall16 ADCINC12_1_StopAD
#pragma fastcall16 ADCINC12_1_Stop

#pragma fastcall16 ADCINC12_1_fIsDataAvailable
#pragma fastcall16 ADCINC12_1_iGetData
#pragma fastcall16 ADCINC12_1_ClearFlag

//-------------------------------------------------
// Prototypes of the ADCINC12_1 API.
//-------------------------------------------------
extern void ADCINC12_1_Start(BYTE  bPower);
extern void ADCINC12_1_SetPower(BYTE bPower);
extern void ADCINC12_1_GetSamples(BYTE bNumSamples);
extern void ADCINC12_1_StopAD(void);
extern void ADCINC12_1_Stop(void);

extern BYTE ADCINC12_1_fIsDataAvailable(void);
extern INT  ADCINC12_1_iGetData(void);
extern void ADCINC12_1_ClearFlag(void);

// deprecated function!
#pragma fastcall16 ADCINC12_1_fIsData
extern BYTE ADCINC12_1_fIsData(void);


//-------------------------------------------------
// Constants for ADCINC12_1 API's.
//-------------------------------------------------
#define ADCINC12_1_OFF         0
#define ADCINC12_1_LOWPOWER    1
#define ADCINC12_1_MEDPOWER    2
#define ADCINC12_1_HIGHPOWER   3

//-------------------------------------------------
// Register Addresses for ADCINC12_1
//-------------------------------------------------

#pragma ioport  ADCINC12_1_AtoDcr0: 0x084
BYTE            ADCINC12_1_AtoDcr0;
#pragma ioport  ADCINC12_1_AtoDcr1: 0x085
BYTE            ADCINC12_1_AtoDcr1;
#pragma ioport  ADCINC12_1_AtoDcr2: 0x086
BYTE            ADCINC12_1_AtoDcr2;
#pragma ioport  ADCINC12_1_AtoDcr3: 0x087
BYTE            ADCINC12_1_AtoDcr3;
#pragma ioport  ADCINC12_1_CounterFN:   0x124
BYTE            ADCINC12_1_CounterFN;
#pragma ioport  ADCINC12_1_CounterSL:   0x125
BYTE            ADCINC12_1_CounterSL;
#pragma ioport  ADCINC12_1_CounterOS:   0x126
BYTE            ADCINC12_1_CounterOS;
#pragma ioport  ADCINC12_1_CounterDR0:  0x024
BYTE            ADCINC12_1_CounterDR0;
#pragma ioport  ADCINC12_1_CounterDR1:  0x025
BYTE            ADCINC12_1_CounterDR1;
#pragma ioport  ADCINC12_1_CounterDR2:  0x026
BYTE            ADCINC12_1_CounterDR2;
#pragma ioport  ADCINC12_1_CounterCR0:  0x027
BYTE            ADCINC12_1_CounterCR0;
#pragma ioport  ADCINC12_1_TimerFN: 0x120
BYTE            ADCINC12_1_TimerFN;
#pragma ioport  ADCINC12_1_TimerSL: 0x121
BYTE            ADCINC12_1_TimerSL;
#pragma ioport  ADCINC12_1_TimerOS: 0x122
BYTE            ADCINC12_1_TimerOS;
#pragma ioport  ADCINC12_1_TimerDR0:    0x020
BYTE            ADCINC12_1_TimerDR0;
#pragma ioport  ADCINC12_1_TimerDR1:    0x021
BYTE            ADCINC12_1_TimerDR1;
#pragma ioport  ADCINC12_1_TimerDR2:    0x022
BYTE            ADCINC12_1_TimerDR2;
#pragma ioport  ADCINC12_1_TimerCR0:    0x023
BYTE            ADCINC12_1_TimerCR0;
