//*****************************************************************************
//*****************************************************************************
//  FILENAME:  Buffer.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 Buffer_INCLUDE
#define Buffer_INCLUDE

#include <M8C.h>

//-------------------------------------------------
// Constants for Buffer API's.
//-------------------------------------------------
#define Buffer_OFF         0
#define Buffer_LOWPOWER    1
#define Buffer_MEDPOWER    2
#define Buffer_HIGHPOWER   3

#define Buffer_G48_0    0x0C
#define Buffer_G24_0    0x1C

#define Buffer_G16_0    0x08
#define Buffer_G8_00    0x18
#define Buffer_G5_33    0x28
#define Buffer_G4_00    0x38
#define Buffer_G3_20    0x48
#define Buffer_G2_67    0x58
#define Buffer_G2_27    0x68
#define Buffer_G2_00    0x78
#define Buffer_G1_78    0x88
#define Buffer_G1_60    0x98
#define Buffer_G1_46    0xA8
#define Buffer_G1_33    0xB8
#define Buffer_G1_23    0xC8
#define Buffer_G1_14    0xD8
#define Buffer_G1_06    0xE8
#define Buffer_G1_00    0xF8
#define Buffer_G0_93    0xE0
#define Buffer_G0_87    0xD0
#define Buffer_G0_81    0xC0
#define Buffer_G0_75    0xB0
#define Buffer_G0_68    0xA0
#define Buffer_G0_62    0x90
#define Buffer_G0_56    0x80
#define Buffer_G0_50    0x70
#define Buffer_G0_43    0x60
#define Buffer_G0_37    0x50
#define Buffer_G0_31    0x40
#define Buffer_G0_25    0x30
#define Buffer_G0_18    0x20
#define Buffer_G0_12    0x10
#define Buffer_G0_06    0x00

#define Buffer_AGNDBUFAPI 0

#pragma fastcall16 Buffer_Start
#pragma fastcall16 Buffer_SetPower
#pragma fastcall16 Buffer_SetGain
#pragma fastcall16 Buffer_Stop

#if (Buffer_AGNDBUFAPI)
#pragma fastcall16 Buffer_EnableAGNDBuffer
#pragma fastcall16 Buffer_DisableAGNDBuffer
#endif

//-------------------------------------------------
// Prototypes of the Buffer API.
//-------------------------------------------------
extern void Buffer_Start(BYTE bPowerSetting);     // Proxy class 2
extern void Buffer_SetPower(BYTE bPowerSetting);  // Proxy class 2
extern void Buffer_SetGain(BYTE bGainSetting);    // Proxy class 2
extern void Buffer_Stop(void);                    // Proxy class 1

#if (Buffer_AGNDBUFAPI)
extern void Buffer_EnableAGNDBuffer(void);
extern void Buffer_DisableAGNDBuffer(void);
#endif

//-------------------------------------------------
// Register Addresses for Buffer
//-------------------------------------------------

#pragma ioport  Buffer_GAIN_CR0:    0x071
BYTE            Buffer_GAIN_CR0;
#pragma ioport  Buffer_GAIN_CR1:    0x072
BYTE            Buffer_GAIN_CR1;
#pragma ioport  Buffer_GAIN_CR2:    0x073
BYTE            Buffer_GAIN_CR2;
#pragma ioport  Buffer_GAIN_CR3:    0x070
BYTE            Buffer_GAIN_CR3;

#endif
// end of file Buffer.h
