Merge pull request #344 from toyowata/master

[LPC1549] Fixed potential build error by GCC
pull/347/head
Bogdan Marinescu 2014-06-06 10:51:55 +01:00
commit eba3f25ec6
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ void analogin_init(analogin_t *obj, PinName pin) {
tmp = LPC_ADC->CTRL; tmp = LPC_ADC->CTRL;
} while ((tmp & (1UL << 30)) != 0); } while ((tmp & (1UL << 30)) != 0);
LPC_ADC->CTRL = 100; // 500kHz sampling LPC_ADC->CTRL = 1; // Sampling clock: SystemClock divided by 1
} }
static inline uint32_t adc_read(analogin_t *obj) { static inline uint32_t adc_read(analogin_t *obj) {

View File

@ -191,7 +191,7 @@ static inline int spi_read(spi_t *obj) {
return obj->spi->RXDAT; return obj->spi->RXDAT;
} }
static inline int spi_busy(spi_t *obj) { int spi_busy(spi_t *obj) {
// checking RXOV(Receiver Overrun interrupt flag) // checking RXOV(Receiver Overrun interrupt flag)
return obj->spi->STAT & (1 << 2); return obj->spi->STAT & (1 << 2);
} }