forked from Jia-xinSu/MSP430F149DriverLib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhw_memmap.h
45 lines (36 loc) · 1.43 KB
/
hw_memmap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef __HW_MEMMAP__
#define __HW_MEMMAP__
#define __DRIVERLIB_MSP430F149__
//*****************************************************************************
//
// Include device specific header file
//
//*****************************************************************************
#include "msp430f149.h"
#include "stdint.h"
#include "stdbool.h"
//*****************************************************************************
//
// SUCCESS and FAILURE for API return value
//
//*****************************************************************************
#define STATUS_SUCCESS 0x01
#define STATUS_FAIL 0x00
//*****************************************************************************
//
// Macro for enabling assert statements for debugging
//
//*****************************************************************************
#define NDEBUG
//*****************************************************************************
//
// Macros for hardware access
//
//*****************************************************************************
#define HWREG32(x) \
(*((volatile uint32_t *)((uint16_t)x)))
#define HWREG16(x) \
(*((volatile uint16_t *)((uint16_t)x)))
#define HWREG8(x) \
(*((volatile uint8_t *)((uint16_t)x)))
#endif // #ifndef __HW_MEMMAP__