![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LG2 by
Diff: Global.c
- Revision:
- 99:3d8f206ceac2
- Parent:
- 98:95b8e79f13e1
- Child:
- 100:e197a8d2cf43
- Child:
- 104:ab1cb4ff56b2
diff -r 95b8e79f13e1 -r 3d8f206ceac2 Global.c --- a/Global.c Tue Mar 29 09:51:17 2016 +0000 +++ b/Global.c Tue Mar 29 17:00:59 2016 +0000 @@ -4,7 +4,7 @@ unsigned int VibroReg = 0; //регистр состаяния вибропривода. unsigned long Global_Time, Time_UART,Time_Sec,Time_vibro,Time_1kHz; -unsigned long MaxAmp=0; +int MaxAmp=0; unsigned char BuffTemp[100]; unsigned char Time[500]; unsigned int Event1Hz; @@ -57,7 +57,7 @@ ///////////расчета значений буферов ВП/////////////// ///////////////////////////////////////////////////// /////////////инициализация переменных в структ вибро///////////////// - Gyro.FrqHZ=250; + Gyro.FrqHZ=400; Gyro.Frq = Gyro.FrqHZ<<16; Gyro.AmpPer=20; Gyro.AmpPerDel=10; @@ -201,6 +201,12 @@ /*--- Reset registers ---*/ LPC_I2C0->SCLL = I2SCLL_SCLL; // - счетчик scl low time period LPC_I2C0->SCLH = I2SCLH_SCLH; // - счетчик scl high time period + + I2CMasterBuffer[0] = A_ADDRESS; + I2CMasterBuffer[1] = WRITE_CMD; + I2CMasterBuffer[3] = B_ADDRESS; + I2CMasterBuffer[4] = WRITE_CMD; + LPC_I2C0->CONSET = I2CONSET_I2EN; //включение интерфейса I2C. ////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////