silly formatting

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2566 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
jasonshort 2011-06-16 16:43:43 +00:00
parent 16d1e5d0b8
commit 3c27be40fc
1 changed files with 5 additions and 5 deletions

View File

@ -113,18 +113,18 @@ void AP_ADC_ADS7844::Init(void)
digitalWrite(ADC_CHIP_SELECT, HIGH); // Disable device (Chip select is active low) digitalWrite(ADC_CHIP_SELECT, HIGH); // Disable device (Chip select is active low)
// Setup Serial Port2 in SPI mode // Setup Serial Port2 in SPI mode
UBRR2 = 0; UBRR2 = 0;
DDRH |= (1 << PH2); // SPI clock XCK2 (PH2) as output. This enable SPI Master mode DDRH |= (1 << PH2); // SPI clock XCK2 (PH2) as output. This enable SPI Master mode
// Set MSPI mode of operation and SPI data mode 0. // Set MSPI mode of operation and SPI data mode 0.
UCSR2C = (1 << UMSEL21) | (1 << UMSEL20); // |(0 << UCPHA2) | (0 << UCPOL2); UCSR2C = (1 << UMSEL21) | (1 << UMSEL20); // |(0 << UCPHA2) | (0 << UCPOL2);
// Enable receiver and transmitter. // Enable receiver and transmitter.
UCSR2B = (1 << RXEN2) | (1 << TXEN2); UCSR2B = (1 << RXEN2) | (1 << TXEN2);
// Set Baud rate // Set Baud rate
UBRR2 = 2; // SPI clock running at 2.6MHz UBRR2 = 2; // SPI clock running at 2.6MHz
// Enable Timer2 Overflow interrupt to capture ADC data // Enable Timer2 Overflow interrupt to capture ADC data
TIMSK2 = 0; // Disable interrupts TIMSK2 = 0; // Disable interrupts
TCCR2A = 0; // normal counting mode TCCR2A = 0; // normal counting mode
TCCR2B = _BV(CS21) | _BV(CS22); // Set prescaler of 256 TCCR2B = _BV(CS21) | _BV(CS22); // Set prescaler of 256