made more conform with contiki indentation.
This commit is contained in:
parent
e6cc0105b0
commit
2822ff7ddb
8 changed files with 135 additions and 258 deletions
|
@ -1,4 +1,3 @@
|
|||
|
||||
/*
|
||||
Copyright 2007, Freie Universitaet Berlin. All rights reserved.
|
||||
|
||||
|
@ -48,12 +47,11 @@ Berlin, 2007
|
|||
* @brief MMC-/SD-Card library, Additional Information
|
||||
*
|
||||
* @author Michael Baar <baar@inf.fu-berlin.de>
|
||||
* @version $Revision: 1.2 $
|
||||
* @version $Revision: 1.3 $
|
||||
*
|
||||
* $Id: sd_info.c,v 1.2 2008/03/28 15:58:44 nvt-se Exp $
|
||||
* $Id: sd_info.c,v 1.3 2008/03/28 23:03:05 nvt-se Exp $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup libsd
|
||||
* @{
|
||||
|
@ -64,45 +62,27 @@ Berlin, 2007
|
|||
unsigned int
|
||||
sd_read_cid(struct sd_cid *pCID)
|
||||
{
|
||||
|
||||
return _sd_read_register(pCID, SD_CMD_SEND_CID, sizeof (struct sd_cid));
|
||||
|
||||
}
|
||||
|
||||
unsigned long
|
||||
|
||||
sd_get_size()
|
||||
sd_get_size(void)
|
||||
{
|
||||
|
||||
uint32_t size = 0;
|
||||
|
||||
|
||||
if (uart_lock(UART_MODE_SPI)) {
|
||||
|
||||
struct sd_csd csd;
|
||||
|
||||
|
||||
if (_sd_read_register(&csd, SD_CMD_SEND_CSD, sizeof (struct sd_csd))) {
|
||||
|
||||
size = SD_CSD_C_SIZE(csd) + 1;
|
||||
|
||||
size <<= SD_CSD_C_MULT(csd);
|
||||
|
||||
size <<= 2;
|
||||
|
||||
size <<= sd_state.MaxBlockLen_bit;
|
||||
|
||||
}
|
||||
|
||||
uart_unlock(UART_MODE_SPI);
|
||||
|
||||
}
|
||||
|
||||
|
||||
return size;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** @} */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue