Hi,

Please find a patch below that fixes the name <-> number mapping of the 
clock selection bits in of the MSP430 USI peripheral in the msp430 libc 
headers.  USISSEL_SMCLK was set to what USISSEL_SCLK should be - and 
USISSEL_SCLK was missing.

Cheers,

Rob Spanton

diff --git a/include/msp430/usi.h b/include/msp430/usi.h
index ce5280d..ad56672 100644
--- a/include/msp430/usi.h
+++ b/include/msp430/usi.h
@@ -101,9 +101,9 @@ sfrw(USISR, USISR_);
 #define USIDIV_DIV64        USIDIV_6    /* USI  Clock Divider: 6 Divide by 64 
*/
 #define USIDIV_DIV128       USIDIV_7    /* USI  Clock Divider: 7 Divide by 128 
*/
 
-#define USISSEL_SMCLK       USISSEL_0   /* USI  Clock Source: 0 SCLK */
+#define USISSEL_SCLK        USISSEL_0   /* USI  Clock Source: 0 SCLK */
 #define USISSEL_ACLK        USISSEL_1   /* USI  Clock Source: 1 ACLK */
-//~ #define USISSEL_2           USISSEL_2   /* USI  Clock Source: 2 SMCLK */
+#define USISSEL_SMCLK       USISSEL_2   /* USI  Clock Source: 2 SMCLK */
 //~ #define USISSEL_3           USISSEL_3   /* USI  Clock Source: 3 SMCLK */
 #define USISSEL_USISWCLK    USISSEL_4   /* USI  Clock Source: 4 USISWCLK bit*/
 #define USISSEL_TACCR0      USISSEL_5   /* USI  Clock Source: 5 TACCR0 */


Reply via email to