#ifndef _sst26_h
#define _sst26_h   

//DEFINICE

#define WRITE_ENABLE                        0x06
#define CHIP_ERASE                          0xC7
#define GLOBAL_BLOCK_PROTECTION_UNLOCK      0x98
#define READ_STATUS_REGISTER                0x05
#define PAGE_PROGRAM                        0x02
#define READ_MEMORY                         0x03


//FUNKCE 

// inicializace FLASH
void FLASH_Init(void);

// smazani cele FLASH
void FLASH_ChipErase(void);

// cekani na dokonceni operace
void FLASH_WaitUntilComplete(void);

// zapsani na FLASH
void FLASH_Write(uint8_t *pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite);

// cteni z FLASH
void FLASH_Read(uint8_t* pBuffer, uint32_t ReadAddr, uint16_t NumByteToRead);

// cteni status registru FLASH
uint8_t FLASH_ReadStatReg(void);

#endif