[En-Nut-Discussion] AT25DF_INFO
Uwe Bonnes
bon at elektron.ikp.physik.tu-darmstadt.de
Mon Mar 21 15:19:56 CET 2016
Hello (Ole),
dev/spi_at25df.h defines in struct _AT25DF_INFO {
/*! \brief Total number of pages. */
uint32_t at25df_erase_blocks;
Description and name contradict. Shouldn't it read something like
/*! \brief Total number of blocks. */
uint32_t at25df_blocks;
Otherwise, I think at25df_ebshft is not needed and instead of e.g.
./dev/spi_flash_at25df.c: pga = pgn << at->dxb_dfinfo->at25df_ebshft;
we could use
./dev/spi_flash_at25df.c: pga = pgn << 12;
Having redundant parameters increases the chance for wrong
parameters. Smallest erase size is always 4096 bytes for all XX25 serial
flash I had a look at,
Shouldn't
./dev/spi_at25df_info.c:AT25DF_INFO at25df_info[] = {
read
./dev/spi_at25df_info.c:const AT25DF_INFO at25df_info[] = {
^^^^
to not waste RAM?
Any comments?
Bye
--
Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 1623569 ------- Fax. 06151 1623305 ---------
More information about the En-Nut-Discussion
mailing list