]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/MSP430FR5969_LaunchPad/driverlib/MSP430FR5xx_6xx/eusci_b_spi.h
Complete large memory model MSP430FR5969 demo - including CLI and run-time stats.
[freertos] / FreeRTOS / Demo / MSP430FR5969_LaunchPad / driverlib / MSP430FR5xx_6xx / eusci_b_spi.h
1 /* --COPYRIGHT--,BSD\r
2  * Copyright (c) 2014, Texas Instruments Incorporated\r
3  * All rights reserved.\r
4  *\r
5  * Redistribution and use in source and binary forms, with or without\r
6  * modification, are permitted provided that the following conditions\r
7  * are met:\r
8  *\r
9  * *  Redistributions of source code must retain the above copyright\r
10  *    notice, this list of conditions and the following disclaimer.\r
11  *\r
12  * *  Redistributions in binary form must reproduce the above copyright\r
13  *    notice, this list of conditions and the following disclaimer in the\r
14  *    documentation and/or other materials provided with the distribution.\r
15  *\r
16  * *  Neither the name of Texas Instruments Incorporated nor the names of\r
17  *    its contributors may be used to endorse or promote products derived\r
18  *    from this software without specific prior written permission.\r
19  *\r
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\r
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\r
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\r
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
31  * --/COPYRIGHT--*/\r
32 //*****************************************************************************\r
33 //\r
34 // eusci_b_spi.h - Driver for the EUSCI_B_SPI Module.\r
35 //\r
36 //*****************************************************************************\r
37 \r
38 #ifndef __MSP430WARE_EUSCI_B_SPI_H__\r
39 #define __MSP430WARE_EUSCI_B_SPI_H__\r
40 \r
41 #include "inc/hw_memmap.h"\r
42 \r
43 #ifdef __MSP430_HAS_EUSCI_Bx__\r
44 \r
45 //*****************************************************************************\r
46 //\r
47 // If building with a C++ compiler, make all of the definitions in this header\r
48 // have a C binding.\r
49 //\r
50 //*****************************************************************************\r
51 #ifdef __cplusplus\r
52 extern "C"\r
53 {\r
54 #endif\r
55 \r
56 #include "inc/hw_regaccess.h"\r
57 //*****************************************************************************\r
58 //\r
59 //! \brief Used in the EUSCI_B_SPI_initMaster() function as the param\r
60 //! parameter.\r
61 //\r
62 //*****************************************************************************\r
63 typedef struct EUSCI_B_SPI_initMasterParam\r
64 {\r
65     //! Selects Clock source.\r
66     //! \n Valid values are:\r
67     //! - \b EUSCI_B_SPI_CLOCKSOURCE_ACLK\r
68     //! - \b EUSCI_B_SPI_CLOCKSOURCE_SMCLK\r
69     uint8_t selectClockSource;\r
70     //! Is the frequency of the selected clock source\r
71     uint32_t clockSourceFrequency;\r
72     //! Is the desired clock rate for SPI communication\r
73     uint32_t desiredSpiClock;\r
74     //! Controls the direction of the receive and transmit shift register.\r
75     //! \n Valid values are:\r
76     //! - \b EUSCI_B_SPI_MSB_FIRST\r
77     //! - \b EUSCI_B_SPI_LSB_FIRST [Default]\r
78     uint16_t msbFirst;\r
79     //! Is clock phase select.\r
80     //! \n Valid values are:\r
81     //! - \b EUSCI_B_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT [Default]\r
82     //! - \b EUSCI_B_SPI_PHASE_DATA_CAPTURED_ONFIRST_CHANGED_ON_NEXT\r
83     uint16_t clockPhase;\r
84     //! Is clock polarity select\r
85     //! \n Valid values are:\r
86     //! - \b EUSCI_B_SPI_CLOCKPOLARITY_INACTIVITY_HIGH\r
87     //! - \b EUSCI_B_SPI_CLOCKPOLARITY_INACTIVITY_LOW [Default]\r
88     uint16_t clockPolarity;\r
89     //! Is SPI mode select\r
90     //! \n Valid values are:\r
91     //! - \b EUSCI_B_SPI_3PIN\r
92     //! - \b EUSCI_B_SPI_4PIN_UCxSTE_ACTIVE_HIGH\r
93     //! - \b EUSCI_B_SPI_4PIN_UCxSTE_ACTIVE_LOW\r
94     uint16_t spiMode;\r
95 } EUSCI_B_SPI_initMasterParam;\r
96 \r
97 //*****************************************************************************\r
98 //\r
99 //! \brief Used in the EUSCI_B_SPI_initSlave() function as the param parameter.\r
100 //\r
101 //*****************************************************************************\r
102 typedef struct EUSCI_B_SPI_initSlaveParam\r
103 {\r
104     //! Controls the direction of the receive and transmit shift register.\r
105     //! \n Valid values are:\r
106     //! - \b EUSCI_B_SPI_MSB_FIRST\r
107     //! - \b EUSCI_B_SPI_LSB_FIRST [Default]\r
108     uint16_t msbFirst;\r
109     //! Is clock phase select.\r
110     //! \n Valid values are:\r
111     //! - \b EUSCI_B_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT [Default]\r
112     //! - \b EUSCI_B_SPI_PHASE_DATA_CAPTURED_ONFIRST_CHANGED_ON_NEXT\r
113     uint16_t clockPhase;\r
114     //! Is clock polarity select\r
115     //! \n Valid values are:\r
116     //! - \b EUSCI_B_SPI_CLOCKPOLARITY_INACTIVITY_HIGH\r
117     //! - \b EUSCI_B_SPI_CLOCKPOLARITY_INACTIVITY_LOW [Default]\r
118     uint16_t clockPolarity;\r
119     //! Is SPI mode select\r
120     //! \n Valid values are:\r
121     //! - \b EUSCI_B_SPI_3PIN\r
122     //! - \b EUSCI_B_SPI_4PIN_UCxSTE_ACTIVE_HIGH\r
123     //! - \b EUSCI_B_SPI_4PIN_UCxSTE_ACTIVE_LOW\r
124     uint16_t spiMode;\r
125 } EUSCI_B_SPI_initSlaveParam;\r
126 \r
127 //*****************************************************************************\r
128 //\r
129 //! \brief Used in the EUSCI_B_SPI_changeMasterClock() function as the param\r
130 //! parameter.\r
131 //\r
132 //*****************************************************************************\r
133 typedef struct EUSCI_B_SPI_changeMasterClockParam\r
134 {\r
135     //! Is the frequency of the selected clock source\r
136     uint32_t clockSourceFrequency;\r
137     //! Is the desired clock rate for SPI communication\r
138     uint32_t desiredSpiClock;\r
139 } EUSCI_B_SPI_changeMasterClockParam;\r
140 \r
141 //*****************************************************************************\r
142 //\r
143 // The following are values that can be passed to the clockPhase parameter for\r
144 // functions: EUSCI_B_SPI_changeClockPhasePolarity(); the param parameter for\r
145 // functions: EUSCI_B_SPI_initMaster(), and EUSCI_B_SPI_initSlave().\r
146 //\r
147 //*****************************************************************************\r
148 #define EUSCI_B_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT            0x00\r
149 #define EUSCI_B_SPI_PHASE_DATA_CAPTURED_ONFIRST_CHANGED_ON_NEXT          UCCKPH\r
150 \r
151 //*****************************************************************************\r
152 //\r
153 // The following are values that can be passed to the param parameter for\r
154 // functions: EUSCI_B_SPI_initMaster(), and EUSCI_B_SPI_initSlave().\r
155 //\r
156 //*****************************************************************************\r
157 #define EUSCI_B_SPI_MSB_FIRST                                             UCMSB\r
158 #define EUSCI_B_SPI_LSB_FIRST                                              0x00\r
159 \r
160 //*****************************************************************************\r
161 //\r
162 // The following are values that can be passed to the param parameter for\r
163 // functions: EUSCI_B_SPI_initMaster(), and EUSCI_B_SPI_initSlave(); the\r
164 // clockPolarity parameter for functions:\r
165 // EUSCI_B_SPI_changeClockPhasePolarity().\r
166 //\r
167 //*****************************************************************************\r
168 #define EUSCI_B_SPI_CLOCKPOLARITY_INACTIVITY_HIGH                        UCCKPL\r
169 #define EUSCI_B_SPI_CLOCKPOLARITY_INACTIVITY_LOW                           0x00\r
170 \r
171 //*****************************************************************************\r
172 //\r
173 // The following are values that can be passed to the param parameter for\r
174 // functions: EUSCI_B_SPI_initMaster().\r
175 //\r
176 //*****************************************************************************\r
177 #define EUSCI_B_SPI_CLOCKSOURCE_ACLK                               UCSSEL__ACLK\r
178 #define EUSCI_B_SPI_CLOCKSOURCE_SMCLK                             UCSSEL__SMCLK\r
179 \r
180 //*****************************************************************************\r
181 //\r
182 // The following are values that can be passed to the param parameter for\r
183 // functions: EUSCI_B_SPI_initMaster(), and EUSCI_B_SPI_initSlave().\r
184 //\r
185 //*****************************************************************************\r
186 #define EUSCI_B_SPI_3PIN                                               UCMODE_0\r
187 #define EUSCI_B_SPI_4PIN_UCxSTE_ACTIVE_HIGH                            UCMODE_1\r
188 #define EUSCI_B_SPI_4PIN_UCxSTE_ACTIVE_LOW                             UCMODE_2\r
189 \r
190 //*****************************************************************************\r
191 //\r
192 // The following are values that can be passed to the select4PinFunctionality\r
193 // parameter for functions: EUSCI_B_SPI_select4PinFunctionality().\r
194 //\r
195 //*****************************************************************************\r
196 #define EUSCI_B_SPI_PREVENT_CONFLICTS_WITH_OTHER_MASTERS                   0x00\r
197 #define EUSCI_B_SPI_ENABLE_SIGNAL_FOR_4WIRE_SLAVE                        UCSTEM\r
198 \r
199 //*****************************************************************************\r
200 //\r
201 // The following are values that can be passed to the mask parameter for\r
202 // functions: EUSCI_B_SPI_enableInterrupt(), EUSCI_B_SPI_disableInterrupt(),\r
203 // EUSCI_B_SPI_getInterruptStatus(), and EUSCI_B_SPI_clearInterrupt() as well\r
204 // as returned by the EUSCI_B_SPI_getInterruptStatus() function.\r
205 //\r
206 //*****************************************************************************\r
207 #define EUSCI_B_SPI_TRANSMIT_INTERRUPT                                   UCTXIE\r
208 #define EUSCI_B_SPI_RECEIVE_INTERRUPT                                    UCRXIE\r
209 \r
210 //*****************************************************************************\r
211 //\r
212 // The following are values that can be passed toThe following are values that\r
213 // can be returned by the EUSCI_B_SPI_isBusy() function.\r
214 //\r
215 //*****************************************************************************\r
216 #define EUSCI_B_SPI_BUSY                                                 UCBUSY\r
217 #define EUSCI_B_SPI_NOT_BUSY                                               0x00\r
218 \r
219 //*****************************************************************************\r
220 //\r
221 // Prototypes for the APIs.\r
222 //\r
223 //*****************************************************************************\r
224 \r
225 //*****************************************************************************\r
226 //\r
227 //! \brief Initializes the SPI Master block.\r
228 //!\r
229 //! Upon successful initialization of the SPI master block, this function will\r
230 //! have set the bus speed for the master, but the SPI Master block still\r
231 //! remains disabled and must be enabled with EUSCI_B_SPI_enable()\r
232 //!\r
233 //! \param baseAddress is the base address of the EUSCI_B_SPI Master module.\r
234 //! \param param is the pointer to struct for master initialization.\r
235 //!\r
236 //! Modified bits are \b UCCKPH, \b UCCKPL, \b UC7BIT, \b UCMSB, \b UCSSELx and\r
237 //! \b UCSWRST of \b UCAxCTLW0 register.\r
238 //!\r
239 //! \return STATUS_SUCCESS\r
240 //\r
241 //*****************************************************************************\r
242 extern void EUSCI_B_SPI_initMaster(uint16_t baseAddress,\r
243                                    EUSCI_B_SPI_initMasterParam *param);\r
244 \r
245 //*****************************************************************************\r
246 //\r
247 //! \brief Selects 4Pin Functionality\r
248 //!\r
249 //! This function should be invoked only in 4-wire mode. Invoking this function\r
250 //! has no effect in 3-wire mode.\r
251 //!\r
252 //! \param baseAddress is the base address of the EUSCI_B_SPI module.\r
253 //! \param select4PinFunctionality selects 4 pin functionality\r
254 //!        Valid values are:\r
255 //!        - \b EUSCI_B_SPI_PREVENT_CONFLICTS_WITH_OTHER_MASTERS\r
256 //!        - \b EUSCI_B_SPI_ENABLE_SIGNAL_FOR_4WIRE_SLAVE\r
257 //!\r
258 //! Modified bits are \b UCSTEM of \b UCAxCTLW0 register.\r
259 //!\r
260 //! \return None\r
261 //\r
262 //*****************************************************************************\r
263 extern void EUSCI_B_SPI_select4PinFunctionality(uint16_t baseAddress,\r
264                                                 uint8_t select4PinFunctionality);\r
265 \r
266 //*****************************************************************************\r
267 //\r
268 //! \brief Initializes the SPI Master clock. At the end of this function call,\r
269 //! SPI module is left enabled.\r
270 //!\r
271 //! \param baseAddress is the base address of the EUSCI_B_SPI module.\r
272 //! \param param is the pointer to struct for master clock setting.\r
273 //!\r
274 //! Modified bits are \b UCSWRST of \b UCAxCTLW0 register.\r
275 //!\r
276 //! \return None\r
277 //\r
278 //*****************************************************************************\r
279 extern void EUSCI_B_SPI_changeMasterClock(uint16_t baseAddress,\r
280                                           EUSCI_B_SPI_changeMasterClockParam *param);\r
281 \r
282 //*****************************************************************************\r
283 //\r
284 //! \brief Initializes the SPI Slave block.\r
285 //!\r
286 //! Upon successful initialization of the SPI slave block, this function will\r
287 //! have initialized the slave block, but the SPI Slave block still remains\r
288 //! disabled and must be enabled with EUSCI_B_SPI_enable()\r
289 //!\r
290 //! \param baseAddress is the base address of the EUSCI_B_SPI Slave module.\r
291 //! \param param is the pointer to struct for slave initialization.\r
292 //!\r
293 //! Modified bits are \b UCMSB, \b UCMST, \b UC7BIT, \b UCCKPL, \b UCCKPH, \b\r
294 //! UCMODE and \b UCSWRST of \b UCAxCTLW0 register.\r
295 //!\r
296 //! \return STATUS_SUCCESS\r
297 //\r
298 //*****************************************************************************\r
299 extern void EUSCI_B_SPI_initSlave(uint16_t baseAddress,\r
300                                   EUSCI_B_SPI_initSlaveParam *param);\r
301 \r
302 //*****************************************************************************\r
303 //\r
304 //! \brief Changes the SPI clock phase and polarity. At the end of this\r
305 //! function call, SPI module is left enabled.\r
306 //!\r
307 //! \param baseAddress is the base address of the EUSCI_B_SPI module.\r
308 //! \param clockPhase is clock phase select.\r
309 //!        Valid values are:\r
310 //!        - \b EUSCI_B_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT\r
311 //!           [Default]\r
312 //!        - \b EUSCI_B_SPI_PHASE_DATA_CAPTURED_ONFIRST_CHANGED_ON_NEXT\r
313 //! \param clockPolarity is clock polarity select\r
314 //!        Valid values are:\r
315 //!        - \b EUSCI_B_SPI_CLOCKPOLARITY_INACTIVITY_HIGH\r
316 //!        - \b EUSCI_B_SPI_CLOCKPOLARITY_INACTIVITY_LOW [Default]\r
317 //!\r
318 //! Modified bits are \b UCCKPL, \b UCCKPH and \b UCSWRST of \b UCAxCTLW0\r
319 //! register.\r
320 //!\r
321 //! \return None\r
322 //\r
323 //*****************************************************************************\r
324 extern void EUSCI_B_SPI_changeClockPhasePolarity(uint16_t baseAddress,\r
325                                                  uint16_t clockPhase,\r
326                                                  uint16_t clockPolarity);\r
327 \r
328 //*****************************************************************************\r
329 //\r
330 //! \brief Transmits a byte from the SPI Module.\r
331 //!\r
332 //! This function will place the supplied data into SPI transmit data register\r
333 //! to start transmission.\r
334 //!\r
335 //! \param baseAddress is the base address of the EUSCI_B_SPI module.\r
336 //! \param transmitData data to be transmitted from the SPI module\r
337 //!\r
338 //! \return None\r
339 //\r
340 //*****************************************************************************\r
341 extern void EUSCI_B_SPI_transmitData(uint16_t baseAddress,\r
342                                      uint8_t transmitData);\r
343 \r
344 //*****************************************************************************\r
345 //\r
346 //! \brief Receives a byte that has been sent to the SPI Module.\r
347 //!\r
348 //! This function reads a byte of data from the SPI receive data Register.\r
349 //!\r
350 //! \param baseAddress is the base address of the EUSCI_B_SPI module.\r
351 //!\r
352 //! \return Returns the byte received from by the SPI module, cast as an\r
353 //!         uint8_t.\r
354 //\r
355 //*****************************************************************************\r
356 extern uint8_t EUSCI_B_SPI_receiveData(uint16_t baseAddress);\r
357 \r
358 //*****************************************************************************\r
359 //\r
360 //! \brief Enables individual SPI interrupt sources.\r
361 //!\r
362 //! Enables the indicated SPI interrupt sources.  Only the sources that are\r
363 //! enabled can be reflected to the processor interrupt; disabled sources have\r
364 //! no effect on the processor. Does not clear interrupt flags.\r
365 //!\r
366 //! \param baseAddress is the base address of the EUSCI_B_SPI module.\r
367 //! \param mask is the bit mask of the interrupt sources to be enabled.\r
368 //!        Mask value is the logical OR of any of the following:\r
369 //!        - \b EUSCI_B_SPI_TRANSMIT_INTERRUPT\r
370 //!        - \b EUSCI_B_SPI_RECEIVE_INTERRUPT\r
371 //!\r
372 //! Modified bits of \b UCAxIFG register and bits of \b UCAxIE register.\r
373 //!\r
374 //! \return None\r
375 //\r
376 //*****************************************************************************\r
377 extern void EUSCI_B_SPI_enableInterrupt(uint16_t baseAddress,\r
378                                         uint8_t mask);\r
379 \r
380 //*****************************************************************************\r
381 //\r
382 //! \brief Disables individual SPI interrupt sources.\r
383 //!\r
384 //! Disables the indicated SPI interrupt sources. Only the sources that are\r
385 //! enabled can be reflected to the processor interrupt; disabled sources have\r
386 //! no effect on the processor.\r
387 //!\r
388 //! \param baseAddress is the base address of the EUSCI_B_SPI module.\r
389 //! \param mask is the bit mask of the interrupt sources to be disabled.\r
390 //!        Mask value is the logical OR of any of the following:\r
391 //!        - \b EUSCI_B_SPI_TRANSMIT_INTERRUPT\r
392 //!        - \b EUSCI_B_SPI_RECEIVE_INTERRUPT\r
393 //!\r
394 //! Modified bits of \b UCAxIE register.\r
395 //!\r
396 //! \return None\r
397 //\r
398 //*****************************************************************************\r
399 extern void EUSCI_B_SPI_disableInterrupt(uint16_t baseAddress,\r
400                                          uint8_t mask);\r
401 \r
402 //*****************************************************************************\r
403 //\r
404 //! \brief Gets the current SPI interrupt status.\r
405 //!\r
406 //! This returns the interrupt status for the SPI module based on which flag is\r
407 //! passed.\r
408 //!\r
409 //! \param baseAddress is the base address of the EUSCI_B_SPI module.\r
410 //! \param mask is the masked interrupt flag status to be returned.\r
411 //!        Mask value is the logical OR of any of the following:\r
412 //!        - \b EUSCI_B_SPI_TRANSMIT_INTERRUPT\r
413 //!        - \b EUSCI_B_SPI_RECEIVE_INTERRUPT\r
414 //!\r
415 //! \return Logical OR of any of the following:\r
416 //!         - \b EUSCI_B_SPI_TRANSMIT_INTERRUPT\r
417 //!         - \b EUSCI_B_SPI_RECEIVE_INTERRUPT\r
418 //!         \n indicating the status of the masked interrupts\r
419 //\r
420 //*****************************************************************************\r
421 extern uint8_t EUSCI_B_SPI_getInterruptStatus(uint16_t baseAddress,\r
422                                               uint8_t mask);\r
423 \r
424 //*****************************************************************************\r
425 //\r
426 //! \brief Clears the selected SPI interrupt status flag.\r
427 //!\r
428 //! \param baseAddress is the base address of the EUSCI_B_SPI module.\r
429 //! \param mask is the masked interrupt flag to be cleared.\r
430 //!        Mask value is the logical OR of any of the following:\r
431 //!        - \b EUSCI_B_SPI_TRANSMIT_INTERRUPT\r
432 //!        - \b EUSCI_B_SPI_RECEIVE_INTERRUPT\r
433 //!\r
434 //! Modified bits of \b UCAxIFG register.\r
435 //!\r
436 //! \return None\r
437 //\r
438 //*****************************************************************************\r
439 extern void EUSCI_B_SPI_clearInterrupt(uint16_t baseAddress,\r
440                                        uint8_t mask);\r
441 \r
442 //*****************************************************************************\r
443 //\r
444 //! \brief Enables the SPI block.\r
445 //!\r
446 //! This will enable operation of the SPI block.\r
447 //!\r
448 //! \param baseAddress is the base address of the EUSCI_B_SPI module.\r
449 //!\r
450 //! Modified bits are \b UCSWRST of \b UCAxCTLW0 register.\r
451 //!\r
452 //! \return None\r
453 //\r
454 //*****************************************************************************\r
455 extern void EUSCI_B_SPI_enable(uint16_t baseAddress);\r
456 \r
457 //*****************************************************************************\r
458 //\r
459 //! \brief Disables the SPI block.\r
460 //!\r
461 //! This will disable operation of the SPI block.\r
462 //!\r
463 //! \param baseAddress is the base address of the EUSCI_B_SPI module.\r
464 //!\r
465 //! Modified bits are \b UCSWRST of \b UCAxCTLW0 register.\r
466 //!\r
467 //! \return None\r
468 //\r
469 //*****************************************************************************\r
470 extern void EUSCI_B_SPI_disable(uint16_t baseAddress);\r
471 \r
472 //*****************************************************************************\r
473 //\r
474 //! \brief Returns the address of the RX Buffer of the SPI for the DMA module.\r
475 //!\r
476 //! Returns the address of the SPI RX Buffer. This can be used in conjunction\r
477 //! with the DMA to store the received data directly to memory.\r
478 //!\r
479 //! \param baseAddress is the base address of the EUSCI_B_SPI module.\r
480 //!\r
481 //! \return the address of the RX Buffer\r
482 //\r
483 //*****************************************************************************\r
484 extern uint32_t EUSCI_B_SPI_getReceiveBufferAddress(uint16_t baseAddress);\r
485 \r
486 //*****************************************************************************\r
487 //\r
488 //! \brief Returns the address of the TX Buffer of the SPI for the DMA module.\r
489 //!\r
490 //! Returns the address of the SPI TX Buffer. This can be used in conjunction\r
491 //! with the DMA to obtain transmitted data directly from memory.\r
492 //!\r
493 //! \param baseAddress is the base address of the EUSCI_B_SPI module.\r
494 //!\r
495 //! \return the address of the TX Buffer\r
496 //\r
497 //*****************************************************************************\r
498 extern uint32_t EUSCI_B_SPI_getTransmitBufferAddress(uint16_t baseAddress);\r
499 \r
500 //*****************************************************************************\r
501 //\r
502 //! \brief Indicates whether or not the SPI bus is busy.\r
503 //!\r
504 //! This function returns an indication of whether or not the SPI bus is\r
505 //! busy.This function checks the status of the bus via UCBBUSY bit\r
506 //!\r
507 //! \param baseAddress is the base address of the EUSCI_B_SPI module.\r
508 //!\r
509 //! \return One of the following:\r
510 //!         - \b EUSCI_B_SPI_BUSY\r
511 //!         - \b EUSCI_B_SPI_NOT_BUSY\r
512 //!         \n indicating if the EUSCI_B_SPI is busy\r
513 //\r
514 //*****************************************************************************\r
515 extern uint16_t EUSCI_B_SPI_isBusy(uint16_t baseAddress);\r
516 \r
517 //*****************************************************************************\r
518 //\r
519 // Mark the end of the C bindings section for C++ compilers.\r
520 //\r
521 //*****************************************************************************\r
522 #ifdef __cplusplus\r
523 }\r
524 #endif\r
525 \r
526 #endif\r
527 #endif // __MSP430WARE_EUSCI_B_SPI_H__\r