2020-2021 Sunseeker Telemetry and Lighting System
hw_memmap.h
Go to the documentation of this file.
1 #ifndef __HW_MEMMAP__
2 #define __HW_MEMMAP__
3 
4 #define __DRIVERLIB_MSP430F5XX_6XX_FAMILY__
5 //*****************************************************************************
6 //
7 // Include device specific header file
8 //
9 //*****************************************************************************
10 #include <msp430.h>
11 
12 #include "msp430f5xx_6xxgeneric.h"
13 
14 #include "stdint.h"
15 #include "stdbool.h"
16 
17 //*****************************************************************************
18 //
19 // SUCCESS and FAILURE for API return value
20 //
21 //*****************************************************************************
22 #define STATUS_SUCCESS 0x01
23 #define STATUS_FAIL 0x00
24 
25 //*****************************************************************************
26 //
27 // Macro for enabling assert statements for debugging
28 //
29 //*****************************************************************************
30 #define NDEBUG
31 
32 //*****************************************************************************
33 //
34 // Macros for hardware access
35 //
36 //*****************************************************************************
37 #define HWREG32(x) \
38  (*((volatile uint32_t *)((uint16_t)x)))
39 #define HWREG16(x) \
40  (*((volatile uint16_t *)((uint16_t)x)))
41 #define HWREG8(x) \
42  (*((volatile uint8_t *)((uint16_t)x)))
43 
44 
45 #endif // #ifndef __HW_MEMMAP__