//*****************************************************************************
//*****************************************************************************
//  FILENAME:  TRIADC8_1.h
//  Version: 1.0.0.13, Updated on 2004/07/07 at 17:55:40
//  Generated by PSoC Designer ver 4.2 BETA b1005 : 09 July, 2004
//
//  DESCRIPTION:  TriADC8 User Module C Language interface file for the
//                25/26/27xxx PSoC family of devices.
//-----------------------------------------------------------------------------
//      Copyright (c) Cypress MicroSystems 2001-2003. All Rights Reserved.
//*****************************************************************************
//*****************************************************************************

#include <m8C.h>

//-------------------------------------------------
// Constants for TRIADC8_1 API's.
//-------------------------------------------------
#define TRIADC8_1_OFF            0
#define TRIADC8_1_LOWPOWER       1
#define TRIADC8_1_MEDPOWER       2
#define TRIADC8_1_HIGHPOWER      3

//-------------------------------------------------
// Function fastcall16 Pragmas
//-------------------------------------------------
#pragma fastcall16 TRIADC8_1_Start
#pragma fastcall16 TRIADC8_1_SetPower
#pragma fastcall16 TRIADC8_1_GetSamples
#pragma fastcall16 TRIADC8_1_StopAD
#pragma fastcall16 TRIADC8_1_Stop
#pragma fastcall16 TRIADC8_1_fIsData
#pragma fastcall16 TRIADC8_1_fIsDataAvailable
#pragma fastcall16 TRIADC8_1_cGetData1
#pragma fastcall16 TRIADC8_1_cGetData1ClearFlag
#pragma fastcall16 TRIADC8_1_cGetData2
#pragma fastcall16 TRIADC8_1_cGetData2ClearFlag
#pragma fastcall16 TRIADC8_1_cGetData3
#pragma fastcall16 TRIADC8_1_cGetData3ClearFlag
#pragma fastcall16 TRIADC8_1_ClearFlag
#pragma fastcall16 TRIADC8_1_SetCalcTime 


//-------------------------------------------------
// Prototypes of the TRIADC8_1 API.
//-------------------------------------------------
extern void TRIADC8_1_Start(BYTE bPower);
extern void TRIADC8_1_SetPower(BYTE bPower);
extern void TRIADC8_1_GetSamples(void);
extern void TRIADC8_1_StopAD(void);
extern void TRIADC8_1_Stop(void);
extern CHAR TRIADC8_1_fIsData(void);
extern CHAR TRIADC8_1_fIsDataAvailable(void);
extern char TRIADC8_1_cGetData1(void);
extern char TRIADC8_1_cGetData2(void);
extern char TRIADC8_1_cGetData3(void);
extern char TRIADC8_1_cGetData1ClearFlag(void);
extern char TRIADC8_1_cGetData2ClearFlag(void);
extern char TRIADC8_1_cGetData3ClearFlag(void);
extern void TRIADC8_1_ClearFlag(void);
extern void TRIADC8_1_SetCalcTime(int iCalcTime);


//-------------------------------------------------
// Register Addresses for TRIADC8_1
//-------------------------------------------------
// ADC1 Integrator Block Register Definitions
#pragma ioport  TRIADC8_1_bfADC1cr0:    0x080
BYTE            TRIADC8_1_bfADC1cr0;
#pragma ioport  TRIADC8_1_bfADC1cr1:    0x081
BYTE            TRIADC8_1_bfADC1cr1;
#pragma ioport  TRIADC8_1_bfADC1cr2:    0x082
BYTE            TRIADC8_1_bfADC1cr2;
#pragma ioport  TRIADC8_1_bfADC1cr3:    0x083
BYTE            TRIADC8_1_bfADC1cr3;

// ADC2 Integrator Block Register Definitions
#pragma ioport  TRIADC8_1_bfADC2cr0:    0x084
BYTE            TRIADC8_1_bfADC2cr0;
#pragma ioport  TRIADC8_1_bfADC2cr1:    0x085
BYTE            TRIADC8_1_bfADC2cr1;
#pragma ioport  TRIADC8_1_bfADC2cr2:    0x086
BYTE            TRIADC8_1_bfADC2cr2;
#pragma ioport  TRIADC8_1_bfADC2cr3:    0x087
BYTE            TRIADC8_1_bfADC2cr3;

// ADC3 Integrator Block Register Definitions
#pragma ioport  TRIADC8_1_bfADC3cr0:    0x08c
BYTE            TRIADC8_1_bfADC3cr0;
#pragma ioport  TRIADC8_1_bfADC3cr1:    0x08d
BYTE            TRIADC8_1_bfADC3cr1;
#pragma ioport  TRIADC8_1_bfADC3cr2:    0x08e
BYTE            TRIADC8_1_bfADC3cr2;
#pragma ioport  TRIADC8_1_bfADC3cr3:    0x08f
BYTE            TRIADC8_1_bfADC3cr3;

