/*-----------------------------------------------------------------------------------
!
!                              COPYRIGHT 2015 BY
!                            MegaChips Corporation
!
!------------------------------------------------------------------------------------
! These coded instructions, statements, and computer programs include
! intellectual property and know-how belonging to MegaChips
! Corporaiton ("MCC") and its partner companies.
! Therefore, do not use these specifications for any purpose other than
! the purpose
! expressly agreed to by MCCs customer and MCC.  Also, do not duplicate,
! copy,
! or reproduce these specifications, nor reveal these specifications to
! any third party
! without MCCs prior written consent.
!
*/
/*-----------------------------------------------------------------------------------
  FILE        : bol.c
  DESCRIPTION : bol.c header
  Revision    : $Rev: 4 $
  Author      : $Author: shirait $
  Date        : $Date: 2015-09-09 15:19:58 +0900 (豌ｴ, 09 9 2015) $
-----------------------------------------------------------------------------------*/
#ifndef ___BOL_H_INCLUDED___
#define ___BOL_H_INCLUDED___

/********************************************************************************************
include
********************************************************************************************/
#include <stdint.h>
#include "bol_reg.h"


/********************************************************************************************
macro
********************************************************************************************/
//
//
// BootCodeサイズを抑えるため、マクロ化しています
//
//

/*---------------------------------------------------------------------------
  function  : BootLoder内のSK削除
  arguments : none
  return    : void
  detail    : none
--------------------------------------------------------------------------*/
#define BOL_EraseKey() \
	BOLR.aes_sk[0] = 0; \
	BOLR.aes_sk[1] = 0; \
	BOLR.aes_sk[2] = 0; \
	BOLR.aes_sk[3] = 0



/********************************************************************************************
prottype
********************************************************************************************/
void BOL_Init(void);
void BOL_DecryptFW(volatile const void* pSK, volatile const void* pIV, uint16_t size);


#endif // ___BOL_H_INCLUDED___
