/** @file f2274.h
*
* @brief Hardware Definitions for msp430f2274
*
* @author Alvaro Prieto
*/

#include "msp430f2112.h"

// Button and LED
#define PB_A 			BIT4 //SW2 - P2.4
#define PB_P 			BIT2 //SW1 - P2.2
#define LED_R 			BIT0 //LEDR - P1.0
#define LED_B 			BIT1 //LEDPOWER - P1.1
#define LED_Y 			BIT3 //LEDBATT - P1.3
#define LED_G 			BIT3 //LEDG - P2.3

// GDO0
#define GDO0_PxOUT        P2OUT
#define GDO0_PxIN         P2IN
#define GDO0_PxDIR        P2DIR
#define GDO0_PxIE         P2IE
#define GDO0_PxIES        P2IES
#define GDO0_PxIFG        P2IFG
#define GDO0_PIN          BIT5		//GDO0 Connected to P2.5


// CSn
#define CSn_PxOUT         P3OUT		//CSn Connected to P3.0
#define CSn_PxDIR         P3DIR
#define CSn_PIN           BIT0

// SPI Pin Definitions
#define SPI_USCIB0_PxSEL  P3SEL
#define SPI_USCIB0_PxSEL2 P3SEL2
#define SPI_USCIB0_PxDIR  P3DIR
#define SPI_USCIB0_PxIN   P3IN
#define SPI_USCIB0_SIMO   BIT1
#define SPI_USCIB0_SOMI   BIT2
#define SPI_USCIB0_UCLK   BIT3

// Make sure we use the correct UART interface
#define UART_INTERFACE_USCIA0

// Make sure we use the correct SPI interface
#define SPI_INTERFACE_USCIB0


