MSP430 DriverLib for MSP430FR2xx_4xx Devices  2.10.00.09
 All Data Structures Functions Variables Modules Pages
eusci_a_spi.h
1 //*****************************************************************************
2 //
3 // eusci_a_spi.h - Driver for the EUSCI_A_SPI Module.
4 //
5 //*****************************************************************************
6 
7 #ifndef __MSP430WARE_EUSCI_A_SPI_H__
8 #define __MSP430WARE_EUSCI_A_SPI_H__
9 
10 #include "inc/hw_memmap.h"
11 
12 #ifdef __MSP430_HAS_EUSCI_Ax__
13 
14 //*****************************************************************************
15 //
16 // If building with a C++ compiler, make all of the definitions in this header
17 // have a C binding.
18 //
19 //*****************************************************************************
20 #ifdef __cplusplus
21 extern "C"
22 {
23 #endif
24 
25 #include "inc/hw_memmap.h"
26 //*****************************************************************************
27 //
28 //! \brief Used in the EUSCI_A_SPI_changeMasterClock() function as the param
29 //! parameter.
30 //
31 //*****************************************************************************
33  //! Is the frequency of the selected clock source
35  //! Is the desired clock rate for SPI communication
36  uint32_t desiredSpiClock;
38 
39 //*****************************************************************************
40 //
41 //! \brief Used in the EUSCI_A_SPI_initSlave() function as the param parameter.
42 //
43 //*****************************************************************************
45  //! Controls the direction of the receive and transmit shift register.
46  //! \n Valid values are:
47  //! - \b EUSCI_A_SPI_MSB_FIRST
48  //! - \b EUSCI_A_SPI_LSB_FIRST [Default]
49  uint16_t msbFirst;
50  //! Is clock phase select.
51  //! \n Valid values are:
52  //! - \b EUSCI_A_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT [Default]
53  //! - \b EUSCI_A_SPI_PHASE_DATA_CAPTURED_ONFIRST_CHANGED_ON_NEXT
54  uint16_t clockPhase;
55  //! Is clock polarity select
56  //! \n Valid values are:
57  //! - \b EUSCI_A_SPI_CLOCKPOLARITY_INACTIVITY_HIGH
58  //! - \b EUSCI_A_SPI_CLOCKPOLARITY_INACTIVITY_LOW [Default]
59  uint16_t clockPolarity;
60  //! Is SPI mode select
61  //! \n Valid values are:
62  //! - \b EUSCI_A_SPI_3PIN
63  //! - \b EUSCI_A_SPI_4PIN_UCxSTE_ACTIVE_HIGH
64  //! - \b EUSCI_A_SPI_4PIN_UCxSTE_ACTIVE_LOW
65  uint16_t spiMode;
67 
68 //*****************************************************************************
69 //
70 //! \brief Used in the EUSCI_A_SPI_initMaster() function as the param
71 //! parameter.
72 //
73 //*****************************************************************************
75  //! Selects Clock source.
76  //! \n Valid values are:
77  //! - \b EUSCI_A_SPI_CLOCKSOURCE_MODCLK
78  //! - \b EUSCI_A_SPI_CLOCKSOURCE_SMCLK
80  //! Is the frequency of the selected clock source
82  //! Is the desired clock rate for SPI communication
83  uint32_t desiredSpiClock;
84  //! Controls the direction of the receive and transmit shift register.
85  //! \n Valid values are:
86  //! - \b EUSCI_A_SPI_MSB_FIRST
87  //! - \b EUSCI_A_SPI_LSB_FIRST [Default]
88  uint16_t msbFirst;
89  //! Is clock phase select.
90  //! \n Valid values are:
91  //! - \b EUSCI_A_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT [Default]
92  //! - \b EUSCI_A_SPI_PHASE_DATA_CAPTURED_ONFIRST_CHANGED_ON_NEXT
93  uint16_t clockPhase;
94  //! Is clock polarity select
95  //! \n Valid values are:
96  //! - \b EUSCI_A_SPI_CLOCKPOLARITY_INACTIVITY_HIGH
97  //! - \b EUSCI_A_SPI_CLOCKPOLARITY_INACTIVITY_LOW [Default]
98  uint16_t clockPolarity;
99  //! Is SPI mode select
100  //! \n Valid values are:
101  //! - \b EUSCI_A_SPI_3PIN
102  //! - \b EUSCI_A_SPI_4PIN_UCxSTE_ACTIVE_HIGH
103  //! - \b EUSCI_A_SPI_4PIN_UCxSTE_ACTIVE_LOW
104  uint16_t spiMode;
106 
107 
108 //*****************************************************************************
109 //
110 // The following are values that can be passed to the clockPhase parameter for
111 // functions: EUSCI_A_SPI_changeClockPhasePolarity(); the param parameter for
112 // functions: EUSCI_A_SPI_initMaster(), and EUSCI_A_SPI_initSlave().
113 //
114 //*****************************************************************************
115 #define EUSCI_A_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT 0x00
116 #define EUSCI_A_SPI_PHASE_DATA_CAPTURED_ONFIRST_CHANGED_ON_NEXT UCCKPH
117 
118 //*****************************************************************************
119 //
120 // The following are values that can be passed to the param parameter for
121 // functions: EUSCI_A_SPI_initMaster(), and EUSCI_A_SPI_initSlave().
122 //
123 //*****************************************************************************
124 #define EUSCI_A_SPI_MSB_FIRST UCMSB
125 #define EUSCI_A_SPI_LSB_FIRST 0x00
126 
127 //*****************************************************************************
128 //
129 // The following are values that can be passed to the param parameter for
130 // functions: EUSCI_A_SPI_initMaster(), and EUSCI_A_SPI_initSlave(); the
131 // clockPolarity parameter for functions:
132 // EUSCI_A_SPI_changeClockPhasePolarity().
133 //
134 //*****************************************************************************
135 #define EUSCI_A_SPI_CLOCKPOLARITY_INACTIVITY_HIGH UCCKPL
136 #define EUSCI_A_SPI_CLOCKPOLARITY_INACTIVITY_LOW 0x00
137 
138 //*****************************************************************************
139 //
140 // The following are values that can be passed to the param parameter for
141 // functions: EUSCI_A_SPI_initMaster().
142 //
143 //*****************************************************************************
144 #define EUSCI_A_SPI_CLOCKSOURCE_MODCLK UCSSEL__MODCLK
145 #define EUSCI_A_SPI_CLOCKSOURCE_SMCLK UCSSEL__SMCLK
146 
147 //*****************************************************************************
148 //
149 // The following are values that can be passed to the param parameter for
150 // functions: EUSCI_A_SPI_initMaster(), and EUSCI_A_SPI_initSlave().
151 //
152 //*****************************************************************************
153 #define EUSCI_A_SPI_3PIN UCMODE_0
154 #define EUSCI_A_SPI_4PIN_UCxSTE_ACTIVE_HIGH UCMODE_1
155 #define EUSCI_A_SPI_4PIN_UCxSTE_ACTIVE_LOW UCMODE_2
156 
157 //*****************************************************************************
158 //
159 // The following are values that can be passed to the select4PinFunctionality
160 // parameter for functions: EUSCI_A_SPI_select4PinFunctionality().
161 //
162 //*****************************************************************************
163 #define EUSCI_A_SPI_PREVENT_CONFLICTS_WITH_OTHER_MASTERS 0x00
164 #define EUSCI_A_SPI_ENABLE_SIGNAL_FOR_4WIRE_SLAVE UCSTEM
165 
166 //*****************************************************************************
167 //
168 // The following are values that can be passed to the mask parameter for
169 // functions: EUSCI_A_SPI_enableInterrupt(), EUSCI_A_SPI_disableInterrupt(),
170 // EUSCI_A_SPI_getInterruptStatus(), and EUSCI_A_SPI_clearInterrupt() as well
171 // as returned by the EUSCI_A_SPI_getInterruptStatus() function.
172 //
173 //*****************************************************************************
174 #define EUSCI_A_SPI_TRANSMIT_INTERRUPT UCTXIE
175 #define EUSCI_A_SPI_RECEIVE_INTERRUPT UCRXIE
176 
177 //*****************************************************************************
178 //
179 // The following are values that can be passed toThe following are values that
180 // can be returned by the EUSCI_A_SPI_isBusy() function.
181 //
182 //*****************************************************************************
183 #define EUSCI_A_SPI_BUSY UCBUSY
184 #define EUSCI_A_SPI_NOT_BUSY 0x00
185 
186 //*****************************************************************************
187 //
188 // Prototypes for the APIs.
189 //
190 //*****************************************************************************
191 
192 //*****************************************************************************
193 //
194 //! \brief Initializes the SPI Master block.
195 //!
196 //! Upon successful initialization of the SPI master block, this function will
197 //! have set the bus speed for the master, but the SPI Master block still
198 //! remains disabled and must be enabled with EUSCI_A_SPI_enable()
199 //!
200 //! \param baseAddress is the base address of the EUSCI_A_SPI Master module.
201 //! \param param is the pointer to struct for master initialization.
202 //!
203 //! Modified bits are \b UCCKPH, \b UCCKPL, \b UC7BIT, \b UCMSB, \b UCSSELx and
204 //! \b UCSWRST of \b UCAxCTLW0 register.
205 //!
206 //! \return STATUS_SUCCESS
207 //
208 //*****************************************************************************
209 extern void EUSCI_A_SPI_initMaster(uint16_t baseAddress,
211 
212 //*****************************************************************************
213 //
214 //! \brief Selects 4Pin Functionality
215 //!
216 //! This function should be invoked only in 4-wire mode. Invoking this function
217 //! has no effect in 3-wire mode.
218 //!
219 //! \param baseAddress is the base address of the EUSCI_A_SPI module.
220 //! \param select4PinFunctionality selects 4 pin functionality
221 //! Valid values are:
222 //! - \b EUSCI_A_SPI_PREVENT_CONFLICTS_WITH_OTHER_MASTERS
223 //! - \b EUSCI_A_SPI_ENABLE_SIGNAL_FOR_4WIRE_SLAVE
224 //!
225 //! Modified bits are \b UCSTEM of \b UCAxCTLW0 register.
226 //!
227 //! \return None
228 //
229 //*****************************************************************************
230 extern void EUSCI_A_SPI_select4PinFunctionality(uint16_t baseAddress,
231  uint8_t select4PinFunctionality);
232 
233 //*****************************************************************************
234 //
235 //! \brief Initializes the SPI Master clock. At the end of this function call,
236 //! SPI module is left enabled.
237 //!
238 //! \param baseAddress is the base address of the EUSCI_A_SPI module.
239 //! \param param is the pointer to struct for master clock setting.
240 //!
241 //! Modified bits are \b UCSWRST of \b UCAxCTLW0 register.
242 //!
243 //! \return None
244 //
245 //*****************************************************************************
246 extern void EUSCI_A_SPI_changeMasterClock(uint16_t baseAddress,
248 
249 //*****************************************************************************
250 //
251 //! \brief Initializes the SPI Slave block.
252 //!
253 //! Upon successful initialization of the SPI slave block, this function will
254 //! have initialized the slave block, but the SPI Slave block still remains
255 //! disabled and must be enabled with EUSCI_A_SPI_enable()
256 //!
257 //! \param baseAddress is the base address of the EUSCI_A_SPI Slave module.
258 //! \param param is the pointer to struct for slave initialization.
259 //!
260 //! Modified bits are \b UCMSB, \b UCMST, \b UC7BIT, \b UCCKPL, \b UCCKPH, \b
261 //! UCMODE and \b UCSWRST of \b UCAxCTLW0 register.
262 //!
263 //! \return STATUS_SUCCESS
264 //
265 //*****************************************************************************
266 extern void EUSCI_A_SPI_initSlave(uint16_t baseAddress,
268 
269 //*****************************************************************************
270 //
271 //! \brief Changes the SPI clock phase and polarity. At the end of this
272 //! function call, SPI module is left enabled.
273 //!
274 //! \param baseAddress is the base address of the EUSCI_A_SPI module.
275 //! \param clockPhase is clock phase select.
276 //! Valid values are:
277 //! - \b EUSCI_A_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT
278 //! [Default]
279 //! - \b EUSCI_A_SPI_PHASE_DATA_CAPTURED_ONFIRST_CHANGED_ON_NEXT
280 //! \param clockPolarity is clock polarity select
281 //! Valid values are:
282 //! - \b EUSCI_A_SPI_CLOCKPOLARITY_INACTIVITY_HIGH
283 //! - \b EUSCI_A_SPI_CLOCKPOLARITY_INACTIVITY_LOW [Default]
284 //!
285 //! Modified bits are \b UCCKPL, \b UCCKPH and \b UCSWRST of \b UCAxCTLW0
286 //! register.
287 //!
288 //! \return None
289 //
290 //*****************************************************************************
291 extern void EUSCI_A_SPI_changeClockPhasePolarity(uint16_t baseAddress,
292  uint16_t clockPhase,
293  uint16_t clockPolarity);
294 
295 //*****************************************************************************
296 //
297 //! \brief Transmits a byte from the SPI Module.
298 //!
299 //! This function will place the supplied data into SPI transmit data register
300 //! to start transmission.
301 //!
302 //! \param baseAddress is the base address of the EUSCI_A_SPI module.
303 //! \param transmitData data to be transmitted from the SPI module
304 //!
305 //! \return None
306 //
307 //*****************************************************************************
308 extern void EUSCI_A_SPI_transmitData(uint16_t baseAddress,
309  uint8_t transmitData);
310 
311 //*****************************************************************************
312 //
313 //! \brief Receives a byte that has been sent to the SPI Module.
314 //!
315 //! This function reads a byte of data from the SPI receive data Register.
316 //!
317 //! \param baseAddress is the base address of the EUSCI_A_SPI module.
318 //!
319 //! \return Returns the byte received from by the SPI module, cast as an
320 //! uint8_t.
321 //
322 //*****************************************************************************
323 extern uint8_t EUSCI_A_SPI_receiveData(uint16_t baseAddress);
324 
325 //*****************************************************************************
326 //
327 //! \brief Enables individual SPI interrupt sources.
328 //!
329 //! Enables the indicated SPI interrupt sources. Only the sources that are
330 //! enabled can be reflected to the processor interrupt; disabled sources have
331 //! no effect on the processor. Does not clear interrupt flags.
332 //!
333 //! \param baseAddress is the base address of the EUSCI_A_SPI module.
334 //! \param mask is the bit mask of the interrupt sources to be enabled.
335 //! Mask value is the logical OR of any of the following:
336 //! - \b EUSCI_A_SPI_TRANSMIT_INTERRUPT
337 //! - \b EUSCI_A_SPI_RECEIVE_INTERRUPT
338 //!
339 //! Modified bits of \b UCAxIFG register and bits of \b UCAxIE register.
340 //!
341 //! \return None
342 //
343 //*****************************************************************************
344 extern void EUSCI_A_SPI_enableInterrupt(uint16_t baseAddress,
345  uint8_t mask);
346 
347 //*****************************************************************************
348 //
349 //! \brief Disables individual SPI interrupt sources.
350 //!
351 //! Disables the indicated SPI interrupt sources. Only the sources that are
352 //! enabled can be reflected to the processor interrupt; disabled sources have
353 //! no effect on the processor.
354 //!
355 //! \param baseAddress is the base address of the EUSCI_A_SPI module.
356 //! \param mask is the bit mask of the interrupt sources to be disabled.
357 //! Mask value is the logical OR of any of the following:
358 //! - \b EUSCI_A_SPI_TRANSMIT_INTERRUPT
359 //! - \b EUSCI_A_SPI_RECEIVE_INTERRUPT
360 //!
361 //! Modified bits of \b UCAxIE register.
362 //!
363 //! \return None
364 //
365 //*****************************************************************************
366 extern void EUSCI_A_SPI_disableInterrupt(uint16_t baseAddress,
367  uint8_t mask);
368 
369 //*****************************************************************************
370 //
371 //! \brief Gets the current SPI interrupt status.
372 //!
373 //! This returns the interrupt status for the SPI module based on which flag is
374 //! passed.
375 //!
376 //! \param baseAddress is the base address of the EUSCI_A_SPI module.
377 //! \param mask is the masked interrupt flag status to be returned.
378 //! Mask value is the logical OR of any of the following:
379 //! - \b EUSCI_A_SPI_TRANSMIT_INTERRUPT
380 //! - \b EUSCI_A_SPI_RECEIVE_INTERRUPT
381 //!
382 //! \return Logical OR of any of the following:
383 //! - \b EUSCI_A_SPI_TRANSMIT_INTERRUPT
384 //! - \b EUSCI_A_SPI_RECEIVE_INTERRUPT
385 //! \n indicating the status of the masked interrupts
386 //
387 //*****************************************************************************
388 extern uint8_t EUSCI_A_SPI_getInterruptStatus(uint16_t baseAddress,
389  uint8_t mask);
390 
391 //*****************************************************************************
392 //
393 //! \brief Clears the selected SPI interrupt status flag.
394 //!
395 //! \param baseAddress is the base address of the EUSCI_A_SPI module.
396 //! \param mask is the masked interrupt flag to be cleared.
397 //! Mask value is the logical OR of any of the following:
398 //! - \b EUSCI_A_SPI_TRANSMIT_INTERRUPT
399 //! - \b EUSCI_A_SPI_RECEIVE_INTERRUPT
400 //!
401 //! Modified bits of \b UCAxIFG register.
402 //!
403 //! \return None
404 //
405 //*****************************************************************************
406 extern void EUSCI_A_SPI_clearInterrupt(uint16_t baseAddress,
407  uint8_t mask);
408 
409 //*****************************************************************************
410 //
411 //! \brief Enables the SPI block.
412 //!
413 //! This will enable operation of the SPI block.
414 //!
415 //! \param baseAddress is the base address of the EUSCI_A_SPI module.
416 //!
417 //! Modified bits are \b UCSWRST of \b UCAxCTLW0 register.
418 //!
419 //! \return None
420 //
421 //*****************************************************************************
422 extern void EUSCI_A_SPI_enable(uint16_t baseAddress);
423 
424 //*****************************************************************************
425 //
426 //! \brief Disables the SPI block.
427 //!
428 //! This will disable operation of the SPI block.
429 //!
430 //! \param baseAddress is the base address of the EUSCI_A_SPI module.
431 //!
432 //! Modified bits are \b UCSWRST of \b UCAxCTLW0 register.
433 //!
434 //! \return None
435 //
436 //*****************************************************************************
437 extern void EUSCI_A_SPI_disable(uint16_t baseAddress);
438 
439 //*****************************************************************************
440 //
441 //! \brief Returns the address of the RX Buffer of the SPI for the DMA module.
442 //!
443 //! Returns the address of the SPI RX Buffer. This can be used in conjunction
444 //! with the DMA to store the received data directly to memory.
445 //!
446 //! \param baseAddress is the base address of the EUSCI_A_SPI module.
447 //!
448 //! \return the address of the RX Buffer
449 //
450 //*****************************************************************************
451 extern uint32_t EUSCI_A_SPI_getReceiveBufferAddress(uint16_t baseAddress);
452 
453 //*****************************************************************************
454 //
455 //! \brief Returns the address of the TX Buffer of the SPI for the DMA module.
456 //!
457 //! Returns the address of the SPI TX Buffer. This can be used in conjunction
458 //! with the DMA to obtain transmitted data directly from memory.
459 //!
460 //! \param baseAddress is the base address of the EUSCI_A_SPI module.
461 //!
462 //! \return the address of the TX Buffer
463 //
464 //*****************************************************************************
465 extern uint32_t EUSCI_A_SPI_getTransmitBufferAddress(uint16_t baseAddress);
466 
467 //*****************************************************************************
468 //
469 //! \brief Indicates whether or not the SPI bus is busy.
470 //!
471 //! This function returns an indication of whether or not the SPI bus is
472 //! busy.This function checks the status of the bus via UCBBUSY bit
473 //!
474 //! \param baseAddress is the base address of the EUSCI_A_SPI module.
475 //!
476 //! \return One of the following:
477 //! - \b EUSCI_A_SPI_BUSY
478 //! - \b EUSCI_A_SPI_NOT_BUSY
479 //! \n indicating if the EUSCI_A_SPI is busy
480 //
481 //*****************************************************************************
482 extern uint16_t EUSCI_A_SPI_isBusy(uint16_t baseAddress);
483 
484 //*****************************************************************************
485 //
486 // Mark the end of the C bindings section for C++ compilers.
487 //
488 //*****************************************************************************
489 #ifdef __cplusplus
490 }
491 #endif
492 
493 #endif
494 #endif // __MSP430WARE_EUSCI_A_SPI_H__
uint8_t EUSCI_A_SPI_getInterruptStatus(uint16_t baseAddress, uint8_t mask)
Gets the current SPI interrupt status.
Definition: eusci_a_spi.c:148
uint16_t spiMode
Definition: eusci_a_spi.h:65
void EUSCI_A_SPI_initMaster(uint16_t baseAddress, EUSCI_A_SPI_initMasterParam *param)
Initializes the SPI Master block.
Definition: eusci_a_spi.c:21
void EUSCI_A_SPI_changeClockPhasePolarity(uint16_t baseAddress, uint16_t clockPhase, uint16_t clockPolarity)
Changes the SPI clock phase and polarity. At the end of this function call, SPI module is left enable...
Definition: eusci_a_spi.c:102
uint16_t clockPhase
Definition: eusci_a_spi.h:54
Used in the EUSCI_A_SPI_changeMasterClock() function as the param parameter.
Definition: eusci_a_spi.h:32
Used in the EUSCI_A_SPI_initMaster() function as the param parameter.
Definition: eusci_a_spi.h:74
uint32_t desiredSpiClock
Is the desired clock rate for SPI communication.
Definition: eusci_a_spi.h:83
uint16_t msbFirst
Definition: eusci_a_spi.h:88
uint32_t EUSCI_A_SPI_getTransmitBufferAddress(uint16_t baseAddress)
Returns the address of the TX Buffer of the SPI for the DMA module.
Definition: eusci_a_spi.c:179
void EUSCI_A_SPI_select4PinFunctionality(uint16_t baseAddress, uint8_t select4PinFunctionality)
Selects 4Pin Functionality.
Definition: eusci_a_spi.c:59
void EUSCI_A_SPI_initSlave(uint16_t baseAddress, EUSCI_A_SPI_initSlaveParam *param)
Initializes the SPI Slave block.
Definition: eusci_a_spi.c:79
uint32_t clockSourceFrequency
Is the frequency of the selected clock source.
Definition: eusci_a_spi.h:81
uint16_t clockPolarity
Definition: eusci_a_spi.h:59
uint16_t msbFirst
Definition: eusci_a_spi.h:49
uint16_t spiMode
Definition: eusci_a_spi.h:104
void EUSCI_A_SPI_enableInterrupt(uint16_t baseAddress, uint8_t mask)
Enables individual SPI interrupt sources.
Definition: eusci_a_spi.c:134
uint32_t desiredSpiClock
Is the desired clock rate for SPI communication.
Definition: eusci_a_spi.h:36
Used in the EUSCI_A_SPI_initSlave() function as the param parameter.
Definition: eusci_a_spi.h:44
uint32_t EUSCI_A_SPI_getReceiveBufferAddress(uint16_t baseAddress)
Returns the address of the RX Buffer of the SPI for the DMA module.
Definition: eusci_a_spi.c:174
uint16_t clockPhase
Definition: eusci_a_spi.h:93
void EUSCI_A_SPI_disableInterrupt(uint16_t baseAddress, uint8_t mask)
Disables individual SPI interrupt sources.
Definition: eusci_a_spi.c:141
uint16_t EUSCI_A_SPI_isBusy(uint16_t baseAddress)
Indicates whether or not the SPI bus is busy.
Definition: eusci_a_spi.c:184
uint8_t selectClockSource
Definition: eusci_a_spi.h:79
uint8_t EUSCI_A_SPI_receiveData(uint16_t baseAddress)
Receives a byte that has been sent to the SPI Module.
Definition: eusci_a_spi.c:129
void EUSCI_A_SPI_clearInterrupt(uint16_t baseAddress, uint8_t mask)
Clears the selected SPI interrupt status flag.
Definition: eusci_a_spi.c:155
void EUSCI_A_SPI_disable(uint16_t baseAddress)
Disables the SPI block.
Definition: eusci_a_spi.c:168
void EUSCI_A_SPI_transmitData(uint16_t baseAddress, uint8_t transmitData)
Transmits a byte from the SPI Module.
Definition: eusci_a_spi.c:122
void EUSCI_A_SPI_changeMasterClock(uint16_t baseAddress, EUSCI_A_SPI_changeMasterClockParam *param)
Initializes the SPI Master clock. At the end of this function call, SPI module is left enabled...
Definition: eusci_a_spi.c:67
uint16_t clockPolarity
Definition: eusci_a_spi.h:98
uint32_t clockSourceFrequency
Is the frequency of the selected clock source.
Definition: eusci_a_spi.h:34
void EUSCI_A_SPI_enable(uint16_t baseAddress)
Enables the SPI block.
Definition: eusci_a_spi.c:162

Copyright 2015, Texas Instruments Incorporated