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
102
109typedef struct {
111 REG16 CCTL[7];
113 REG16 CCR[7];
115
116#ifdef __cplusplus
117}
118#endif
119
120#endif /* MSP430_REGS_COMMON_H */
#define REG16
Shortcut to specify 16-bit wide registers.
#define REG8
Shortcut to specify 8-bit wide registers.
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