//*****************************************************************************
//*****************************************************************************
//  FILENAME:  RefLow.h  ( PGA )
//  Version: 3.2, Updated on 2012/3/2 at 9:15:6
//  Generated by PSoC Designer 5.2.2551
//
//  DESCRIPTION:  PGA User Module C Language interface file.
//-----------------------------------------------------------------------------
//      Copyright (c) Cypress Semiconductor 2012. All Rights Reserved.
//*****************************************************************************
//*****************************************************************************
#ifndef RefLow_INCLUDE
#define RefLow_INCLUDE

#include <M8C.h>

//-------------------------------------------------
// Constants for RefLow API's.
//-------------------------------------------------
#define RefLow_OFF         0
#define RefLow_LOWPOWER    1
#define RefLow_MEDPOWER    2
#define RefLow_HIGHPOWER   3

#define RefLow_G48_0    0x0C
#define RefLow_G24_0    0x1C

#define RefLow_G16_0    0x08
#define RefLow_G8_00    0x18
#define RefLow_G5_33    0x28
#define RefLow_G4_00    0x38
#define RefLow_G3_20    0x48
#define RefLow_G2_67    0x58
#define RefLow_G2_27    0x68
#define RefLow_G2_00    0x78
#define RefLow_G1_78    0x88
#define RefLow_G1_60    0x98
#define RefLow_G1_46    0xA8
#define RefLow_G1_33    0xB8
#define RefLow_G1_23    0xC8
#define RefLow_G1_14    0xD8
#define RefLow_G1_06    0xE8
#define RefLow_G1_00    0xF8
#define RefLow_G0_93    0xE0
#define RefLow_G0_87    0xD0
#define RefLow_G0_81    0xC0
#define RefLow_G0_75    0xB0
#define RefLow_G0_68    0xA0
#define RefLow_G0_62    0x90
#define RefLow_G0_56    0x80
#define RefLow_G0_50    0x70
#define RefLow_G0_43    0x60
#define RefLow_G0_37    0x50
#define RefLow_G0_31    0x40
#define RefLow_G0_25    0x30
#define RefLow_G0_18    0x20
#define RefLow_G0_12    0x10
#define RefLow_G0_06    0x00

#define RefLow_AGNDBUFAPI 0

#pragma fastcall16 RefLow_Start
#pragma fastcall16 RefLow_SetPower
#pragma fastcall16 RefLow_SetGain
#pragma fastcall16 RefLow_Stop

#if (RefLow_AGNDBUFAPI)
#pragma fastcall16 RefLow_EnableAGNDBuffer
#pragma fastcall16 RefLow_DisableAGNDBuffer
#endif

//-------------------------------------------------
// Prototypes of the RefLow API.
//-------------------------------------------------
extern void RefLow_Start(BYTE bPowerSetting);     // Proxy class 2
extern void RefLow_SetPower(BYTE bPowerSetting);  // Proxy class 2
extern void RefLow_SetGain(BYTE bGainSetting);    // Proxy class 2
extern void RefLow_Stop(void);                    // Proxy class 1

#if (RefLow_AGNDBUFAPI)
extern void RefLow_EnableAGNDBuffer(void);
extern void RefLow_DisableAGNDBuffer(void);
#endif

//-------------------------------------------------
// Register Addresses for RefLow
//-------------------------------------------------

#pragma ioport  RefLow_GAIN_CR0:    0x075
BYTE            RefLow_GAIN_CR0;
#pragma ioport  RefLow_GAIN_CR1:    0x076
BYTE            RefLow_GAIN_CR1;
#pragma ioport  RefLow_GAIN_CR2:    0x077
BYTE            RefLow_GAIN_CR2;
#pragma ioport  RefLow_GAIN_CR3:    0x074
BYTE            RefLow_GAIN_CR3;

#endif
// end of file RefLow.h
