CVS: msp430-libc/include/msp430 basic_clock.h,1.5,1.6 compa.h,1.5,1.6 flash.h,1.4,1.5 gpio.h,1.3,1.4 iostructures.h,1.7,1.8 svs.h,1.5,1.6 timera.h,1.9,1.10 timerb.h,1.8,1.9 usart.h,1.7,1.8
Steve Underwood <[email protected]>
| Newsgroups | gmane.comp.hardware.texas-instruments.msp430.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/mspgcc/msp430-libc/include/msp430
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29377/msp430-libc/include/msp430
Modified Files:
basic_clock.h compa.h flash.h gpio.h iostructures.h svs.h
timera.h timerb.h usart.h
Log Message:
Reworked the headers to use module tags, as the updated headers from TI now do.
Index: basic_clock.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430/basic_clock.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- basic_clock.h 11 Mar 2005 15:49:50 -0000 1.5
+++ basic_clock.h 17 Aug 2005 14:28:46 -0000 1.6
@@ -13,7 +13,7 @@
*/
/* Switches:
-__msp430_have_basic_clock_plus
+__MSP430_HAS_BC2__
*/
#define DCOCTL_ 0x0056 /* DCO Clock Frequency Control */
@@ -22,7 +22,7 @@
sfrb(BCSCTL1,BCSCTL1_);
#define BCSCTL2_ 0x0058 /* Basic Clock System Control 2 */
sfrb(BCSCTL2,BCSCTL2_);
-#if defined(__msp430_have_basic_clock_plus)
+#if defined(__MSP430_HAS_BC2__)
#define BCSCTL3_ 0x0053 /* Basic Clock System Control 3 */
sfrb(BCSCTL3, BCSCTL3_);
#endif
@@ -50,7 +50,7 @@
#define DIVA_2 (2<<4) /* ACLK Divider 2: /4 */
#define DIVA_3 (3<<4) /* ACLK Divider 3: /8 */
-#if !defined(__msp430_have_basic_clock_plus)
+#if !defined(__MSP430_HAS_BC2__)
#define DCOR 0x01 /* Enable External Resistor : 1 */
#endif
#define DIVS0 0x02 /* SMCLK Divider 0 */
@@ -76,7 +76,7 @@
#define SELM_2 (2<<6) /* MCLK Source Select 2: XT2CLK/LFXTCLK */
#define SELM_3 (3<<6) /* MCLK Source Select 3: LFXTCLK */
-#if defined(__msp430_have_basic_clock_plus)
+#if defined(__MSP430_HAS_BC2__)
#define LFXT1OF 0x01 /* Low/high Frequency Oscillator Fault Flag */
#define XT2OF 0x02 /* High frequency oscillator 2 fault flag */
#define XCAP0 0x04 /* XIN/XOUT Cap 0 */
Index: compa.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430/compa.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- compa.h 12 Mar 2005 05:10:51 -0000 1.5
+++ compa.h 17 Aug 2005 14:28:46 -0000 1.6
@@ -13,7 +13,7 @@
*/
/* Switches:
-__msp430_have_compa_extended mux
+__MSP430_HAS_CAPLUS__
*/
#define CACTL1_ 0x0059 /* Comparator A Control 1 */
@@ -41,7 +41,7 @@
#define CAF 0x02 /* Comp. A Enable Output Filter */
#define P2CA0 0x04 /* Comp. A Connect External Signal to CA0 : 1 */
#define P2CA1 0x08 /* Comp. A Connect External Signal to CA1 : 1 */
-#if defined(__msp430_have_compa_extended_mux)
+#if defined(__MSP430_HAS_CAPLUS__)
#define P2CA2 0x10 /* Comp. A -Terminal Multiplexer */
#define P2CA3 0x20 /* Comp. A -Terminal Multiplexer */
#define P2CA4 0x40 /* Comp. A +Terminal Multiplexer */
Index: flash.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430/flash.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -d -r1.4 -r1.5
--- flash.h 11 Mar 2005 15:49:50 -0000 1.4
+++ flash.h 17 Aug 2005 14:28:46 -0000 1.5
@@ -13,7 +13,7 @@
*/
/* Switches:
-__msp430_have_flash_extra_flags
+__MSP430_HAS_FLASH2__
*/
#define FCTL1_ 0x0128 /* FLASH Control 1 */
@@ -29,7 +29,7 @@
#define ERASE 0x0002 /* Enable bit for flash segment erase */
#define MERAS 0x0004 /* Enable bit for flash mass erase */
-#if defined(__msp430_have_flash_extra_flags)
+#if defined(__MSP430_HAS_FLASH2__)
#define EEI 0x0008 /* Enable Erase Interrupts */
#define EEIEX 0x0010 /* Enable Emergency Interrupt Exit */
#endif
@@ -57,7 +57,7 @@
#define WAIT 0x0008 /* Wait flag for segment write */
#define LOCK 0x0010 /* Lock bit: 1 - Flash is locked (read only) */
#define EMEX 0x0020 /* Flash Emergency Exit */
-#if defined(__msp430_have_flash_extra_flags)
+#if defined(__MSP430_HAS_FLASH2__)
#define LOCKA 0x0040 /* Segment A Lock bit: read = 1 - Segment is locked (read only) */
#define FAIL 0x0080 /* Last Program or Erase failed */
#endif
Index: gpio.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430/gpio.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- gpio.h 10 Aug 2005 12:59:27 -0000 1.3
+++ gpio.h 17 Aug 2005 14:28:46 -0000 1.4
@@ -16,27 +16,26 @@
/* Switches:
-__msp430_have_port0 - if device has port 0
-__msp430_have_port1 - if device has port 1
-__msp430_have_port2 - if device has port 2
-__msp430_have_port3 - if device has port 3
-__msp430_have_port4 - if device has port 4
-__msp430_have_port5 - if device has port 5
-__msp430_have_port6 - if device has port 6
+__MSP430_HAS_PORT0__ - if device has port 0
+__MSP430_HAS_PORT1__ - if device has port 1
+__MSP430_HAS_PORT1_R__ - if device has port 1 with pull-downs
+__MSP430_HAS_PORT2__ - if device has port 2
+__MSP430_HAS_PORT2_R__ - if device has port 2 with pull-downs
+__MSP430_HAS_PORT3__ - if device has port 3
+__MSP430_HAS_PORT3_R__ - if device has port 3 with pull-downs
+__MSP430_HAS_PORT4__ - if device has port 4
+__MSP430_HAS_PORT4_R__ - if device has port 4 with pull-downs
+__MSP430_HAS_PORT5__ - if device has port 5
+__MSP430_HAS_PORT5_R__ - if device has port 5 with pull-downs
+__MSP430_HAS_PORT6__ - if device has port 6
+__MSP430_HAS_PORT6_R__ - if device has port 6 with pull-downs
Note: these only make sense if the port itself is present. Also note that
the port resistor enable registers for ports 3-6 overlap with port 0 registers,
so any device that has these resistors will not have port 0.
-
-__msp430_have_port1_resistors - if port1 has pull-up/pull-down resistors
-__msp430_have_port2_resistors - if port2 has pull-up/pull-down resistors
-__msp430_have_port3_resistors - if port3 has pull-up/pull-down resistors
-__msp430_have_port4_resistors - if port4 has pull-up/pull-down resistors
-__msp430_have_port5_resistors - if port5 has pull-up/pull-down resistors
-__msp430_have_port6_resistors - if port6 has pull-up/pull-down resistors
*/
-#if defined(__msp430_have_port0)
+#if defined(__MSP430_HAS_PORT0__)
#define P0IN_ 0x0010 /* Port 0 Input */
sfrb(P0IN,P0IN_);
#define P0IN_0 0x01
@@ -106,7 +105,7 @@
#define P0IE_7 0x80
#endif
-#if defined(__msp430_have_port1)
+#if defined(__MSP430_HAS_PORT1__) || defined(__MSP430_HAS_PORT1_R__)
#define P1IN_ 0x0020 /* Port 1 Input */
sfrb (P1IN,P1IN_);
#define P1OUT_ 0x0021 /* Port 1 Output */
@@ -121,13 +120,13 @@
sfrb (P1IE,P1IE_);
#define P1SEL_ 0x0026 /* Port 1 Selection */
sfrb (P1SEL,P1SEL_);
-#if defined(__msp430_have_port1_resistors)
+#if defined(__MSP430_HAS_PORT1_R__)
#define P1REN_ 0x0027 /* Port 1 Resistor enable */
sfrb(P1REN,P1REN_);
#endif
#endif
-#if defined(__msp430_have_port2)
+#if defined(__MSP430_HAS_PORT2__) || defined(__MSP430_HAS_PORT2_R__)
#define P2IN_ 0x0028 /* Port 2 Input */
sfrb (P2IN,P2IN_);
#define P2OUT_ 0x0029 /* Port 2 Output */
@@ -142,13 +141,13 @@
sfrb (P2IE,P2IE_);
#define P2SEL_ 0x002E /* Port 2 Selection */
sfrb (P2SEL,P2SEL_);
-#if defined(__msp430_have_port2_resistors)
+#if defined(__MSP430_HAS_PORT2_R__)
#define P2REN_ 0x002F /* Port 2 Resistor enable */
sfrb(P2REN,P2REN_);
#endif
#endif
-#if defiend(__msp430_have_port3)
+#if defiend(__MSP430_HAS_PORT3__) || defined(__MSP430_HAS_PORT3_R__)
#define P3IN_ 0x0018 /* Port 3 Input */
sfrb ( P3IN,P3IN_);
#define P3OUT_ 0x0019 /* Port 3 Output */
@@ -157,13 +156,13 @@
sfrb ( P3DIR,P3DIR_);
#define P3SEL_ 0x001B /* Port 3 Selection */
sfrb ( P3SEL,P3SEL_);
-#if defined(__msp430_have_port3_resistors)
+#if defined(__MSP430_HAS_PORT3_R__)
#define P3REN_ 0x0010 /* Port 3 Resistor enable */
sfrb(P3REN,P3REN_);
#endif
#endif
-#if defined(__msp430_have_port4)
+#if defined(__MSP430_HAS_PORT4__) || defined(__MSP430_HAS_PORT4_R__)
#define P4IN_ 0x001C /* Port 4 Input */
sfrb(P4IN,P4IN_);
#define P4OUT_ 0x001D /* Port 4 Output */
@@ -172,13 +171,13 @@
sfrb(P4DIR,P4DIR_);
#define P4SEL_ 0x001F /* Port 4 Selection */
sfrb(P4SEL,P4SEL_);
-#if defined(__msp430_have_port4_resistors)
+#if defined(__MSP430_HAS_PORT4_R__)
#define P4REN_ 0x0011 /* Port 4 Resistor enable */
sfrb(P4REN,P4REN_);
#endif
#endif
-#if defined(__msp430_have_port5)
+#if defined(__MSP430_HAS_PORT5__) || defined(__MSP430_HAS_PORT5_R__)
#define P5IN_ 0x0030 /* Port 5 Input */
sfrb(P5IN,P5IN_);
#define P5OUT_ 0x0031 /* Port 5 Output */
@@ -187,13 +186,13 @@
sfrb(P5DIR,P5DIR_);
#define P5SEL_ 0x0033 /* Port 5 Selection */
sfrb(P5SEL,P5SEL_);
-#if defined(__msp430_have_port5_resistors)
+#if defined(__MSP430_HAS_PORT5_R__)
#define P5REN_ 0x0012 /* Port 5 Resistor enable */
sfrb(P5REN,P5REN_);
#endif
#endif
-#if defined(__msp430_have_port6)
+#if defined(__MSP430_HAS_PORT6__) || defined(__MSP430_HAS_PORT6_R__)
#define P6IN_ 0x0034 /* Port 6 Input */
sfrb(P6IN,P6IN_);
#define P6OUT_ 0x0035 /* Port 6 Output */
@@ -202,7 +201,7 @@
sfrb(P6DIR,P6DIR_);
#define P6SEL_ 0x0037 /* Port 6 Selection */
sfrb(P6SEL,P6SEL_);
-#if defined(__msp430_have_port6_resistors)
+#if defined(__MSP430_HAS_PORT6_R__)
#define P6REN_ 0x0013 /* Port 6 Resistor enable */
sfrb(P6REN,P6REN_);
#endif
Index: iostructures.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430/iostructures.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -d -r1.7 -r1.8
--- iostructures.h 10 Mar 2004 12:26:27 -0000 1.7
+++ iostructures.h 17 Aug 2005 14:28:46 -0000 1.8
@@ -88,7 +88,7 @@
#endif //__cplusplus
/****************************************************************/
-#ifdef __msp430_have_port0
+#if defined(__MSP430_HAS_PORT0__)
struct port0_t {
ioregister_t in; /* Input */
ioregister_t out; /* Output */
@@ -102,7 +102,7 @@
#endif
/****************************************************************/
-#if defined(__msp430_have_port1) || defined(__msp430_have_port2)
+#if defined(__MSP430_HAS_PORT1__) || defined(__MSP430_HAS_PORT2__)
struct port_full_t {
ioregister_t in; /* Input */
ioregister_t out; /* Output */
@@ -114,8 +114,8 @@
};
#endif
-#if defined(__msp430_have_port3) || defined(__msp430_have_port4) \
- || defined(__msp430_have_port5) || defined(__msp430_have_port6)
+#if defined(__MSP430_HAS_PORT3__) || defined(__MSP430_HAS_PORT4__) \
+ || defined(__MSP430_HAS_PORT5__) || defined(__MSP430_HAS_PORT6__)
struct port_simple_t {
ioregister_t in; /* Input */
ioregister_t out; /* Output */
@@ -125,27 +125,27 @@
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifdef __msp430_have_port1
+#if defined(__MSP430_HAS_PORT1__) || defined(__MSP430_HAS_PORT1_R__)
__MSP430_EXTERN__ struct port_full_t port1 asm("0x0020");
#endif
-#ifdef __msp430_have_port2
+#if defined(__MSP430_HAS_PORT2__) || defined(__MSP430_HAS_PORT2_R__)
__MSP430_EXTERN__ struct port_full_t port2 asm("0x0028");
#endif
-#ifdef __msp430_have_port3
+#if defined(__MSP430_HAS_PORT3__) || defined(__MSP430_HAS_PORT3_R__)
__MSP430_EXTERN__ struct port_simple_t port3 asm("0x0018");
#endif
-#ifdef __msp430_have_port4
+#if defined(__MSP430_HAS_PORT4__) || defined(__MSP430_HAS_PORT4_R__)
__MSP430_EXTERN__ struct port_simple_t port4 asm("0x001c");
#endif
-#ifdef __msp430_have_port5
+#if defined(__MSP430_HAS_PORT5__) || defined(__MSP430_HAS_PORT5_R__)
__MSP430_EXTERN__ struct port_simple_t port5 asm("0x0030");
#endif
-#ifdef __msp430_have_port6
+#if defined(__MSP430_HAS_PORT6__) || defined(__MSP430_HAS_PORT6_R__)
__MSP430_EXTERN__ struct port_simple_t port6 asm("0x0034");
#endif
Index: svs.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430/svs.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- svs.h 27 Feb 2004 14:48:18 -0000 1.5
+++ svs.h 17 Aug 2005 14:28:46 -0000 1.6
@@ -12,10 +12,10 @@
* $Id$
*/
-/* Switches: __msp430_have_svs_at_0x55
- __msp430_have_non_variable_svs_threshold */
+/* Switches: __msp430_has_svs_at_0x55
+ __msp430_has_non_variable_svs_threshold */
-#if defined(__msp430_have_svs_at_0x55)
+#if defined(__msp430_has_svs_at_0x55)
#define SVSCTL_ 0x0055 /* SVS Control */
#else
#define SVSCTL_ 0x0056 /* SVS Control */
@@ -36,7 +36,7 @@
#define VLD2 (4<<4)
#define VLD3 (8<<4)
-#if !defined(__msp430_have_non_variable_svs_threshold)
+#if !defined(__msp430_has_non_variable_svs_threshold)
#define VLD_OFF (0<<4)
#define VLD_1 (1<<4)
#define VLD_2 (2<<4)
Index: timera.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430/timera.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -w -d -r1.9 -r1.10
--- timera.h 21 Oct 2004 19:41:00 -0000 1.9
+++ timera.h 17 Aug 2005 14:28:46 -0000 1.10
@@ -14,7 +14,7 @@
/* Switches:
-__msp430_have_timer1_a5 - if the device has a timer1 A, as well as timer0 A
+__MSP430_HAS_T1A5__ - if the device has a timer1 A, as well as timer0 A
*/
@@ -71,7 +71,7 @@
#define CCR1_ TA0CCR1_
#define CCR2_ TA0CCR2_
-#if defined(__msp430_have_timer1_a5)
+#if defined(__MSP430_HAS_T1A5__)
#define TA1IV_ 0x011E /* Timer A 1 Interrupt Vector Word */
sfrw (TA1IV, TA1IV_);
#define TA1CTL_ 0x0180 /* Timer A 1 Control */
@@ -147,7 +147,7 @@
struct timera_t timera asm("0x0160");
#endif //__cplusplus
-#if defined(__msp430_have_timer1_a5)
+#if defined(__MSP430_HAS_T1A5__)
/* The timer A1 declaration itself */
struct timera1_t {
tactl_t ctl;
Index: timerb.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430/timerb.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -d -r1.8 -r1.9
--- timerb.h 28 Jan 2004 22:25:30 -0000 1.8
+++ timerb.h 17 Aug 2005 14:28:46 -0000 1.9
@@ -14,7 +14,7 @@
/* Switches:
-__msp430_have_timerb7 - if timer B has 7 capture/compare registers (default is 3)
+__MSP430_HAS_TB7__ - if timer B has 7 capture/compare registers (default is 3)
*/
@@ -37,7 +37,7 @@
#define TBCCR2_ 0x0196 /* Timer B Capture/Compare 2 */
sfrw(TBCCR2,TBCCR2_);
-#if defined(__msp430_have_timerb7)
+#if defined(__MSP430_HAS_TB7__)
#define TBCCTL3_ 0x0188 /* Timer B Capture/Compare Control 3 */
sfrw(TBCCTL3,TBCCTL3_);
@@ -95,7 +95,7 @@
tbcctl_t cctl0;
tbcctl_t cctl1;
tbcctl_t cctl2;
-#if defined(__msp430_have_timerb7)
+#if defined(__MSP430_HAS_TB7__)
tbcctl_t cctl3;
tbcctl_t cctl4;
tbcctl_t cctl5;
@@ -107,7 +107,7 @@
volatile unsigned tbccr0;
volatile unsigned tbccr1;
volatile unsigned tbccr2;
-#if defined(__msp430_have_timerb7)
+#if defined(__MSP430_HAS_TB7__)
volatile unsigned tbccr3;
volatile unsigned tbccr4;
volatile unsigned tbccr5;
Index: usart.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430/usart.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -d -r1.7 -r1.8
--- usart.h 23 Feb 2005 16:13:14 -0000 1.7
+++ usart.h 17 Aug 2005 14:28:46 -0000 1.8
@@ -14,8 +14,8 @@
/* Switches:
-__msp430_have_usart1 - if device has USART1
-__msp430_have_usart0_i2c - if device has USART0 with I2C feature
+__MSP430_HAS_I2C__ - if device has USART0 with I2C feature
+__MSP430_HAS_UART1__ - if device has USART1
*/
@@ -151,7 +151,7 @@
#define TXBUF_0_ 0x0077 /* UART 0 Transmit Buffer */
sfrb(TXBUF_0, TXBUF_0_);
-#ifdef __msp430_have_usart0_with_i2c
+#if defined(__MSP430_HAS_I2C__)
/* USART 0 Control */
#define RXDMAEN 0x80 /* Receive DMA enable */
@@ -244,9 +244,9 @@
#define I2CIV_ 0x011C /* I2C interrupt vector */
sfrw(I2CIV, I2CIV_);
-#endif /* __msp430_have_usart0_with_i2c */
+#endif /* __MSP430_HAS_I2C__ */
-#ifdef __msp430_have_usart1
+#if defined(__MSP430_HAS_UART1__)
/* -------- USART1 */
@@ -301,6 +301,6 @@
#define TXBUF_1_ 0x007F /* UART 1 Transmit Buffer */
sfrb(TXBUF_1, TXBUF_1_);
-#endif /* __msp430_have_usart1 */
+#endif /* __MSP430_HAS_UART1__ */
#endif
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf