![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LGstaandart by
Diff: Global.c
- Revision:
- 190:289514f730ee
- Parent:
- 189:8a16378724c4
- Child:
- 191:40028201ddad
--- a/Global.c Mon Aug 22 10:39:08 2016 +0000 +++ b/Global.c Tue Aug 23 14:03:16 2016 +0000 @@ -72,6 +72,9 @@ ///////////расчета значений буферов ВП/////////////// ///////////////////////////////////////////////////// /////////////инициализация переменных в структ вибро///////////////// + Gyro.Gain_Sin =100; + Gyro.Gain_Cos =100; + Gyro.FlashMod=0; Gyro.FrqHZ=450; Gyro.Frq = Gyro.FrqHZ<<16; @@ -101,12 +104,12 @@ Buff_8Point[i] = 0x00; Buff_32Point[i] = 0x00; Buff_16PointD[i] = 0x00; - GyroP.Array[i] = 0x00; + GyroP.Array[i] = 0x00; } - + /* for (int i = 0; i < 170; i++ ) { GyroP.Array[i] =i; - } + }*/ //////////////////////////////////////////////////// //////////////////////////////////////////////////// ///////////////////////////////////////////////////// @@ -181,10 +184,11 @@ // Spi.DAC_A = 20000; Spi.DAC_A = 38000; + Spi.DAC_B = 38000; //Spi.DAC_A = 44000; //Spi.DAC_B = 0x7fff; //старое начало - Spi.DAC_B = 38000; //40000 + //40000 //Spi.DAC_B = 11000; //для просмотра мод Gyro.StrayHZ = 1000; @@ -315,7 +319,7 @@ /*SSP enable, master mode */ LPC_SSP0->CR1 = SSPCR1_SSE; // LPC_SSP1->CR1 = SSPCR1_SSE; - while (LPC_SSP0->SR & SSP_BUSY); + while (LPC_SSP0->SR & SSP_BUSY); while (LPC_SSP0->SR & RX_SSP_notEMPT) /* clear the RxFIFO */ Dummy = LPC_SSP0->DR; //all pins after reset is in GPIO mode, so CS pins needn't to configure @@ -348,9 +352,9 @@ ///////////////////////////////////////////////////// LPC_PINCON->PINSEL0 &= ~(0x00<<28); - LPC_PINCON->PINSEL0 |= (0x00<<28); // а нужно, ведь по умолчаниб у них 0 функция. попробоввать без них потом убрать - LPC_PINCON->PINMODE0 |= (0x3<<28); - LPC_GPIO1->FIODIR |= (1<<30); + LPC_PINCON->PINSEL0 |= (0x00<<28); // а нужно, ведь по умолчаниб у них 0 функция. попробоввать без них потом убрать + LPC_PINCON->PINMODE0 |= (0x3<<28); + LPC_GPIO1->FIODIR |= (1<<30); ///////////////////////////////////////////////////// /////////////////////////////////////////////////////