/* * Flash.h * * Author: Aleksey Gerasimenko * gerasimenko.aleksey.n@gmail.com */ #include "F28335/DSP28x_Project.h" #include "F28335/Flash2833x_API_Config.h" #include "F28335/Flash2833x_API_Library.h" #include "DSP28335/CPUBase.h" #ifndef DSP28335_FLASH_H_ #define DSP28335_FLASH_H_ #define API_VERSION_DEFAULT 0x0100 namespace DSP28335 { typedef struct { Uint16 *StartAddr; Uint16 *EndAddr; }SECTOR; class FLASH: public DSP28335::CPUBase { private: Uint16 m_mask_sector; SECTOR m_sector; // FLASH_ST m_status_erase; FLASH_ST m_status_program; FLASH_ST m_status_verify; Uint16 m_operation_status_erase; Uint16 m_operation_status_program; Uint16 m_operation_status_verify; // Uint16 m_version_hex_default; Uint16 m_version_hex; // public: FLASH(); void setup(Uint16 mask_sector, Uint16 *StartAddr, Uint16 *EndAddr); Uint16 erase(); Uint16 read(Uint16 *Dest, Uint32 Length); Uint16 program(Uint16 *BufAddr, Uint32 Length); Uint16 verify(Uint16 *BufAddr, Uint32 Length); Uint16 APIVersionHex(); // };//end class FLASH } /* namespace DSP28335 */ #endif /* DSP28335_FLASH_H_ */