![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LGstaandart by
Diff: Global.c
- Revision:
- 170:d099c3025f87
- Parent:
- 169:140743e3bb96
- Child:
- 179:2b4e6bc277df
diff -r 140743e3bb96 -r d099c3025f87 Global.c --- a/Global.c Tue Jun 07 14:03:04 2016 +0000 +++ b/Global.c Wed Jun 08 14:06:03 2016 +0000 @@ -205,7 +205,7 @@ /////////////инициализация энкодера////////////////// ///////////////////////////////////////////////////// LPC_SC->PCONP |= (1<<18);//0x00040000; включение квадратурного энкодера. - LPC_SC->PCLKSEL1 |= 0x00000001; // выбор частоты для кв.э. CLK=100MHz + LPC_SC->PCLKSEL1 |= 0x00000001; // выбор частоты для кв.э. CLK=103MHz LPC_PINCON->PINSEL3 &= ~0x4100; LPC_PINCON->PINSEL3 |= 0x4100; //P1.20, p1.23 установить как входы кв.э LPC_PINCON->PINMODE3 |= 0x3C300; //P1.20, p1.23 @@ -437,7 +437,7 @@ LPC_SSP0->CR1 = SSPCR1_SSE; // LPC_SSP1->CR1 = SSPCR1_SSE; while (LPC_SSP0->SR & SSP_BUSY); - while (LPC_SSP0->SR & RX_SSP_notEMPT) /* clear the RxFIFO */ + 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 LPC_GPIO0->FIODIR |= (1<<16); // P0.16 defined as CS for ADC