MSP430 Driver Library  1.80.00.18
flash.h
Go to the documentation of this file.
1 //*****************************************************************************
2 //
3 // flash.h - Driver for the FLASH Module.
4 //
5 //*****************************************************************************
6 
7 #ifndef __MSP430WARE_FLASH_H__
8 #define __MSP430WARE_FLASH_H__
9 
10 #include "inc/hw_memmap.h"
11 
12 #ifdef __MSP430_HAS_FLASH__
13 
14 //*****************************************************************************
15 //
16 // If building with a C++ compiler, make all of the definitions in this header
17 // have a C binding.
18 //
19 //*****************************************************************************
20 #ifdef __cplusplus
21 extern "C"
22 {
23 #endif
24 
25 //*****************************************************************************
26 //
27 // The following are values that can be passed to the mask parameter for
28 // functions: FLASH_status() as well as returned by the FLASH_status()
29 // function.
30 //
31 //*****************************************************************************
32 #define FLASH_READY_FOR_NEXT_WRITE WAIT_L
33 #define FLASH_ACCESS_VIOLATION_INTERRUPT_FLAG ACCVIFG_L
34 #define FLASH_PASSWORD_WRITTEN_INCORRECTLY KEYV_L
35 #define FLASH_BUSY BUSY_L
36 
37 //*****************************************************************************
38 //
39 // Prototypes for the APIs.
40 //
41 //*****************************************************************************
42 extern void FLASH_segmentErase(uint8_t *flash_ptr);
43 
44 extern void FLASH_bankErase(uint8_t *flash_ptr);
45 
46 extern bool FLASH_eraseCheck(uint8_t *flash_ptr,
47  uint16_t numberOfBytes);
48 
49 extern void FLASH_write8(uint8_t *data_ptr,
50  uint8_t *flash_ptr,
51  uint16_t count);
52 
53 extern void FLASH_write16(uint16_t *data_ptr,
54  uint16_t *flash_ptr,
55  uint16_t count);
56 
57 extern void FLASH_write32(uint32_t *data_ptr,
58  uint32_t *flash_ptr,
59  uint16_t count);
60 
61 extern void FLASH_memoryFill32(uint32_t value,
62  uint32_t *flash_ptr,
63  uint16_t count);
64 
65 extern uint8_t FLASH_status(uint8_t mask);
66 
67 extern void FLASH_lockInfoA(void);
68 
69 extern void FLASH_unlockInfoA(void);
70 
71 //*****************************************************************************
72 //
73 // Mark the end of the C bindings section for C++ compilers.
74 //
75 //*****************************************************************************
76 #ifdef __cplusplus
77 }
78 #endif
79 
80 #endif
81 #endif // __MSP430WARE_FLASH_H__
uint8_t FLASH_status(uint32_t baseAddress, uint8_t mask)
void FLASH_lockInfoA(uint32_t baseAddress)
void FLASH_bankErase(uint32_t baseAddress, uint8_t *flash_ptr)
void FLASH_memoryFill32(uint32_t baseAddress, uint32_t value, uint32_t *flash_ptr, uint16_t count)
void FLASH_write32(uint32_t baseAddress, uint32_t *data_ptr, uint32_t *flash_ptr, uint16_t count)
bool FLASH_eraseCheck(uint32_t baseAddress, uint8_t *flash_ptr, uint16_t numberOfBytes)
void FLASH_unlockInfoA(uint32_t baseAddress)
void FLASH_write16(uint32_t baseAddress, uint16_t *data_ptr, uint16_t *flash_ptr, uint16_t count)
void FLASH_segmentErase(uint32_t baseAddress, uint8_t *flash_ptr)
void FLASH_write8(uint32_t baseAddress, uint8_t *data_ptr, uint8_t *flash_ptr, uint16_t count)

Copyright 2014, Texas Instruments Incorporated