Loading...
Searching...
No Matches
msp430_regs_common.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015 Freie Universität Berlin
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
23#ifndef MSP430_REGS_COMMON_H
24#define MSP430_REGS_COMMON_H
25
26#include <stdint.h>
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
35#define REG8 volatile uint8_t
36
40#define REG16 volatile uint16_t
41
50#define TXSSEL_TXCLK TASSEL_0
51#define TXSSEL_ACLK TASSEL_1
52#define TXSSEL_SMCLK TASSEL_2
53#define TXSSEL_INCLK TASSEL_3
63#define TXID_DIV_1 ID_0
64#define TXID_DIV_2 ID_1
65#define TXID_DIV_4 ID_2
66#define TXID_DIV_8 ID_3
67#define TXID_DIV_Msk ID_3
68#define TXID_DIV_Pos 6U
69#define TXID_DIV_MAX 3
79#define TXMC_STOP MC_0
80#define TXMC_UP MC_1
81#define TXMC_CONT MC_2
82#define TXMC_UP_DOWN MC_3
83#define TXMC_MASK MC_3
89typedef struct {
94
105
113
120typedef struct {
122 REG16 CCTL[7];
124 REG16 CCR[7];
126
158
163
172
181
188#ifdef __cplusplus
189}
190#endif
191
192#endif /* MSP430_REGS_COMMON_H */
msp430_port_p3_p6_t PORT_5
Register map of GPIO PORT 5.
msp430_timer_t TIMER_A
Register map of the timer A control registers.
msp430_timer_t TIMER_B
Register map of the timer B control registers.
msp430_port_p1_p2_t PORT_2
Register map of GPIO PORT 2.
#define REG16
Shortcut to specify 16-bit wide registers.
msp430_port_p1_p2_t PORT_1
Register map of GPIO PORT 1.
msp430_port_p3_p6_t PORT_6
Register map of GPIO PORT 6.
REG16 TIMER_B_IRQFLAGS
IRQ flags for TIMER_B.
REG16 TIMER_A_IRQFLAGS
IRQ flags for TIMER_A.
#define REG8
Shortcut to specify 8-bit wide registers.
msp430_port_p3_p6_t PORT_4
Register map of GPIO PORT 4.
msp430_port_p3_p6_t PORT_3
Register map of GPIO PORT 3.
GPIO Port 1/2 (with interrupt functionality)
REG8 IFG
interrupt flag
REG8 SEL
alternative function select
REG8 IES
interrupt edge select
msp430_port_t base
common GPIO port registers
REG8 IE
interrupt enable
GPIO Port 3..6 (without interrupt functionality)
REG8 SEL
alternative function select
msp430_port_t base
common GPIO port registers
Common MSP GPIO Port Registers.
REG8 OD
output data
REG8 IN
input data
REG8 DIR
pin direction
Timer peripheral registers.
REG16 R
current counter value
REG16 CTL
timer control