mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
Implement iPod Nano 2G nand_get_info()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23238 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8f1709f434
commit
4562e683a2
2 changed files with 12 additions and 1 deletions
|
|
@ -90,7 +90,12 @@ void nand_enable(bool on)
|
|||
|
||||
void nand_get_info(IF_MD2(int drive,) struct storage_info *info)
|
||||
{
|
||||
(void)info;
|
||||
uint32_t ppb = ftl_banks * (*ftl_nand_type).pagesperblock;
|
||||
(*info).sector_size = SECTOR_SIZE;
|
||||
(*info).num_sectors = (*ftl_nand_type).userblocks * ppb;
|
||||
(*info).vendor = "Apple";
|
||||
(*info).product = "iPod Nano 2G";
|
||||
(*info).revision = "1.0";
|
||||
}
|
||||
|
||||
long nand_last_disk_activity(void)
|
||||
|
|
|
|||
|
|
@ -30,6 +30,12 @@
|
|||
#define FTL_READONLY
|
||||
#endif
|
||||
|
||||
/* Pointer to an info structure regarding the flash type used */
|
||||
const struct nand_device_info_type* ftl_nand_type;
|
||||
|
||||
/* Number of banks we detected a chip on */
|
||||
uint32_t ftl_banks;
|
||||
|
||||
uint32_t ftl_init(void);
|
||||
uint32_t ftl_read(uint32_t sector, uint32_t count, void* buffer);
|
||||
uint32_t ftl_write(uint32_t sector, uint32_t count, const void* buffer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue