Dmitry Kovalev
/
LGstaandart
forkd
Fork of LG2 by
Diff: CyclesSync.h
- Revision:
- 21:bc8c1cec3da6
- Parent:
- 0:8ad47e2b6f00
--- a/CyclesSync.h Tue Feb 02 17:14:25 2016 +0000 +++ b/CyclesSync.h Wed Feb 03 07:19:30 2016 +0000 @@ -2,7 +2,7 @@ ** File name: CycleSync.h ** Last modified Date: 2011-09-06 ** Last Version: V1.00 -** Descriptions: +** Descriptions: ** **-------------------------------------------------------------------------------------------------------- ** Created by: Electrooptica Inc. @@ -10,19 +10,21 @@ ** Version: V1.00 ** Descriptions: There is the routines for device synchronization ** -**-------------------------------------------------------------------------------------------------------- +**-------------------------------------------------------------------------------------------------------- *********************************************************************************************************/ #include "LPC17xx.h" #include "CntrlGLD.h" //#define PERFOMANCE -#define DEVICE_SAMPLE_RATE_HZ 10000 //e. sampling frequency 10 kHz //r. ������� ������������� 10 ��� -#define DEVICE_SAMPLE_RATE_uks 100000000 //e. sampling frequency 10 kHz //r. ������� ������������� 10 ��� +//#define PERFOMANCE + +#define DEVICE_SAMPLE_RATE_HZ 10000 //e. sampling frequency 10 kHz //r. частота дискретизации 10 кГц +#define DEVICE_SAMPLE_RATE_uks 100000000 //e. sampling frequency 10 kHz //r. частота дискретизации 10 кГц #define DELAY_UART_ENBL 4000 //e. delay = DELAY_UART_ENBL*8/CLCK #define DELAY_UART_DISBL 2500 //e. delay = DELAY_UART_ENBL*8/CLCK -#define RATE_REPER_OR_REFMEANDR 0x0000 //e. difference of general counters (not dither counters), latched by Reper or by Sign Meander //r. �������� ������� ��������� (�� �������), ����������� �� Reper`� ��� �� RefMeandr`� -#define RATE_VIBRO_1 0x0001 //e. difference of dither counters after the filter of moving average //r. �������� �������������� ����� ������� ������.�������� +#define RATE_REPER_OR_REFMEANDR 0x0000 //e. difference of general counters (not dither counters), latched by Reper or by Sign Meander //r. разность обычных счетчиков (не вибросч), защелкнутых по Reper`у или по RefMeandr`у +#define RATE_VIBRO_1 0x0001 //e. difference of dither counters after the filter of moving average //r. разность вибросчетчиков после фильтра скольз.среднего #define HALF_PERIOD 0x00000004 #define WHOLE_PERIOD 0x00000008 @@ -58,17 +60,17 @@ extern uint32_t WDTInit( void ); extern void WDTFeed( void ); -extern uint32_t Sys_Clock; +extern uint32_t Sys_Clock; extern int32_t time_1_Sec; extern uint32_t trm_cycl; -extern int32_t PrevPeriod; +extern int32_t PrevPeriod; extern uint32_t Ext_Latch_ResetEnable; extern volatile uint32_t Latch_Rdy; extern volatile uint32_t data_Rdy; extern int32_t LatchPhase; extern uint32_t PeriodElapsed; extern uint32_t count; -extern uint32_t main_cycle_latch; +extern uint32_t main_cycle_latch; extern uint32_t Out_main_cycle_latch; //e. counter of main cycles between external latch pulse appearence extern uint32_t T_latch, Out_T_latch, temp_T_latch; @@ -81,7 +83,7 @@ extern int SwitchMode(void); #if defined PERFOMANCE - void IntLatch(void); +void IntLatch(void); #endif void ServiceTime(void); @@ -89,4 +91,3 @@ /***************************************************************************** ** End Of File ******************************************************************************/ -