![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LGstaandart by
Diff: InputOutput.c
- Revision:
- 232:130a2b5003e6
- Parent:
- 231:079835d508ef
diff -r 079835d508ef -r 130a2b5003e6 InputOutput.c --- a/InputOutput.c Thu Jan 25 13:59:43 2018 +0000 +++ b/InputOutput.c Wed Jan 31 13:41:23 2018 +0000 @@ -1,6 +1,6 @@ #include "Global.h" INPUT Input; -OUTPUT Output; +//OUTPUT Output; volatile uint32_t I2CMasterState = I2C_IDLE; volatile uint32_t I2CMasterBuffer[I2C_WRITELENGTH]; @@ -64,17 +64,17 @@ { I2CMasterState = I2C_IDLE; LPC_I2C0->CONSET = I2CONSET_STO; //e. Set Stop flag - Output.Str.Cnt_Dif = 300; + // Output.Str.Cnt_Dif = 300; } else if (WrIndex == 3) { LPC_I2C0->CONSET = I2CONSET_STA; - Output.Str.Cnt_Dif = 200; + // Output.Str.Cnt_Dif = 200; } else { LPC_I2C0->DAT = I2CMasterBuffer[WrIndex++]; //e. send another byte - Output.Str.Cnt_Dif = 100; + // Output.Str.Cnt_Dif = 100; } LPC_I2C0->CONCLR = I2CONCLR_SIC; //e. clear interrupt bit break; @@ -112,12 +112,12 @@ if (WRITE_DAC0 & 1)//если нечетный такт то { LPC_SSP0->DR = WRITE_DAC0; //e.команда для ЦАП_0 передавать. - LPC_SSP0->DR = (-Output.ArrayOut[3]+32767); //e. передача 12 бит + // LPC_SSP0->DR = (-Output.ArrayOut[3]+32767); //e. передача 12 бит } else //если такт четный. { LPC_SSP0->DR = WRITE_DAC1 ; //e.команда для ЦАП_1 передавать. - LPC_SSP0->DR = (Output.ArrayOut[0]<<1) & 0xFFF0; //e. передача 12 бит + // LPC_SSP0->DR = (Output.ArrayOut[0]<<1) & 0xFFF0; //e. передача 12 бит } } }