Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of LG2 by
Diff: InputOutput.c
- Revision:
- 89:a0d344db227e
- Parent:
- 88:b5c1d9d338d1
- Child:
- 90:d9b6a4bc5065
--- a/InputOutput.c Thu Mar 24 10:15:56 2016 +0000 +++ b/InputOutput.c Thu Mar 24 12:57:10 2016 +0000 @@ -179,31 +179,7 @@ ** Returned value: None ** ******************************************************************************/ -void G_Photo_Init(void ) -{ - LPC_SC->PCONP |= (1 << 19);//включение интерфейса I2C. - /* set PIO0.27 and PIO0.28 to I2C0 SDA and SCK */ - /* function to 01 on both SDA and SCK. */ - LPC_PINCON->PINSEL1 &= ~0x03C00000; //P0.27 - SDA. - LPC_PINCON->PINSEL1 |= 0x01400000; //P0.28 - SCK. - - // подтверждение Флаг флаг разрешения - /*сброс флагоф флага прерывания I2C старта интерфейса I2C */ - LPC_I2C0->CONCLR = I2CONCLR_AAC | I2CONCLR_SIC | I2CONCLR_STAC | I2CONCLR_I2ENC; // установка микроконтроллера в режим мастера - - /*--- 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. - -} /****************************************************************************** ** Function name: DAC_ADC_Exchange_Init **