/*
 * flash.h
 *
 *  Created on: 2019. 7. 4.
 *      Author: parkyj
 */

#ifndef FLASH_H_
#define FLASH_H_

#include "main.h"
#include "CRC16.h"

#define FLASH_USER_START_ADDR ((uint32_t)0x0807F800)

#define FLASH_USER_END_ADDR     FLASH_USER_START_ADDR + FLASH_PAGE_SIZE      /* End @ of user Flash area */
#define APPLICATION_ADDRESS     (uint32_t)0x08004000      /* Start user code address: ADDR_FLASH_PAGE_8 */


#define FirmwareUpdataAck  0x11
#define FirmwareUpdataNak  0x22

#define FirmwareUpdateDelay 10
uint8_t Bluecell_Flash_Write(uint8_t* data);
bool Bluecell_Flash_Read(uint8_t* data);



#endif /* FLASH_H_ */
