Fixed SD card detection on STM32F7-Discovery.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8344 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
05e3b28528
commit
fc2684e554
|
@ -85,20 +85,20 @@ void __early_init(void) {
|
||||||
* @brief SDC card detection.
|
* @brief SDC card detection.
|
||||||
*/
|
*/
|
||||||
bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
|
bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
|
||||||
|
|
||||||
(void)sdcp;
|
(void)sdcp;
|
||||||
/* TODO: Fill the implementation.*/
|
|
||||||
return true;
|
return !palReadPad(GPIOC, GPIOC_SD_DETECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief SDC card write protection detection.
|
* @brief SDC card write protection detection.
|
||||||
*/
|
*/
|
||||||
bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
|
bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
|
||||||
|
|
||||||
(void)sdcp;
|
(void)sdcp;
|
||||||
|
/* TODO: Fill the implementation.*/
|
||||||
return !palReadPad(GPIOC, GPIOC_SD_DETECT);
|
return false;
|
||||||
}
|
}
|
||||||
#endif /* HAL_USE_SDC */
|
#endif /* HAL_USE_SDC */
|
||||||
|
|
||||||
|
|
|
@ -11,10 +11,10 @@
|
||||||
<board_name>STMicroelectronics STM32F746G-Discovery</board_name>
|
<board_name>STMicroelectronics STM32F746G-Discovery</board_name>
|
||||||
<board_id>ST_STM32F746G_DISCOVERY</board_id>
|
<board_id>ST_STM32F746G_DISCOVERY</board_id>
|
||||||
<board_functions>
|
<board_functions>
|
||||||
<sdc_lld_is_write_protected><![CDATA[
|
<sdc_lld_is_card_inserted><![CDATA[
|
||||||
(void)sdcp;
|
(void)sdcp;
|
||||||
|
|
||||||
return !palReadPad(GPIOC, GPIOC_SD_DETECT);]]></sdc_lld_is_write_protected>
|
return !palReadPad(GPIOC, GPIOC_SD_DETECT);]]></sdc_lld_is_card_inserted>
|
||||||
</board_functions>
|
</board_functions>
|
||||||
<headers></headers>
|
<headers></headers>
|
||||||
<ethernet_phy>
|
<ethernet_phy>
|
||||||
|
|
Loading…
Reference in New Issue