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
9#pragma once
10
24
25#include <stdint.h>
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
34#define REG8 volatile uint8_t
35
39#define REG16 volatile uint16_t
40
49#define TXSSEL_TXCLK TASSEL_0
50#define TXSSEL_ACLK TASSEL_1
51#define TXSSEL_SMCLK TASSEL_2
52#define TXSSEL_INCLK TASSEL_3
54
62#define TXID_DIV_1 ID_0
63#define TXID_DIV_2 ID_1
64#define TXID_DIV_4 ID_2
65#define TXID_DIV_8 ID_3
66#define TXID_DIV_Msk ID_3
67#define TXID_DIV_Pos 6U
68#define TXID_DIV_MAX 3
70
78#define TXMC_STOP MC_0
79#define TXMC_UP MC_1
80#define TXMC_CONT MC_2
81#define TXMC_UP_DOWN MC_3
82#define TXMC_MASK MC_3
84
88typedef struct {
93
101
114
115#ifdef __cplusplus
116}
117#endif
118
#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 CCTL[7]
capture compare channel control
REG16 CCR[7]
capture compare channel values
REG16 R
current counter value
REG16 CTL
timer control