BeRTOS
mt29f_sam3.h
Go to the documentation of this file.
00001 
00038 #ifndef MT29F_SAM3_H
00039 #define MT29F_SAM3_H
00040 
00041 #include <drv/mt29f.h>
00042 
00043 
00044 // MT29F2G08AAD, FIXME: configurable
00045 #define MT29F_DATA_SIZE   0x800       // 2048 B
00046 #define MT29F_SPARE_SIZE  0x40        // 64 B
00047 #define MT29F_PAGE_SIZE   (MT29F_DATA_SIZE + MT29F_SPARE_SIZE)
00048 #define MT29F_BLOCK_SIZE  0x20000     // 128 kB
00049 #define MT29F_SIZE        0x10000000  // 256 MB
00050 #define MT29F_ECC_NWORDS  (MT29F_DATA_SIZE / 256)
00051 
00052 /*
00053  * PIO definitions.
00054  */
00055 #define MT29F_PIN_CE        BV(6)
00056 #define MT29F_PIN_RB        BV(2)
00057 #define MT29F_PINS_PORTA    (MT29F_PIN_CE | MT29F_PIN_RB)
00058 #define MT29F_PERIPH_PORTA  PIO_PERIPH_B
00059 
00060 #define MT29F_PIN_OE        BV(19)
00061 #define MT29F_PIN_WE        BV(20)
00062 #define MT29F_PIN_IO        0x0000FFFF
00063 #define MT29F_PINS_PORTC    (MT29F_PIN_OE | MT29F_PIN_WE | MT29F_PIN_IO)
00064 #define MT29F_PERIPH_PORTC  PIO_PERIPH_A
00065 
00066 #define MT29F_PIN_CLE       BV(9)
00067 #define MT29F_PIN_ALE       BV(8)
00068 #define MT29F_PINS_PORTD    (MT29F_PIN_CLE | MT29F_PIN_ALE)
00069 #define MT29F_PERIPH_PORTD  PIO_PERIPH_A
00070 
00071 
00072 #endif /* MT29F_SAM3_H */
00073