static int is_flash_protection(void);
static int disable_flash_protection(void);
static int is_bios_protection(void);
static int disable_bios_protection(void);
static int erase_4K_sector(unsigned int idx);
static int erase_chip(void);
static uint8_t read_byte(uint32_t addr);
static int write_byte(uint32_t addr, uint8_t byte);
/*****************************************************************************
Description:
This function is called when the driver is unloaded from memory.
Parameters:
none
Returns:
none
******************************************************************************/
void spi_cleanup(void)
{
//remove cdev struct from system
cdev_del(&spi_char.cdev);
/*****************************************************************************
Description:
This function is called when the driver interface is opened