1 /*
2  * @brief LPCXPresso LPC1549 board file
3  *
4  * @note
5  * Copyright(C) NXP Semiconductors, 2013
6  * All rights reserved.
7  *
8  * @par
9  * Software that is described herein is for illustrative purposes only
10  * which provides customers with programming information regarding the
11  * LPC products.  This software is supplied "AS IS" without any warranties of
12  * any kind, and NXP Semiconductors and its licensor disclaim any and
13  * all warranties, express or implied, including all implied warranties of
14  * merchantability, fitness for a particular purpose and non-infringement of
15  * intellectual property rights.  NXP Semiconductors assumes no responsibility
16  * or liability for the use of the software, conveys no license or rights under any
17  * patent, copyright, mask work right, or any other intellectual property rights in
18  * or to any products. NXP Semiconductors reserves the right to make changes
19  * in the software without notification. NXP Semiconductors also makes no
20  * representation or warranty that such application will be suitable for the
21  * specified use without further testing or modification.
22  *
23  * @par
24  * Permission to use, copy, modify, and distribute this software and its
25  * documentation is hereby granted, under NXP Semiconductors' and its
26  * licensor's relevant copyrights in the software, without fee, provided that it
27  * is used in conjunction with NXP Semiconductors microcontrollers.  This
28  * copyright, permission, and disclaimer notice must appear in all copies of
29  * this code.
30  */
31 
32 #ifndef __BOARD_H_
33 #define __BOARD_H_
34 
35 #include "chip.h"
36 /* board_api.h is included at the bottom of this file after DEBUG setup */
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 /** @defgroup BOARD_NXP_LPCXPRESSO_1549 LPCXPresso LPC1549 board support software API functions
43  * @ingroup LPCOPEN_15XX_NXP_LPCXPRESSO_1549
44  * The board support software API functions provide some simple abstracted
45  * functions used across multiple LPCOpen board examples. See @ref BOARD_COMMON_API
46  * for the functions defined by this board support layer.<br>
47  * @{
48  */
49 
50 /** @defgroup BOARD_NXP_LPCXPRESSO_1549_OPTIONS BOARD: LPCXPresso LPC1549 board build options
51  * This board has options that configure its operation at build-time.<br>
52  * @{
53  */
54 
55 /** Define DEBUG_ENABLE to enable IO via the DEBUGSTR, DEBUGOUT, and
56     DEBUGIN macros. If not defined, DEBUG* functions will be optimized
57     out of the code at build time.
58  */
59 #define DEBUG_ENABLE
60 
61 /** Define DEBUG_SEMIHOSTING along with DEBUG_ENABLE to enable IO support
62     via semihosting. You may need to use a C library that supports
63     semihosting with this option.
64  */
65 // #define DEBUG_SEMIHOSTING
66 
67 /** Board UART used for debug output and input using the DEBUG* macros. This
68     is also the port used for Board_UARTPutChar, Board_UARTGetChar, and
69     Board_UARTPutSTR functions.
70  */
71 #define DEBUG_UART LPC_USART0
72 
73 /**
74  * @}
75  */
76 
77 /* Board name */
78 #define BOARD_NXP_LPCXPRESSO_1549
79 
80 /**
81  * Joystick defines
82  */
83 #define JOY_UP              0x01
84 #define JOY_DOWN            0x02
85 #define JOY_LEFT            0x04
86 #define JOY_RIGHT           0x08
87 #define JOY_PRESS           0x10
88 
89 /**
90  * @brief	Initialize Joystick
91  * @return	Nothing
92  */
93 void Board_Joystick_Init(void);
94 
95 /**
96  * @brief	Get Joystick status
97  * @return	status of Joystick
98  */
99 uint8_t Joystick_GetStatus(void);
100 
101 /**
102  * @}
103  */
104 
105 #include "board_api.h"
106 
107 #ifdef __cplusplus
108 }
109 #endif
110 
111 #endif /* __BOARD_H_ */
112