Снижена частота прерываний АЦП (для стабильности)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
// âãâ
|
||||
#ifndef _MEASURE
|
||||
#define _MEASURE
|
||||
|
||||
@@ -57,7 +56,7 @@ typedef union
|
||||
|
||||
#define READY_FREQ 1000 // Ãö
|
||||
#define BLINK_FREQ 2 // Ãö
|
||||
#define ADC_FREQ 3000//3125 //3750//5000//3885//777//2000//20000 //777 //3885 // Ãö (777*5)
|
||||
#define ADC_FREQ 2500 //3000 //3125 //3750 //5000 //3885 // Ãö
|
||||
#define DAC_FREQ 50 // Ãö
|
||||
|
||||
#define LOAD_TIME 10 // sec
|
||||
@@ -68,8 +67,6 @@ typedef union
|
||||
|
||||
#define maximum_bright 10
|
||||
|
||||
//#define ZERO 27
|
||||
|
||||
#define Cooling 5 // (°Ñ) Ãèñòåðåçèñ ïî ñíàòèþ ïåðåãðåâà
|
||||
|
||||
#define COSPi6 0.86602540378443864676372317075294
|
||||
|
||||
@@ -12,7 +12,6 @@ void setup_leds_line(void);
|
||||
#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; }
|
||||
@@ -23,6 +22,67 @@ static inline void clear_READY(void)
|
||||
static inline void toggle_READY(void)
|
||||
{ GpioDataRegs.GPBTOGGLE.bit.GPIO59=1;}
|
||||
|
||||
// DIOD1 ---------------------------------------------------------
|
||||
static inline void dat_LED1(int x)
|
||||
{ GpioDataRegs.GPBDAT.bit.GPIO52=x; }
|
||||
static inline void set_LED1(void)
|
||||
{ GpioDataRegs.GPBCLEAR.bit.GPIO52=1; }
|
||||
static inline void clear_LED1(void)
|
||||
{ GpioDataRegs.GPBSET.bit.GPIO52=1; }
|
||||
static inline void toggle_LED1(void)
|
||||
{ GpioDataRegs.GPBTOGGLE.bit.GPIO52=1;}
|
||||
|
||||
// DIOD2 ---------------------------------------------------------
|
||||
static inline void dat_LED2(int x)
|
||||
{ GpioDataRegs.GPBDAT.bit.GPIO49=x; }
|
||||
static inline void set_LED2(void)
|
||||
{ GpioDataRegs.GPBCLEAR.bit.GPIO49=1; }
|
||||
static inline void clear_LED2(void)
|
||||
{ GpioDataRegs.GPBSET.bit.GPIO49=1; }
|
||||
static inline void toggle_LED2(void)
|
||||
{ GpioDataRegs.GPBTOGGLE.bit.GPIO49=1;}
|
||||
|
||||
// LAMPA1 ---------------------------------------------------------
|
||||
static inline void dat_LMP1(int x)
|
||||
{ GpioDataRegs.GPBDAT.bit.GPIO60=!x; }
|
||||
static inline void set_LMP1(void)
|
||||
{ GpioDataRegs.GPBCLEAR.bit.GPIO60=1; }
|
||||
static inline void clear_LMP1(void)
|
||||
{ GpioDataRegs.GPBSET.bit.GPIO60=1; }
|
||||
static inline void toggle_LMP1(void)
|
||||
{ GpioDataRegs.GPBTOGGLE.bit.GPIO60=1;}
|
||||
|
||||
// LAMPA2 ---------------------------------------------------------
|
||||
static inline void dat_LMP2(int x)
|
||||
{ GpioDataRegs.GPBDAT.bit.GPIO58=!x; }
|
||||
static inline void set_LMP2(void)
|
||||
{ GpioDataRegs.GPBCLEAR.bit.GPIO58=1; }
|
||||
static inline void clear_LMP2(void)
|
||||
{ GpioDataRegs.GPBSET.bit.GPIO58=1; }
|
||||
static inline void toggle_LMP2(void)
|
||||
{ GpioDataRegs.GPBTOGGLE.bit.GPIO58=1;}
|
||||
|
||||
// RESERVE1 ---------------------------------------------------------
|
||||
static inline void dat_RES1(int x)
|
||||
{ GpioDataRegs.GPBDAT.bit.GPIO62=!x; }
|
||||
static inline void set_RES1(void)
|
||||
{ GpioDataRegs.GPBCLEAR.bit.GPIO62=1; }
|
||||
static inline void clear_RES1(void)
|
||||
{ GpioDataRegs.GPBSET.bit.GPIO62=1; }
|
||||
static inline void toggle_RES1(void)
|
||||
{ GpioDataRegs.GPBTOGGLE.bit.GPIO62=1;}
|
||||
|
||||
// RESERVE2 ---------------------------------------------------------
|
||||
static inline void dat_RES2(int x)
|
||||
{ GpioDataRegs.GPBDAT.bit.GPIO63=!x; }
|
||||
static inline void set_RES2(void)
|
||||
{ GpioDataRegs.GPBCLEAR.bit.GPIO63=1; }
|
||||
static inline void clear_RES2(void)
|
||||
{ GpioDataRegs.GPBSET.bit.GPIO63=1; }
|
||||
static inline void toggle_RES2(void)
|
||||
{ GpioDataRegs.GPBTOGGLE.bit.GPIO63=1;}
|
||||
|
||||
|
||||
extern WORDE Inputs;
|
||||
|
||||
void select_tpl_canal(int n_tpl);
|
||||
|
||||
Reference in New Issue
Block a user