MSP430 DLL API Documentation  3.12.0.004
MSP430_FET.h
Go to the documentation of this file.
1 /*
2  * MSP430_FET.h
3  *
4  * API for maintaing MSP-FET430UIF (TI USB FET) hardware and firmware.
5  *
6  * Copyright (c) 2004 - 2016 Texas Instruments Incorporated - http://www.ti.com/
7  *
8  * All rights reserved not granted herein.
9  * Limited License.
10  *
11  * Texas Instruments Incorporated grants a world-wide, royalty-free,
12  * non-exclusive license under copyrights and patents it now or hereafter
13  * owns or controls to make, have made, use, import, offer to sell and sell ("Utilize")
14  * this software subject to the terms herein. With respect to the foregoing patent
15  * license, such license is granted solely to the extent that any such patent is necessary
16  * to Utilize the software alone. The patent license shall not apply to any combinations which
17  * include this software, other than combinations with devices manufactured by or for TI (“TI Devices”).
18  * No hardware patent is licensed hereunder.
19  *
20  * Redistributions must preserve existing copyright notices and reproduce this license (including the
21  * above copyright notice and the disclaimer and (if applicable) source code license limitations below)
22  * in the documentation and/or other materials provided with the distribution
23  *
24  * Redistribution and use in binary form, without modification, are permitted provided that the following
25  * conditions are met:
26  *
27  * * No reverse engineering, decompilation, or disassembly of this software is permitted with respect to any
28  * software provided in binary form.
29  * * any redistribution and use are licensed by TI for use only with TI Devices.
30  * * Nothing shall obligate TI to provide you with source code for the software licensed and provided to you in object code.
31  *
32  * If software source code is provided to you, modification and redistribution of the source code are permitted
33  * provided that the following conditions are met:
34  *
35  * * any redistribution and use of the source code, including any resulting derivative works, are licensed by
36  * TI for use only with TI Devices.
37  * * any redistribution and use of any object code compiled from the source code and any resulting derivative
38  * works, are licensed by TI for use only with TI Devices.
39  *
40  * Neither the name of Texas Instruments Incorporated nor the names of its suppliers may be used to endorse or
41  * promote products derived from this software without specific prior written permission.
42  *
43  * DISCLAIMER.
44  *
45  * THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
46  * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
47  * IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
48  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
49  * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
50  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
51  * POSSIBILITY OF SUCH DAMAGE.
52  */
53 
78 #ifndef MSP430_FET_H
79 #define MSP430_FET_H
80 
81 #include "MSP430.h"
82 
83 #if defined(__cplusplus)
84 extern "C" {
85 #endif
86 
87 #ifndef MSP430_FET_TYPES
88 #define MSP430_FET_TYPES
89 
99 typedef void (* DLL430_FET_NOTIFY_FUNC) (uint32_t MsgId,
100  uint32_t wParam,
101  uint32_t lParam,
102  int32_t clientHandle);
103 
106  BL_INIT = 0,
111  BL_EXIT = 5,
116 
117 #endif /* MSP430_FET_TYPES */
118 
136 DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_SelfTest(int32_t count, uint8_t* buffer);
137 
154 DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_SetSignals(int32_t SigMask, int32_t SigState);
155 
170 DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_Reset(void);
171 
191 DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_I2C(int32_t address, uint8_t* buffer, int32_t count, int32_t rw);
192 
193 #define MSP430_FET_Read_I2C(ADDRESS, BUFFER, COUNT) MSP430_FET_I2C(ADDRESS, BUFFER, COUNT, READ)
194 #define MSP430_FET_Write_I2C(ADDRESS, BUFFER, COUNT) MSP430_FET_I2C(ADDRESS, BUFFER, COUNT, WRITE)
195 
210 DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_EnterBootloader(void);
211 
212 
227 DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_ExitBootloader(void);
228 
246 DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_GetFwVersion(int32_t* version);
247 
281 DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_GetHwVersion(uint8_t** version, int32_t* count);
282 
323 DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_FwUpdate(const char* lpszFileName,
324  DLL430_FET_NOTIFY_FUNC callback,
325  int32_t clientHandle);
326 
327 #if defined(__cplusplus)
328 }
329 #endif
330 
331 #endif // MSP430_FET_H
void(* DLL430_FET_NOTIFY_FUNC)(uint32_t MsgId, uint32_t wParam, uint32_t lParam, int32_t clientHandle)
Type definition for a callback function which could handle notify messages sent by the DLL to the cal...
Definition: MSP430_FET.h:99
DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_Reset(void)
Perform a reset of the USB JTAG adaptor's firmware.
This file contains the Application Programming Interface (API) to access an MSP430 microcontroller vi...
Definition: MSP430_FET.h:106
DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_GetHwVersion(uint8_t **version, int32_t *count)
Returns the version number of the MSP430-FET430UIF USB FET hardware.
enum UPDATE_STATUS_MESSAGES UPDATE_STATUS_MESSAGES_t
Status messages during USB FET firmware update.
Definition: MSP430_FET.h:114
Definition: MSP430_FET.h:108
DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_FwUpdate(const char *lpszFileName, DLL430_FET_NOTIFY_FUNC callback, int32_t clientHandle)
Synchronizes the firmware version of the MSP-FET430UIF (TI USB FET) with the version of the Dll...
DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_SetSignals(int32_t SigMask, int32_t SigState)
This function is only meant for testing.
Definition: MSP430_FET.h:112
Definition: MSP430_FET.h:111
DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_EnterBootloader(void)
Enter the bootloader.
DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_ExitBootloader(void)
Exit the bootloader.
DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_I2C(int32_t address, uint8_t *buffer, int32_t count, int32_t rw)
Read and write to EEPROM via I2C.
Definition: MSP430_FET.h:109
UPDATE_STATUS_MESSAGES
Status messages during USB FET firmware update.
Definition: MSP430_FET.h:105
int32_t STATUS_T
this is the definition for the DLL functions return value
Definition: MSP430.h:180
Definition: MSP430_FET.h:107
DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_GetFwVersion(int32_t *version)
Returns the version number of the MSP430-FET430UIF USB FET firmware.
Definition: MSP430_FET.h:113
DLL430_SYMBOL STATUS_T WINAPI MSP430_FET_SelfTest(int32_t count, uint8_t *buffer)
Call the hardware self test function of the USB JTAG adaptor.
Definition: MSP430_FET.h:110