Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
90928f11
Commit
90928f11
authored
Feb 16, 2014
by
Dave Hylands
Browse files
Fix build for netduino and stm32f4disc
parent
402dc31a
Changes
2
Hide whitespace changes
Inline
Side-by-side
stm/main.c
View file @
90928f11
...
@@ -54,7 +54,9 @@
...
@@ -54,7 +54,9 @@
int
errno
;
int
errno
;
static
FATFS
fatfs0
;
static
FATFS
fatfs0
;
#if MICROPY_HW_HAS_SDCARD
static
FATFS
fatfs1
;
static
FATFS
fatfs1
;
#endif
void
flash_error
(
int
n
)
{
void
flash_error
(
int
n
)
{
for
(
int
i
=
0
;
i
<
n
;
i
++
)
{
for
(
int
i
=
0
;
i
<
n
;
i
++
)
{
...
...
stm/stmperiph/stm324x7i_eval.c
View file @
90928f11
...
@@ -89,7 +89,6 @@ void SD_LowLevel_DeInit(void)
...
@@ -89,7 +89,6 @@ void SD_LowLevel_DeInit(void)
* yet still detect when a card is inserted.
* yet still detect when a card is inserted.
*/
*/
void
SD_LowLevel_Init_Detect
(
void
)
{
void
SD_LowLevel_Init_Detect
(
void
)
{
GPIO_InitTypeDef
GPIO_InitStructure
;
/* Periph clock enable */
/* Periph clock enable */
RCC_AHB1PeriphClockCmd
(
SD_DETECT_GPIO_CLK
,
ENABLE
);
RCC_AHB1PeriphClockCmd
(
SD_DETECT_GPIO_CLK
,
ENABLE
);
...
@@ -97,6 +96,7 @@ void SD_LowLevel_Init_Detect(void) {
...
@@ -97,6 +96,7 @@ void SD_LowLevel_Init_Detect(void) {
/*!< Configure SD_SPI_DETECT_PIN pin: SD Card detect pin */
/*!< Configure SD_SPI_DETECT_PIN pin: SD Card detect pin */
#if defined(PYBOARD3)
#if defined(PYBOARD3)
// dpgeorge: PYBv2-v3: switch is normally open, connected to VDD when card inserted
// 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_Pin
=
SD_DETECT_PIN
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_2MHz
;
// needs to be 2MHz due to restrictions on PC13
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_2MHz
;
// needs to be 2MHz due to restrictions on PC13
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
...
@@ -104,6 +104,7 @@ void SD_LowLevel_Init_Detect(void) {
...
@@ -104,6 +104,7 @@ void SD_LowLevel_Init_Detect(void) {
GPIO_Init
(
SD_DETECT_GPIO_PORT
,
&
GPIO_InitStructure
);
GPIO_Init
(
SD_DETECT_GPIO_PORT
,
&
GPIO_InitStructure
);
#elif defined(PYBOARD4)
#elif defined(PYBOARD4)
// dpgeorge: PYBv4: switch is normally open, connected to GND when card inserted
// 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_Pin
=
SD_DETECT_PIN
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_2MHz
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_2MHz
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment