Main Page | Data Structures | File List | Data Fields | Globals

MSP430_FET.h

Go to the documentation of this file.
00001 /* 00002 * MSP430_FET.h 00003 * 00004 * API for maintaing MSP-FET430UIF (TI USB FET) hardware and firmware. 00005 * 00006 * Copyright (C) 2004 - 2011 Texas Instruments Incorporated - http://www.ti.com/ 00007 * 00008 * 00009 * Redistribution and use in source and binary forms, with or without 00010 * modification, are permitted provided that the following conditions 00011 * are met: 00012 * 00013 * Redistributions of source code must retain the above copyright 00014 * notice, this list of conditions and the following disclaimer. 00015 * 00016 * Redistributions in binary form must reproduce the above copyright 00017 * notice, this list of conditions and the following disclaimer in the 00018 * documentation and/or other materials provided with the 00019 * distribution. 00020 * 00021 * Neither the name of Texas Instruments Incorporated nor the names of 00022 * its contributors may be used to endorse or promote products derived 00023 * from this software without specific prior written permission. 00024 * 00025 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00026 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00027 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00028 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 00029 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00030 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00031 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00032 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00033 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00034 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00035 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00036 */ 00037 00062 #ifndef MSP430_FET_H 00063 #define MSP430_FET_H 00064 00065 #include "MSP430.h" 00066 00067 #if defined(__cplusplus) 00068 extern "C" { 00069 #endif 00070 00071 #ifndef MSP430_FET_TYPES 00072 #define MSP430_FET_TYPES 00073 00083 typedef void (* DLL430_FET_NOTIFY_FUNC) (UINT MsgId, 00084 ULONG wParam, 00085 ULONG lParam, 00086 LONG clientHandle); 00087 00089 typedef enum UPDATE_STATUS_MESSAGES { 00090 BL_INIT = 0, 00091 BL_ERASE_INT_VECTORS = 1, 00092 BL_ERASE_FIRMWARE = 2, 00093 BL_PROGRAM_FIRMWARE = 3, 00094 BL_DATA_BLOCK_PROGRAMMED = 4, 00095 BL_EXIT = 5, 00096 BL_UPDATE_DONE = 6, 00097 BL_UPDATE_ERROR = 7, 00098 BL_WAIT_FOR_TIMEOUT = 8 00099 } UPDATE_STATUS_MESSAGES_t; 00100 00101 #endif /* MSP430_FET_TYPES */ 00102 00120 DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_SelfTest(LONG count, BYTE* buffer); 00121 00138 DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_SetSignals(LONG SigMask, LONG SigState); 00139 00154 DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_Reset(void); 00155 00175 DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_I2C(LONG address, CHAR* buffer, LONG count, LONG rw); 00176 00177 #define MSP430_FET_Read_I2C(ADDRESS, BUFFER, COUNT) MSP430_FET_I2C(ADDRESS, BUFFER, COUNT, READ) 00178 #define MSP430_FET_Write_I2C(ADDRESS, BUFFER, COUNT) MSP430_FET_I2C(ADDRESS, BUFFER, COUNT, WRITE) 00179 00194 DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_EnterBootloader(void); 00195 00196 00211 DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_ExitBootloader(void); 00212 00230 DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_GetFwVersion(LONG* version); 00231 00265 DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_GetHwVersion(BYTE** version, LONG* count); 00266 00307 DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_FwUpdate(CHAR* lpszFileName, 00308 DLL430_FET_NOTIFY_FUNC callback, 00309 LONG clientHandle); 00310 00311 #if defined(__cplusplus) 00312 } 00313 #endif 00314 00315 #endif // MSP430_FET_H