summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-02-17 09:48:53 +0000
committerDamien George <damien.p.george@gmail.com>2014-02-17 09:48:53 +0000
commitf34947703ad0d793477042027d605c13962362db (patch)
tree9d3eb9c45fe122b73a9b7ef3d0df572520fad075
parent70c56acafbaef4c997d08a5877e6b66f811730d9 (diff)
parent90928f1194421b40c63cc4773f1c583d2b8cbe58 (diff)
downloadmicropython-f34947703ad0d793477042027d605c13962362db.tar.gz
micropython-f34947703ad0d793477042027d605c13962362db.zip
Merge pull request #303 from dhylands/fix-netduino-disc
Fix build for netduino and stm32f4disc
-rw-r--r--stm/main.c2
-rw-r--r--stm/stmperiph/stm324x7i_eval.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/stm/main.c b/stm/main.c
index 14fda936db..52ac11d81b 100644
--- a/stm/main.c
+++ b/stm/main.c
@@ -54,7 +54,9 @@
int errno;
static FATFS fatfs0;
+#if MICROPY_HW_HAS_SDCARD
static FATFS fatfs1;
+#endif
void flash_error(int n) {
for (int i = 0; i < n; i++) {
diff --git a/stm/stmperiph/stm324x7i_eval.c b/stm/stmperiph/stm324x7i_eval.c
index 2a8943936d..c5a9d425c8 100644
--- a/stm/stmperiph/stm324x7i_eval.c
+++ b/stm/stmperiph/stm324x7i_eval.c
@@ -89,7 +89,6 @@ void SD_LowLevel_DeInit(void)
* yet still detect when a card is inserted.
*/
void SD_LowLevel_Init_Detect(void) {
- GPIO_InitTypeDef GPIO_InitStructure;
/* Periph clock enable */
RCC_AHB1PeriphClockCmd(SD_DETECT_GPIO_CLK, ENABLE);
@@ -97,6 +96,7 @@ void SD_LowLevel_Init_Detect(void) {
/*!< Configure SD_SPI_DETECT_PIN pin: SD Card detect pin */
#if defined(PYBOARD3)
// dpgeorge: PYBv2-v3: switch is normally open, connected to VDD when card inserted
+ GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure.GPIO_Pin = SD_DETECT_PIN;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz; // needs to be 2MHz due to restrictions on PC13
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
@@ -104,6 +104,7 @@ void SD_LowLevel_Init_Detect(void) {
GPIO_Init(SD_DETECT_GPIO_PORT, &GPIO_InitStructure);
#elif defined(PYBOARD4)
// dpgeorge: PYBv4: switch is normally open, connected to GND when card inserted
+ GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure.GPIO_Pin = SD_DETECT_PIN;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;