Fixed bug 3581929.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_2.4.x@4794 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
9780d77057
commit
384e788279
|
@ -58,6 +58,30 @@ void __early_init(void) {
|
|||
stm32_clock_init();
|
||||
}
|
||||
|
||||
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief MMC_SPI card detection.
|
||||
*/
|
||||
bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) {
|
||||
static bool_t last_status = FALSE;
|
||||
(void)mmcp;
|
||||
|
||||
if ((palReadLatch(GPIOD) & PAL_PORT_BIT(GPIOD_SPI3_CS)) == 0)
|
||||
return last_status;
|
||||
return last_status = (bool_t)palReadPad(GPIOD, GPIOD_SPI3_CS);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief MMC_SPI card write protection detection.
|
||||
*/
|
||||
bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) {
|
||||
|
||||
(void)mmcp;
|
||||
/* TODO: Fill the implementation.*/
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Board-specific initialization code.
|
||||
*/
|
||||
|
|
|
@ -249,7 +249,7 @@
|
|||
#define VAL_GPIOA_OSPEEDR 0xFFFFFFFF
|
||||
#define VAL_GPIOA_PUPDR (PIN_PUDR_PULLUP(GPIOA_DCMI_HSYNC) | \
|
||||
PIN_PUDR_PULLUP(GPIOA_DCMI_PIXCLK) | \
|
||||
PIN_PUDR_PULLUP(GPIOA_OTG_FS_VBUS) | \
|
||||
PIN_PUDR_PULLDOWN(GPIOA_OTG_FS_VBUS) | \
|
||||
PIN_PUDR_PULLUP(GPIOA_DCMI_D1) | \
|
||||
PIN_PUDR_PULLDOWN(GPIOA_SWCLK))
|
||||
#define VAL_GPIOA_ODR 0xFFFFFFDF
|
||||
|
@ -303,7 +303,7 @@
|
|||
#define VAL_GPIOB_OSPEEDR 0xFFFFFFFF
|
||||
#define VAL_GPIOB_PUPDR (PIN_PUDR_PULLUP(GPIOB_DCMI_D5) | \
|
||||
PIN_PUDR_PULLUP(GPIOB_DCMI_VSYNC) | \
|
||||
PIN_PUDR_PULLUP(GPIOB_OTG_HS_VBUS))
|
||||
PIN_PUDR_PULLDOWN(GPIOB_OTG_HS_VBUS))
|
||||
#define VAL_GPIOB_ODR 0xFFFFFFFC
|
||||
#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_I2S3_CK, 6) | \
|
||||
PIN_AFIO_AF(GPIOB_I2S3_SD, 6))
|
||||
|
@ -369,7 +369,7 @@
|
|||
*
|
||||
* PD0 - GPIOD_USELESS0 (input pull-up).
|
||||
* PD1 - GPIOD_USELESS1 (input pull-up).
|
||||
* PD2 - GPIOD_SPI3_CS (output push-pull).
|
||||
* PD2 - GPIOD_SPI3_CS (output opendrain).
|
||||
* PD3 - GPIOD_LCD_RST (output push-pull).
|
||||
* PD4 - GPIOD_USELESS4 (input pull-up).
|
||||
* PD5 - GPIOD_USELESS5 (input pull-up).
|
||||
|
@ -400,7 +400,7 @@
|
|||
PIN_MODE_INPUT(GPIOD_USB_HS_FAULT) | \
|
||||
PIN_MODE_INPUT(GPIOD_USELESS14) | \
|
||||
PIN_MODE_INPUT(GPIOD_USELESS15))
|
||||
#define VAL_GPIOD_OTYPER 0x00000000
|
||||
#define VAL_GPIOD_OTYPER PIN_OTYPE_OPENDRAIN(GPIOD_SPI3_CS)
|
||||
#define VAL_GPIOD_OSPEEDR 0xFFFFFFFF
|
||||
#define VAL_GPIOD_PUPDR (PIN_PUDR_PULLUP(GPIOD_USELESS0) | \
|
||||
PIN_PUDR_PULLUP(GPIOD_USELESS1) | \
|
||||
|
|
|
@ -79,6 +79,7 @@
|
|||
*****************************************************************************
|
||||
|
||||
*** 2.4.3 ***
|
||||
- FIX: Fixed STM32_P407: implement mmc_lld_is_card_inserted (bug 3581929).
|
||||
- FIX: Fixed double chSysInit() call in MSP430F1611 demo (bug 3581304).
|
||||
- FIX: Fixed bug in abstract file interface (bug 3579660).
|
||||
- FIX: Fixed various typos and wrong limits in the STM32F4/F2 HAL driver
|
||||
|
|
Loading…
Reference in New Issue