X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Fflash25.h;fp=bertos%2Fdrv%2Fflash25.h;h=86dee8600f8cd22bb75d30b403409a8099d72c19;hb=8cca97771bf57082616dde340005874812fb728a;hp=ed89384d7ce23bfd7f3784d7fd9c7d9ee7c06866;hpb=871ebe12423baa35456746a47becd58cd7cf2f6f;p=bertos.git diff --git a/bertos/drv/flash25.h b/bertos/drv/flash25.h index ed89384d..86dee860 100644 --- a/bertos/drv/flash25.h +++ b/bertos/drv/flash25.h @@ -56,11 +56,11 @@ typedef uint8_t flash25Offset_t; /** * Flash25 KFile context structure. */ -typedef struct Flash25KFile +typedef struct Flash25 { KFile fd; ///< File descriptor. KFile *channel; ///< Dataflash comm channel (usually SPI). -} Flash25KFile; +} Flash25; /** * ID for dataflash. @@ -69,12 +69,12 @@ typedef struct Flash25KFile /** - * Convert + ASSERT from generic KFile to Flash25KFile. + * Convert + ASSERT from generic KFile to Flash25. */ -INLINE Flash25KFile * FLASH25KFILE(KFile *fd) +INLINE Flash25 * FLASH25KFILE(KFile *fd) { ASSERT(fd->_type == KFT_FLASH25); - return (Flash25KFile *)fd; + return (Flash25 *)fd; } /** @@ -131,9 +131,9 @@ typedef enum { FLASH25_SECT4 = 0x30000, ///< Sector 4 (0x30000 -0x3FFFF) } Flash25Sector; -void flash25_init(Flash25KFile *fd, KFile *ch); -void flash25_chipErase(Flash25KFile *fd); -void flash25_sectorErase(Flash25KFile *fd, Flash25Sector sector); +void flash25_init(Flash25 *fd, KFile *ch); +void flash25_chipErase(Flash25 *fd); +void flash25_sectorErase(Flash25 *fd, Flash25Sector sector); bool flash25_test(KFile *channel); #endif /* DRV_FLASH25_H */