Hello,

Could you update CVS / GIT / BZR, thank you

PS : Don't hesitate to correct the document if you found some mistakes
#ifndef __MSP430_HEADERS_CRC16_H
#define __MSP430_HEADERS_CRC16_H

/* crc16.h
 *
 * mspgcc project: MSP430 device headers (MSP430F5XX)
 * CRC module header
 *
 *  2009-09-08 - THLN
 * - created
 * based on Texas Instruments document : "MSP430x5xx Family User's Guide - 
SLAU208 Revised July 2010"
 *
 */

/* Switches:

__MSP430_HAS_REVERSE_FEATURE__  - for MSP A version only.
__MSP430_CRC16_BASE__                                           -       define 
base address of CRC module (default is 0x150).

*/


/* TimerCRC16 base address */
#if !defined(__MSP430_CRC16_BASE__)
#define __MSP430_CRC16_BASE__ 0x150
#endif

#define CRC16DI_            __MSP430_CRC16_BASE__ + 0x0   /* CRC16 Data In 
Register */
sfrw(CRC16DI, CRC16DI_);
#define CRC16DI_L_          __MSP430_CRC16_BASE__ + 0x0   /* CRC16 Data In 
Register Lo */
sfrb(CRC16DI_L, CRC16DI_L_);
#define CRC16DI_H_          __MSP430_CRC16_BASE__ + 0x1   /* CRC16 Data In 
Register Hi */
sfrb(CRC16DI_H, CRC16DI_H_);
#define CRC16INIRES_        __MSP430_CRC16_BASE__ + 0x4   /* CRC16 
Initialization and Result Register */
sfrw(CRC16INIRES, CRC16INIRES_);
#define CRC16INIRES_L_      __MSP430_CRC16_BASE__ + 0x4   /* CRC16 
Initialization and Result Register Lo */
sfrb(CRC16INIRES_L, CRC16INIRES_L_);
#define CRC16INIRES_H_      __MSP430_CRC16_BASE__ + 0x5   /* CRC16 
Initialization and Result Register Hi */
sfrb(CRC16INIRES_H, CRC16INIRES_H_);


#if defined(__MSP430_HAS_REVERSE_FEATURE__)
#warning "The CRC module on the MSP430F543x and MSP430F541x non-A versions does 
not support the bit-wise reverse feature"
#define CRC16DIRB_          __MSP430_CRC16_BASE__ + 0x2   /* CRC16 Data In 
Reverse Byte Register */
sfrw(CRC16DIRB, CRC16DIRB_);
#define CRC16DIRB_L_        __MSP430_CRC16_BASE__ + 0x2   /* CRC16 Data In 
Reverse Byte Register Lo */
sfrb(CRC16DIRB_L, CRC16DIRB_L_);
#define CRC16DIRB_H_        __MSP430_CRC16_BASE__ + 0x3   /* CRC16 Data In 
Reverse Byte Register Hi */
sfrb(CRC16DIRB_H, CRC16DIRB_H_);

#define CRC16RESR_          __MSP430_CRC16_BASE__ + 0x6   /* CRC16 Result 
Reverse Register */
sfrw(CRC16RESR, CRC16RESR_);
#define CRC16RESR_L_        __MSP430_CRC16_BASE__ + 0x6   /* CRC16 Result 
Reverse Register Lo */
sfrb(CRC16RESR_L, CRC16RESR_L_);
#define CRC16RESR_H_        __MSP430_CRC16_BASE__ + 0x7   /* CRC16 Result 
Reverse Register Hi */
sfrb(CRC16RESR_H, CRC16RESR_H_);
#endif /* __MSP430_HAS_REVERSE_FEATURE__ */



#endif /* __MSP430_HEADERS_CRC16_H */

Reply via email to