Menu

#38 Mistake in at91_efc.c

pending-works-for-me
5
2013-04-29
2013-01-29
Anonymous
No

in At91EfcSectorWrite;page number is calculated in a wrong way from give offset

Discussion

  • Nobody/Anonymous

     
  • Ole Reinhardt

    Ole Reinhardt - 2013-04-29

    I don't see any problem with the page offset calculation in the current
    trunk. The patch would change

    off & MC_PAGEN_MASK

    to

    ((off / PAGE_SIZE) << 8) & MC_PAGEN_MASK

    Problem:

    PAGE_SIZE is not defined in this context.

    However, the PAGE_SIZE of the At91 efc is 256 bytes, so

    ((off / PAGE_SIZE) << 8) & MC_PAGEN_MASK

    Is exactly the same as

    off & MC_PAGEN_MASK

    is'nt it?

     
  • Ole Reinhardt

    Ole Reinhardt - 2013-04-29
    • assigned_to: nobody --> olereinhardt
    • labels: --> RTOS - General
    • status: open --> pending-works-for-me
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.