int BOOL
Boolean datatype definition.
Definition: Defines.h:124
#define NULL
Definition: Defines.h:388
int TRIL
Thrilean datatype defenition.
Definition: Defines.h:143
unsigned char U8
Binary 8-Bit unsigned integer datatype defenition.
Definition: Defines.h:183
void VOID
Datatypesess datatype definition.
Definition: Defines.h:105
unsigned long U32
Binary 32-Bit unsigned integer datatype defenition.
Definition: Defines.h:203
unsigned short U16
Binary 16-Bit unsigned integer datatype defenition.
Definition: Defines.h:193
#define unset
Unset value of thrilean datatype defenition.
Definition: Defines.h:146
Communication protocol base class header file.
SPI bus master base class header file.
Definition: Protocol_Base.h:57
SPI master base class.
Definition: SPI_Master_Base.h:58
SPI memory base class.
Definition: SPI_Memory_Base.h:55
BOOL Get_Block_Size(U32 *u32_Block_Size)
Return block size in bytes.
Definition: SPI_Memory_Base.cpp:398
virtual BOOL Write_Enable()
Enable write operation into memory.
Definition: SPI_Memory_Base.cpp:231
BOOL Get_Page_Index(U32 u32_Linear_Address, U32 *u32_Page_Index)
Get page index from lenear address.
Definition: SPI_Memory_Base.cpp:566
VOID Init()
SPI memory base object initialisation method.
Definition: SPI_Memory_Base.cpp:70
virtual VOID Start()
Start operation of SPI memory base driver.
Definition: SPI_Memory_Base.cpp:99
BOOL Get_Block_Count(U16 *u16_Block_Count)
Return total amount of the blocks.
Definition: SPI_Memory_Base.cpp:356
BOOL Get_Pages_Per_Chip_Count(U32 *u32_Pages_Per_Chip)
Return total amount of the pages.
Definition: SPI_Memory_Base.cpp:482
TSPI_Master_Base * object_SPI_Master
Pointer to the SPI master object.
Definition: SPI_Memory_Base.h:515
virtual BOOL Read_Memory(U32 u32_Address, U8 *u8_Data)
Read byte from memory.
Definition: SPI_Memory_Base.cpp:279
virtual BOOL Write_Disable()
Disable write operation into memory.
Definition: SPI_Memory_Base.cpp:243
U32 Get_Capacity()
Get capacity of attached SPI memory.
Definition: SPI_Memory_Base.cpp:195
BOOL bool_Manufacturer_ID_Available
Manufacturer ID availablility status.
Definition: SPI_Memory_Base.h:524
virtual BOOL Erase_Chip(BOOL bool_Force_Bad_Block_Erase)
Erase chip method.
Definition: SPI_Memory_Base.cpp:219
virtual BOOL Write_Buffer(U32 u32_Linear_Address, U32 u32_Size, U8 *u8_Data_Buffer)=0
Write data from buffer into memory method.
BOOL Get_Page_Address(U16 u16_Block_Index, U16 u16_Relative_Page_Index, U32 *u32_Linear_Address)
Get linear address of the page by specified block index and relative page index.
Definition: SPI_Memory_Base.cpp:846
U32 u32_Capacity
Depricated: Capacity of SPI memory in bytes.
Definition: SPI_Memory_Base.h:533
virtual BOOL Write_Memory(U32 u32_Address, U8 u8_Data)
Write byte into memory.
Definition: SPI_Memory_Base.cpp:291
virtual BOOL Write_Status_Register(U8 u8_StatusRegister)
Write memory device status register method.
Definition: SPI_Memory_Base.cpp:267
BOOL Get_Block_Index_By_Page(U32 u32_Page_Index, U16 *u16_Block_Index)
Get block index by page index.
Definition: SPI_Memory_Base.cpp:999
TRIL tril_Available
Memory chip availablility status.
Definition: SPI_Memory_Base.h:521
TSPI_Memory_Base()
Base class constructor method.
Definition: SPI_Memory_Base.cpp:54
VOID Done()
SPI memory base object finalisation method.
Definition: SPI_Memory_Base.cpp:91
virtual BOOL Verify_Buffer(U32 u32_Linear_Address, U32 u32_Size, U8 *u8_Data_Buffer)
Verify data in memory and memory method.
Definition: SPI_Memory_Base.cpp:207
VOID Assign_SPI_Master(TSPI_Master_Base *object_New_SPI_Master)
Assign SPI master hardware driver.
Definition: SPI_Memory_Base.cpp:159
virtual VOID Stop()
Stop operation of SPI memory base driver.
Definition: SPI_Memory_Base.cpp:129
BOOL bool_Serial_Number_Available
Serial number availablility status.
Definition: SPI_Memory_Base.h:530
BOOL Extract_Page_Relative_Address(U32 u32_Linear_Address, U16 *u16_Relative_Address)
Extract page relative address from lenear address.
Definition: SPI_Memory_Base.cpp:662
virtual BOOL Read_Identification()=0
Read memory device identification information pure virtual method.
BOOL bool_Device_ID_Available
Device ID availablility status.
Definition: SPI_Memory_Base.h:527
virtual BOOL Read_Buffer(U32 u32_Linear_Address, U32 u32_Size, U8 *u8_Data_Buffer)=0
Read data from memory into the buffer method.
VOID Unassign_SPI_Master()
Unassign SPI master hardware driver.
Definition: SPI_Memory_Base.cpp:171
BOOL Is_Page_Index_In_Range(U32 u32_Page_Index)
This method check that page index is valid.
Definition: SPI_Memory_Base.cpp:1144
virtual ~TSPI_Memory_Base()
Base class constructor method.
Definition: SPI_Memory_Base.cpp:62
TRIL Is_Available()
Return SPI avaliability.
Definition: SPI_Memory_Base.cpp:183
virtual VOID Send_Information(TProtocol_Base *object_Protocol)
Method sends default driver information over specified communication channel.
Definition: SPI_Memory_Base.cpp:303
virtual BOOL Read_Status_Register(U8 *u8_StatusRegister)
Read memory device status register method.
Definition: SPI_Memory_Base.cpp:255
TMemory_Chip_Descriptor * struct_Memory_Chip_Descriptor
Pointer to the chip descriptor structure.
Definition: SPI_Memory_Base.h:518
BOOL Is_Block_Index_In_Range(U16 u16_Block_Index)
This method check that block index is valid.
Definition: SPI_Memory_Base.cpp:1083
BOOL Is_Page_Relative_Index_In_Range(U16 u16_Page_Relative_Index)
This method check that relative index is valid.
Definition: SPI_Memory_Base.cpp:1205
BOOL Get_Pages_Per_Block_Count(U16 *u16_Pages_Per_Block)
Return pages number into block.
Definition: SPI_Memory_Base.cpp:440
BOOL Get_Block_Address(U16 u16_Block_Index, U32 *u32_Linear_Address)
Get linear address of the block by specified block index.
Definition: SPI_Memory_Base.cpp:760
BOOL Get_Chip_Size(U32 *u32_Chip_Size)
Return total chip capacity in bytes.
Definition: SPI_Memory_Base.cpp:314
BOOL Get_Page_Size(U16 *u16_Page_Size)
Return page size in bytes.
Definition: SPI_Memory_Base.cpp:524
Chip descriptior structure.
Definition: SPI_Memory_Base.h:69
U32 u32_Block_Size
Size of block in bytes.
Definition: SPI_Memory_Base.h:75
U16 u16_Blocks_Per_Chip_Count
Count of the blocks per chip.
Definition: SPI_Memory_Base.h:81
U32 u32_Pages_Per_Chip_Count
Count of the pages per chip.
Definition: SPI_Memory_Base.h:87
BOOL bool_Supported
Chip supported flag.
Definition: SPI_Memory_Base.h:90
U32 u32_Chip_Size
Chip capacity in bytes.
Definition: SPI_Memory_Base.h:72
U16 u16_Pages_Per_Block_Count
Count of the pages per block.
Definition: SPI_Memory_Base.h:84
U16 u16_Page_Size
Size of page in bytes.
Definition: SPI_Memory_Base.h:78