The friendly Operating System for the Internet of Things
boards/msb-430h/include/periph_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 INRIA
3  * 2015 Freie Universit├Ąt Berlin
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser General
6  * Public License v2.1. See the file LICENSE in the top level directory for more
7  * details.
8  */
9 
21 #ifndef PERIPH_CONF_H
22 #define PERIPH_CONF_H
23 
24 #include "periph_cpu.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
35 #define CLOCK_CORECLOCK (7372800U)
36 
37 #define CLOCK_CMCLK CLOCK_CORECLOCK /* no divider programmed */
38 
44 #define TIMER_NUMOF (1U)
45 #define TIMER_BASE (TIMER_A)
46 #define TIMER_CHAN (3)
47 #define TIMER_ISR_CC0 (TIMERA0_VECTOR)
48 #define TIMER_ISR_CCX (TIMERA1_VECTOR)
49 
55 #define UART_NUMOF (1U)
56 #define UART_0_EN (1U)
57 
58 #define UART_BASE (USART_1)
59 #define UART_IE (SFR->IE2)
60 #define UART_IF (SFR->IFG2)
61 #define UART_IE_RX_BIT (1 << 4)
62 #define UART_IE_TX_BIT (1 << 5)
63 #define UART_ME (SFR->ME2)
64 #define UART_ME_BITS (0x30)
65 #define UART_PORT (PORT_3)
66 #define UART_RX_PIN (1 << 6)
67 #define UART_TX_PIN (1 << 7)
68 #define UART_RX_ISR (USART1RX_VECTOR)
69 #define UART_TX_ISR (USART1TX_VECTOR)
70 
76 #define SPI_NUMOF (1U)
77 
78 /* SPI configuration */
79 #define SPI_BASE (USART_0)
80 #define SPI_IE (SFR->IE1)
81 #define SPI_IF (SFR->IFG1)
82 #define SPI_IE_RX_BIT (1 << 6)
83 #define SPI_IE_TX_BIT (1 << 7)
84 #define SPI_ME (SFR->ME1)
85 #define SPI_ME_BIT (1 << 6)
86 #define SPI_PIN_MISO GPIO_PIN(P3,2)
87 #define SPI_PIN_MOSI GPIO_PIN(P3,1)
88 #define SPI_PIN_CLK GPIO_PIN(P3,3)
89 
91 #ifdef __cplusplus
92 }
93 #endif
94 
95 #endif /* PERIPH_CONF_H */