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 
22 #include <stdint.h>
23 
24 #ifdef __cplusplus
25 extern "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
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
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
85 typedef struct {
86  REG8 IN;
87  REG8 OD;
90 
94 typedef struct {
98 
105 typedef struct {
107  REG16 CCTL[7];
109  REG16 CCR[7];
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 R
current counter value
REG16 CTL
timer control