SPI Flash AT45DBXXXD
Fork of at45db161d by
Diff: at45db161d.h
- Revision:
- 7:2f9d8b47704f
- Parent:
- 6:1872f591d604
- Child:
- 8:1ec3997fe258
--- a/at45db161d.h Fri Mar 06 09:42:28 2015 +0800 +++ b/at45db161d.h Fri Mar 06 15:47:44 2015 +0800 @@ -23,13 +23,12 @@ * This structure contains various informations about the * dataflash chip being used. **/ - struct ID { + typedef struct { uint8_t manufacturer; /**< Manufacturer id **/ uint8_t device[2]; /**< Device id **/ uint8_t extendedInfoLength; /**< Extended device information string length **/ - }; - - public: + uint16_t pageSize, pageLength; + } Info; /** * ATD45DBxxxD @@ -49,7 +48,7 @@ * the extended device information string bytes. * @param id Pointer to the ID structure to initialize **/ - void ReadManufacturerAndDeviceID(struct ATD45DB161D::ID *id); + ATD45DB161D::Info *getInfo(); /** * A main memory page read allows the user to read data directly from @@ -186,8 +185,7 @@ SPI *_spi; DigitalOut _cs; - - uint16_t _bytes, _pages; + Info _info; };