bat.h
Go to the documentation of this file.
00001 #ifndef __MSP430WARE_BAT_H__
00002 #define __MSP430WARE_BAT_H__
00003 
00004 //*****************************************************************************
00005 //
00006 //The following are the defines to include the required modules for this
00007 //peripheral in msp430xgeneric.h file
00008 //
00009 //*****************************************************************************
00010 #define __MSP430_HAS_BATTERY_CHARGER__
00011 #define __MSP430_HAS_BACKUP_RAM__
00012 
00013 //*****************************************************************************
00014 //
00015 //The following are values that can be returned by BAT_unlockBackupSubSystem().
00016 //
00017 //*****************************************************************************
00018 #define BAT_UNLOCKFAILURE (0x0)
00019 #define BAT_UNLOCKSUCCESS (0x1)
00020 
00021 //*****************************************************************************
00022 //
00023 //The following are values that can be passed to BAT_chargerInitAndEnable()
00024 //in the chargerEndVoltage parameter.
00025 //
00026 //*****************************************************************************
00027 #define BAT_CHARGERENDVOLTAGE_VCC (BAKCHV0)
00028 #define BAT_CHARGERENDVOLTAGE2_7V (BAKCHV1)
00029 
00030 //*****************************************************************************
00031 //
00032 //The following are values that can be passed to BAT_chargerInitAndEnable()
00033 //in the chargeCurrent parameter.
00034 //
00035 //*****************************************************************************
00036 #define BAT_CHARGECURRENT_5KOHM  (BAKCHC0)
00037 #define BAT_CHARGECURRENT_10KOHM (BAKCHC1)
00038 #define BAT_CHARGECURRENT_20KOHM (BAKCHC0 + BAKCHC1)
00039 
00040 //*****************************************************************************
00041 //
00042 //The following are values that can be passed to BAT_setBackupRAMData() and
00043 //BAT_getBackupRAMData() in the backupRAMSelect parameter.
00044 //
00045 //*****************************************************************************
00046 #define BAT_RAMSELECT_0 (0x0000)
00047 #define BAT_RAMSELECT_1 (0x0002)
00048 #define BAT_RAMSELECT_2 (0x0004)
00049 #define BAT_RAMSELECT_3 (0x0006)
00050 
00051 //*****************************************************************************
00052 //
00053 //Prototypes for the APIs.
00054 //
00055 //*****************************************************************************
00056 
00057 extern unsigned short BAT_unlockBackupSubSystem (unsigned int baseAddress);
00058 
00059 extern void BAT_enableBackupSupplyToADC (unsigned int baseAddress);
00060 
00061 extern void BAT_disableBackupSupplyToADC (unsigned int baseAddress);
00062 
00063 extern void BAT_manuallySwitchToBackupSupply (unsigned int baseAddress);
00064 
00065 extern void BAT_disable (unsigned int baseAddress);
00066 
00067 extern void BAT_chargerInitAndEnable (unsigned int baseAddress,
00068     unsigned char chargerEndVoltage,
00069     unsigned char chargeCurrent);
00070 
00071 extern void BAT_disableCharger (unsigned int baseAddress);
00072 
00073 extern void BAT_setBackupRAMData (unsigned int baseAddress,
00074     unsigned char backupRAMSelect,
00075     unsigned int data);
00076 
00077 extern unsigned int BAT_getBackupRAMData (unsigned int baseAddress,
00078     unsigned char backupRAMSelect);
00079 
00080 
00081 #endif

Copyright 2012, Texas Instruments Incorporated