Loading...
Searching...
No Matches
msp430_regs_common.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2015 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
21
22#include <stdint.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
31#define REG8 volatile uint8_t
32
36#define REG16 volatile uint16_t
37
46#define TXSSEL_TXCLK TASSEL_0
47#define TXSSEL_ACLK TASSEL_1
48#define TXSSEL_SMCLK TASSEL_2
49#define TXSSEL_INCLK TASSEL_3
51
59#define TXID_DIV_1 ID_0
60#define TXID_DIV_2 ID_1
61#define TXID_DIV_4 ID_2
62#define TXID_DIV_8 ID_3
63#define TXID_DIV_Msk ID_3
64#define TXID_DIV_Pos 6U
65#define TXID_DIV_MAX 3
67
75#define TXMC_STOP MC_0
76#define TXMC_UP MC_1
77#define TXMC_CONT MC_2
78#define TXMC_UP_DOWN MC_3
79#define TXMC_MASK MC_3
81
85typedef struct {
90
98
111
112#ifdef __cplusplus
113}
114#endif
115
#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