// Counter 1 Block Register Definitions
#pragma ioport  TRIADC8_1_fCounter1FN:  0x120
BYTE            TRIADC8_1_fCounter1FN;
#pragma ioport  TRIADC8_1_fCounter1SL:  0x121
BYTE            TRIADC8_1_fCounter1SL;
#pragma ioport  TRIADC8_1_fCounter1OS:  0x122
BYTE            TRIADC8_1_fCounter1OS;
#pragma ioport  TRIADC8_1_bCount1:  0x020
BYTE            TRIADC8_1_bCount1;
#pragma ioport  TRIADC8_1_bPeriod1: 0x021
BYTE            TRIADC8_1_bPeriod1;
#pragma ioport  TRIADC8_1_bCompare1:    0x022
BYTE            TRIADC8_1_bCompare1;
#pragma ioport  TRIADC8_1_bCounter1_CR0:    0x023
BYTE            TRIADC8_1_bCounter1_CR0;

// Counter 2 Block Register Definitions
#pragma ioport  TRIADC8_1_fCounter2FN:  0x140
BYTE            TRIADC8_1_fCounter2FN;
#pragma ioport  TRIADC8_1_fCounter2SL:  0x141
BYTE            TRIADC8_1_fCounter2SL;
#pragma ioport  TRIADC8_1_fCounter2OS:  0x142
BYTE            TRIADC8_1_fCounter2OS;
#pragma ioport  TRIADC8_1_bCount2:  0x040
BYTE            TRIADC8_1_bCount2;
#pragma ioport  TRIADC8_1_bPeriod2: 0x041
BYTE            TRIADC8_1_bPeriod2;
#pragma ioport  TRIADC8_1_bCompare2:    0x042
BYTE            TRIADC8_1_bCompare2;
#pragma ioport  TRIADC8_1_bCounter2_CR0:    0x043
BYTE            TRIADC8_1_bCounter2_CR0;

// Counter 3 Block Register Definitions
#pragma ioport  TRIADC8_1_fCounter3FN:  0x144
BYTE            TRIADC8_1_fCounter3FN;
#pragma ioport  TRIADC8_1_fCounter3SL:  0x145
BYTE            TRIADC8_1_fCounter3SL;
#pragma ioport  TRIADC8_1_fCounter3OS:  0x146
BYTE            TRIADC8_1_fCounter3OS;
#pragma ioport  TRIADC8_1_bCount3:  0x044
BYTE            TRIADC8_1_bCount3;
#pragma ioport  TRIADC8_1_bPeriod3: 0x045
BYTE            TRIADC8_1_bPeriod3;
#pragma ioport  TRIADC8_1_bCompare3:    0x046
BYTE            TRIADC8_1_bCompare3;
#pragma ioport  TRIADC8_1_bCounter3_CR0:    0x047
BYTE            TRIADC8_1_bCounter3_CR0;


// PWM16 Block Register Definitions
#pragma ioport  TRIADC8_1_bfPWM_LSB_FN: 0x130
BYTE            TRIADC8_1_bfPWM_LSB_FN;
#pragma ioport  TRIADC8_1_bfPWM_MSB_FN: 0x134
BYTE            TRIADC8_1_bfPWM_MSB_FN;
#pragma ioport  TRIADC8_1_fPWM_LSB_CR0: 0x033
BYTE            TRIADC8_1_fPWM_LSB_CR0;
#pragma ioport  TRIADC8_1_fPWM_MSB_CR0: 0x037
BYTE            TRIADC8_1_fPWM_MSB_CR0;
#pragma ioport  TRIADC8_1_bPWM_Count_MSB:   0x034
BYTE            TRIADC8_1_bPWM_Count_MSB;
#pragma ioport  TRIADC8_1_bPWM_Count_LSB:   0x030
BYTE            TRIADC8_1_bPWM_Count_LSB;
#pragma ioport  TRIADC8_1_bPWM_Period_MSB:  0x035
BYTE            TRIADC8_1_bPWM_Period_MSB;
#pragma ioport  TRIADC8_1_bPWM_Period_LSB:  0x031
BYTE            TRIADC8_1_bPWM_Period_LSB;
#pragma ioport  TRIADC8_1_bPWM_IntTime_MSB: 0x036
BYTE            TRIADC8_1_bPWM_IntTime_MSB;
#pragma ioport  TRIADC8_1_bPWM_IntTime_LSB: 0x032
BYTE            TRIADC8_1_bPWM_IntTime_LSB;
#pragma ioport  TRIADC8_1_bfPWM_LSB_FN: 0x130
BYTE            TRIADC8_1_bfPWM_LSB_FN;
#pragma ioport  TRIADC8_1_bfPWM_MSB_FN: 0x134
BYTE            TRIADC8_1_bfPWM_MSB_FN;

// end of file TRIADC8_1.h
