#include "DSP2833x_Device.h"     // DSP281x Headerfile Include File

extern int Mode,Desk,Addrr,TermoAD,TermoRS,TermoSW,Currentoz;
extern int ExtraCanal[];

void setup_leds_line(void);

#define led1_toggle()	GpioDataRegs.GPBTOGGLE.bit.GPIO32=1
#define led2_toggle()	GpioDataRegs.GPBTOGGLE.bit.GPIO48=1
#define led1_off()	GpioDataRegs.GPBSET.bit.GPIO32=1
#define led2_off()	GpioDataRegs.GPBSET.bit.GPIO48=1
#define led1_on()	GpioDataRegs.GPBCLEAR.bit.GPIO32=1
#define led2_on()	GpioDataRegs.GPBCLEAR.bit.GPIO48=1


//	READY	---------------------------------------------------------
static inline void dat_READY(int x)
{	GpioDataRegs.GPBDAT.bit.GPIO59=!x;	}
static inline void set_READY(void)
{	GpioDataRegs.GPBCLEAR.bit.GPIO59=1;	}
static inline void clear_READY(void)
{	GpioDataRegs.GPBSET.bit.GPIO59=1;	}
static inline void toggle_READY(void)
{	GpioDataRegs.GPBTOGGLE.bit.GPIO59=1;}

extern WORDE Inputs;

void select_tpl_canal(int n_tpl);

void get_Mode(void);
void get_Inputs(void);

#define MAX_BUTTHURT 250000
