flash.h
Go to the documentation of this file.
00001 #ifndef __MSP430WARE_FLASH_H__
00002 #define __MSP430WARE_FLASH_H__
00003 
00004 //*****************************************************************************
00005 //
00006 //The following are the defines to include the required modules for this
00007 //peripheral in msp430xgeneric.h file
00008 //
00009 //*****************************************************************************
00010 #define __MSP430_HAS_FLASH__
00011 
00012 
00013 //*****************************************************************************
00014 //
00015 //The following are values that can be passed to the Flash_status()
00016 //API as the mask parameter.
00017 //
00018 //*****************************************************************************
00019 #define FLASH_READY_FOR_NEXT_WRITE              WAIT_L
00020 #define FLASH_ACCESS_VIOLATION_INTERRUPT_FLAG   ACCVIFG_L
00021 #define FLASH_PASSWORD_WRITTEN_INCORRECTLY      KEYV_L
00022 #define FLASH_BUSY                              BUSY_L
00023 
00024 //*****************************************************************************
00025 //
00026 //Prototypes for the APIs.
00027 //
00028 //*****************************************************************************
00029 extern void Flash_segmentErase (unsigned int baseAddress,
00030     unsigned char *Flash_ptr);
00031 
00032 extern void Flash_bankErase (unsigned int baseAddress, 
00033                              unsigned char *Flash_ptr);
00034 
00035 extern unsigned short Flash_eraseCheck (unsigned int baseAddress,
00036     unsigned char *Flash_ptr,
00037     unsigned int numberOfBytes
00038     );
00039 extern void Flash_write8 (unsigned int baseAddress,
00040     unsigned char *Data_ptr,
00041     unsigned char *Flash_ptr,
00042     unsigned int numberOfBytes
00043     );
00044 extern void Flash_write16 (unsigned int baseAddress,
00045     unsigned int *Data_ptr,
00046     unsigned int *Flash_ptr,
00047     unsigned int numberOfBytes
00048     );
00049 extern void Flash_write32 (unsigned int baseAddress,
00050     unsigned long *Data_ptr,
00051     unsigned long *Flash_ptr,
00052     unsigned int numberOfBytes
00053     );
00054 extern void Flash_memoryFill32 (unsigned int baseAddress,
00055     unsigned long value,
00056     unsigned long *Flash_ptr,
00057     unsigned int count
00058     );
00059 extern unsigned char Flash_status (unsigned int baseAddress,
00060     unsigned char mask
00061     );
00062 #endif

Copyright 2012, Texas Instruments Incorporated