git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6309 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2013-09-21 10:02:17 +00:00
parent be933e6129
commit 06eaa953ac
15 changed files with 48 additions and 48 deletions

View File

@ -62,13 +62,13 @@ void __early_init(void) {
#if HAL_USE_MMC_SPI #if HAL_USE_MMC_SPI
/* Board-related functions related to the MMC_SPI driver.*/ /* Board-related functions related to the MMC_SPI driver.*/
bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) { bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
return !palReadPad(IOPORT2, PB_CP1); return !palReadPad(IOPORT2, PB_CP1);
} }
bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) { bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
return palReadPad(IOPORT2, PB_WP1); return palReadPad(IOPORT2, PB_WP1);

View File

@ -72,13 +72,13 @@ void __early_init(void) {
#if HAL_USE_MMC_SPI #if HAL_USE_MMC_SPI
/* Board-related functions related to the MMC_SPI driver.*/ /* Board-related functions related to the MMC_SPI driver.*/
bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) { bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
return !palReadPad(IOPORT2, PIOB_MMC_CP); return !palReadPad(IOPORT2, PIOB_MMC_CP);
} }
bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) { bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
return palReadPad(IOPORT2, PIOB_MMC_WP); return palReadPad(IOPORT2, PIOB_MMC_WP);

View File

@ -65,13 +65,13 @@ void __early_init(void) {
#if HAL_USE_MMC_SPI #if HAL_USE_MMC_SPI
/* Board-related functions related to the MMC_SPI driver.*/ /* Board-related functions related to the MMC_SPI driver.*/
bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) { bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
return !palReadPad(IOPORT1, PIOA_MMC_CP); return !palReadPad(IOPORT1, PIOA_MMC_CP);
} }
bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) { bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
return palReadPad(IOPORT1, PIOA_MMC_WP); return palReadPad(IOPORT1, PIOA_MMC_WP);

View File

@ -59,18 +59,18 @@ void __early_init(void) {
/** /**
* @brief SDC card detection. * @brief SDC card detection.
*/ */
bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) { bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
static bool_t last_status = FALSE; static bool last_status = FALSE;
if (blkIsTransferring(sdcp)) if (blkIsTransferring(sdcp))
return last_status; return last_status;
return last_status = (bool_t)palReadPad(GPIOC, GPIOC_SD_D3); return last_status = (bool)palReadPad(GPIOC, GPIOC_SD_D3);
} }
/** /**
* @brief SDC card write protection detection. * @brief SDC card write protection detection.
*/ */
bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) { bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
(void)sdcp; (void)sdcp;
return FALSE; return FALSE;
@ -81,7 +81,7 @@ bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) {
/** /**
* @brief MMC_SPI card detection. * @brief MMC_SPI card detection.
*/ */
bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) { bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
/* TODO: Fill the implementation.*/ /* TODO: Fill the implementation.*/
@ -91,7 +91,7 @@ bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) {
/** /**
* @brief MMC_SPI card write protection detection. * @brief MMC_SPI card write protection detection.
*/ */
bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) { bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
/* TODO: Fill the implementation.*/ /* TODO: Fill the implementation.*/

View File

@ -47,7 +47,7 @@ void __early_init(void) {
/** /**
* @brief SDC card detection. * @brief SDC card detection.
*/ */
bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) { bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
(void)sdcp; (void)sdcp;
return TRUE; return TRUE;
@ -56,7 +56,7 @@ bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) {
/** /**
* @brief SDC card write protection detection. * @brief SDC card write protection detection.
*/ */
bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) { bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
(void)sdcp; (void)sdcp;
return FALSE; return FALSE;
@ -65,13 +65,13 @@ bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) {
#if HAL_USE_MMC_SPI #if HAL_USE_MMC_SPI
/* Board-related functions related to the MMC_SPI driver.*/ /* Board-related functions related to the MMC_SPI driver.*/
bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) { bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
return TRUE; return TRUE;
} }
bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) { bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
return FALSE; return FALSE;

View File

@ -44,13 +44,13 @@ void __early_init(void) {
#if HAL_USE_MMC_SPI #if HAL_USE_MMC_SPI
/* Board-related functions related to the MMC_SPI driver.*/ /* Board-related functions related to the MMC_SPI driver.*/
bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) { bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
return palReadPad(GPIOC, GPIOC_MMCCP); return palReadPad(GPIOC, GPIOC_MMCCP);
} }
bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) { bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
return !palReadPad(GPIOC, GPIOC_MMCWP); return !palReadPad(GPIOC, GPIOC_MMCWP);

View File

@ -46,20 +46,20 @@ void __early_init(void) {
/* /*
* Card detection through the card internal pull-up on D3. * Card detection through the card internal pull-up on D3.
*/ */
bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) { bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
static bool_t last_status = FALSE; static bool last_status = FALSE;
(void)mmcp; (void)mmcp;
if ((palReadLatch(GPIOA) & PAL_PORT_BIT(GPIOA_SPI3_CS_MMC)) == 0) if ((palReadLatch(GPIOA) & PAL_PORT_BIT(GPIOA_SPI3_CS_MMC)) == 0)
return last_status; return last_status;
return last_status = (bool_t)palReadPad(GPIOA, GPIOA_SPI3_CS_MMC); return last_status = (bool)palReadPad(GPIOA, GPIOA_SPI3_CS_MMC);
} }
/* /*
* Card write protection detection is not possible, the card is always * Card write protection detection is not possible, the card is always
* reported as not protected. * reported as not protected.
*/ */
bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) { bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
return FALSE; return FALSE;

View File

@ -50,19 +50,19 @@ void __early_init(void) {
/** /**
* @brief MMC_SPI card detection. * @brief MMC_SPI card detection.
*/ */
bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) { bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
static bool_t last_status = FALSE; static bool last_status = FALSE;
(void)mmcp; (void)mmcp;
if ((palReadLatch(GPIOD) & PAL_PORT_BIT(GPIOD_SPI3_CS)) == 0) if ((palReadLatch(GPIOD) & PAL_PORT_BIT(GPIOD_SPI3_CS)) == 0)
return last_status; return last_status;
return last_status = (bool_t)palReadPad(GPIOD, GPIOD_SPI3_CS); return last_status = (bool)palReadPad(GPIOD, GPIOD_SPI3_CS);
} }
/** /**
* @brief MMC_SPI card write protection detection. * @brief MMC_SPI card write protection detection.
*/ */
bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) { bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
/* TODO: Fill the implementation.*/ /* TODO: Fill the implementation.*/

View File

@ -71,13 +71,13 @@ void __early_init(void) {
#if HAL_USE_MMC_SPI #if HAL_USE_MMC_SPI
/* Board-related functions related to the MMC_SPI driver.*/ /* Board-related functions related to the MMC_SPI driver.*/
bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) { bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
return !palReadPad(IOPORT2, PIOB_MMC_CP); return !palReadPad(IOPORT2, PIOB_MMC_CP);
} }
bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) { bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
return palReadPad(IOPORT2, PIOB_MMC_WP); return palReadPad(IOPORT2, PIOB_MMC_WP);

View File

@ -46,13 +46,13 @@ void __early_init(void) {
#if HAL_USE_SDC #if HAL_USE_SDC
/* Board-related functions related to the SDC driver.*/ /* Board-related functions related to the SDC driver.*/
bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) { bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
(void)sdcp; (void)sdcp;
return !palReadPad(GPIOF, GPIOF_SD_DETECT); return !palReadPad(GPIOF, GPIOF_SD_DETECT);
} }
bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) { bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
(void)sdcp; (void)sdcp;
return FALSE; return FALSE;

View File

@ -53,7 +53,7 @@ void __early_init(void) {
/** /**
* @brief SDC card detection. * @brief SDC card detection.
*/ */
bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) { bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
(void)sdcp; (void)sdcp;
/* TODO: Fill the implementation.*/ /* TODO: Fill the implementation.*/
@ -63,7 +63,7 @@ bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) {
/** /**
* @brief SDC card write protection detection. * @brief SDC card write protection detection.
*/ */
bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) { bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
(void)sdcp; (void)sdcp;
/* TODO: Fill the implementation.*/ /* TODO: Fill the implementation.*/
@ -75,7 +75,7 @@ bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) {
/** /**
* @brief MMC_SPI card detection. * @brief MMC_SPI card detection.
*/ */
bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) { bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
/* TODO: Fill the implementation.*/ /* TODO: Fill the implementation.*/
@ -85,7 +85,7 @@ bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) {
/** /**
* @brief MMC_SPI card write protection detection. * @brief MMC_SPI card write protection detection.
*/ */
bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) { bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
/* TODO: Fill the implementation.*/ /* TODO: Fill the implementation.*/

View File

@ -51,7 +51,7 @@ void __early_init(void) {
/** /**
* @brief MMC_SPI card detection. * @brief MMC_SPI card detection.
*/ */
bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) { bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
/* TODO: Fill the implementation.*/ /* TODO: Fill the implementation.*/
@ -61,7 +61,7 @@ bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) {
/** /**
* @brief MMC_SPI card write protection detection. * @brief MMC_SPI card write protection detection.
*/ */
bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) { bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
/* TODO: Fill the implementation.*/ /* TODO: Fill the implementation.*/

View File

@ -53,7 +53,7 @@ void __early_init(void) {
/** /**
* @brief SDC card detection. * @brief SDC card detection.
*/ */
bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) { bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
(void)sdcp; (void)sdcp;
/* TODO: Fill the implementation.*/ /* TODO: Fill the implementation.*/
@ -63,7 +63,7 @@ bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) {
/** /**
* @brief SDC card write protection detection. * @brief SDC card write protection detection.
*/ */
bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) { bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
(void)sdcp; (void)sdcp;
/* TODO: Fill the implementation.*/ /* TODO: Fill the implementation.*/
@ -75,7 +75,7 @@ bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) {
/** /**
* @brief MMC_SPI card detection. * @brief MMC_SPI card detection.
*/ */
bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) { bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
/* TODO: Fill the implementation.*/ /* TODO: Fill the implementation.*/
@ -85,7 +85,7 @@ bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) {
/** /**
* @brief MMC_SPI card write protection detection. * @brief MMC_SPI card write protection detection.
*/ */
bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) { bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
/* TODO: Fill the implementation.*/ /* TODO: Fill the implementation.*/

View File

@ -59,7 +59,7 @@ void __early_init(void) {
/** /**
* @brief SDC card detection. * @brief SDC card detection.
*/ */
bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) { bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
(void)sdcp; (void)sdcp;
/* TODO: Fill the implementation.*/ /* TODO: Fill the implementation.*/
@ -69,7 +69,7 @@ bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) {
/** /**
* @brief SDC card write protection detection. * @brief SDC card write protection detection.
*/ */
bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) { bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
(void)sdcp; (void)sdcp;
/* TODO: Fill the implementation.*/ /* TODO: Fill the implementation.*/
@ -81,7 +81,7 @@ bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) {
/** /**
* @brief MMC_SPI card detection. * @brief MMC_SPI card detection.
*/ */
bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) { bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
/* TODO: Fill the implementation.*/ /* TODO: Fill the implementation.*/
@ -91,7 +91,7 @@ bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) {
/** /**
* @brief MMC_SPI card write protection detection. * @brief MMC_SPI card write protection detection.
*/ */
bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) { bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
/* TODO: Fill the implementation.*/ /* TODO: Fill the implementation.*/

View File

@ -53,7 +53,7 @@ void __early_init(void) {
/** /**
* @brief SDC card detection. * @brief SDC card detection.
*/ */
bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) { bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
(void)sdcp; (void)sdcp;
/* TODO: Fill the implementation.*/ /* TODO: Fill the implementation.*/
@ -63,7 +63,7 @@ bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) {
/** /**
* @brief SDC card write protection detection. * @brief SDC card write protection detection.
*/ */
bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) { bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
(void)sdcp; (void)sdcp;
/* TODO: Fill the implementation.*/ /* TODO: Fill the implementation.*/
@ -75,7 +75,7 @@ bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) {
/** /**
* @brief MMC_SPI card detection. * @brief MMC_SPI card detection.
*/ */
bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) { bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
/* TODO: Fill the implementation.*/ /* TODO: Fill the implementation.*/
@ -85,7 +85,7 @@ bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) {
/** /**
* @brief MMC_SPI card write protection detection. * @brief MMC_SPI card write protection detection.
*/ */
bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) { bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
(void)mmcp; (void)mmcp;
/* TODO: Fill the implementation.*/ /* TODO: Fill the implementation.*/