mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #344 from toyowata/master
[LPC1549] Fixed potential build error by GCCpull/347/head
commit
eba3f25ec6
|
@ -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) {
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue