mbed w/ spi bug fig

Dependents:   display-puck

Fork of mbed-src by mbed official

Files at this revision

API Documentation at this revision

Comitter:
mbed_official
Date:
Fri Jun 06 11:00:08 2014 +0100
Parent:
221:8276e3a4886f
Child:
223:fe6f83d1c519
Commit message:
Synchronized with git revision eba3f25ec69f8e2431a49e87daf5ea829b0d7ed0

Full URL: https://github.com/mbedmicro/mbed/commit/eba3f25ec69f8e2431a49e87daf5ea829b0d7ed0/

[LPC1549] Fixed potential build error by GCC

Changed in this revision

targets/hal/TARGET_NXP/TARGET_LPC11U6X/analogin_api.c Show annotated file Show diff for this revision Revisions of this file
targets/hal/TARGET_NXP/TARGET_LPC15XX/spi_api.c Show annotated file Show diff for this revision Revisions of this file
--- a/targets/hal/TARGET_NXP/TARGET_LPC11U6X/analogin_api.c	Tue Jun 03 11:30:07 2014 +0100
+++ b/targets/hal/TARGET_NXP/TARGET_LPC11U6X/analogin_api.c	Fri Jun 06 11:00:08 2014 +0100
@@ -73,7 +73,7 @@
         tmp =  LPC_ADC->CTRL;
     } 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) {
--- a/targets/hal/TARGET_NXP/TARGET_LPC15XX/spi_api.c	Tue Jun 03 11:30:07 2014 +0100
+++ b/targets/hal/TARGET_NXP/TARGET_LPC15XX/spi_api.c	Fri Jun 06 11:00:08 2014 +0100
@@ -191,7 +191,7 @@
     return obj->spi->RXDAT;
 }
 
-static inline int spi_busy(spi_t *obj) {
+int spi_busy(spi_t *obj) {
     // checking RXOV(Receiver Overrun interrupt flag)
     return obj->spi->STAT & (1 << 2);
     }