MSP430 DriverLib for MSP430FR5xx_6xx Devices  2.91.13.01
sdhs.h
1 //*****************************************************************************
2 //
3 // sdhs.h - Driver for the SDHS Module.
4 //
5 //*****************************************************************************
6 
7 #ifndef __MSP430WARE_SDHS_H__
8 #define __MSP430WARE_SDHS_H__
9 
10 #include "inc/hw_memmap.h"
11 
12 #ifdef __MSP430_HAS_SDHS__
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 //
29 // The following are values that can be passed to the interruptMask parameter
30 // for functions: SDHS_getInterruptStatus(), SDHS_enableInterrupt(),
31 // SDHS_disableInterrupt()
32 //
33 //*****************************************************************************
34 #define SDHS_INCOMPLETE_STOP_INTERRUPT ISTOP
35 #define SDHS_WINDOW_LOW_INTERRUPT WINLO
36 #define SDHS_WINDOW_HIGH_INTERRUPT WINHI
37 #define SDHS_DATA_READY_INTERRUPT DTRDY
38 #define SDHS_START_CONVERSION_TRIGGER_INTERRUPT SSTRG
39 #define SDHS_ACQUISITION_DONE_INTERRUPT ACQDONE
40 #define SDHS_DATA_OVERFLOW_INTERRUPT OVF
41 
42 //*****************************************************************************
43 //
44 // The following are values that can be passed to the param parameter for
45 // functions: SDHS_init(); the triggerSourceSelect parameter for
46 // functions: SDHS_init().
47 //
48 //*****************************************************************************
49 #define SDHS_REGISTER_CONTROL_MODE TRGSRC_0
50 #define SDHS_ASQ_CONTROL_MODE TRGSRC_1
51 
52 //*****************************************************************************
53 //
54 // The following are values that are returned by SDHS_getRegisterLockStatus()
55 //
56 //*****************************************************************************
57 #define SDHS_REGISTERS_LOCKED SDHS_LOCK_1
58 #define SDHS_REGISTERS_UNLOCKED SDHS_LOCK_0
59 
60 //*****************************************************************************
61 //
62 // The following are values that can be passed to the param parameter for
63 // functions: SDHS_init(); the msbShift parameter for
64 // functions: SDHS_init().
65 //
66 //*****************************************************************************
67 #define SDHS_NO_SHIFT SHIFT_0
68 #define SDHS_SHIFT_LEFT_1 SHIFT_1
69 #define SDHS_SHIFT_LEFT_2 SHIFT_2
70 
71 //*****************************************************************************
72 //
73 // The following are values that can be passed to the param parameter for
74 // functions: SDHS_init(); the outputBitResolution parameter for
75 // functions: SDHS_init().
76 //
77 //*****************************************************************************
78 #define SDHS_OUTPUT_RESOLUTION_12_BIT OBR_0
79 #define SDHS_OUTPUT_RESOLUTION_13_BIT OBR_1
80 #define SDHS_OUTPUT_RESOLUTION_14_BIT OBR_2
81 
82 //*****************************************************************************
83 //
84 // The following are values that can be passed to the param parameter for
85 // functions: SDHS_init(); the dataFormat parameter for
86 // functions: SDHS_init().
87 //
88 //*****************************************************************************
89 #define SDHS_DATA_FORMAT_TWOS_COMPLEMENT DFMSEL_0
90 #define SDHS_DATA_FORMAT_OFFSET_BINARY DFMSEL_1
91 
92 //*****************************************************************************
93 //
94 // The following are values that can be passed to the param parameter for
95 // functions: SDHS_init(); the dataAlignment parameter for
96 // functions: SDHS_init().
97 //
98 //*****************************************************************************
99 #define SDHS_DATA_ALIGNED_RIGHT DALGN_0
100 #define SDHS_DATA_ALIGNED_LEFT DALGN_1
101 
102 //*****************************************************************************
103 //
104 // The following are values that can be passed to the param parameter for
105 // functions: SDHS_init(); the interruptDelayGeneration parameter for
106 // functions: SDHS_init().
107 //
108 //*****************************************************************************
109 #define SDHS_DELAY_SAMPLES_0 INTDLY_0
110 #define SDHS_DELAY_SAMPLES_1 INTDLY_1
111 #define SDHS_DELAY_SAMPLES_2 INTDLY_2
112 #define SDHS_DELAY_SAMPLES_3 INTDLY_3
113 #define SDHS_DELAY_SAMPLES_4 INTDLY_4
114 #define SDHS_DELAY_SAMPLES_5 INTDLY_5
115 #define SDHS_DELAY_SAMPLES_6 INTDLY_6
116 #define SDHS_DELAY_SAMPLES_7 INTDLY_7
117 
118 //*****************************************************************************
119 //
120 // The following are values that can be passed to the param parameter for
121 // functions: SDHS_init(); the autoSampleStart parameter for
122 // functions: SDHS_init().
123 //
124 //*****************************************************************************
125 #define SDHS_AUTO_SAMPLE_START_ENABLED AUTOSSDIS_0
126 #define SDHS_AUTO_SAMPLE_START_DISABLED AUTOSSDIS_1
127 
128 //*****************************************************************************
129 //
130 // The following are values that can be passed to the param parameter for
131 // functions: SDHS_init(); the oversamplingRate parameter for
132 // functions: SDHS_init().
133 //
134 //*****************************************************************************
135 #define SDHS_OVERSAMPLING_RATE_10 OSR_0
136 #define SDHS_OVERSAMPLING_RATE_20 OSR_1
137 #define SDHS_OVERSAMPLING_RATE_40 OSR_2
138 #define SDHS_OVERSAMPLING_RATE_80 OSR_3
139 #define SDHS_OVERSAMPLING_RATE_160 OSR_4
140 
141 //*****************************************************************************
142 //
143 // The following are values that can be passed to the param parameter for
144 // functions: SDHS_init(); the dataTransferController parameter for
145 // functions: SDHS_init().
146 //
147 //*****************************************************************************
148 #define SDHS_DATA_TRANSFER_CONTROLLER_ON DTCOFF_0
149 #define SDHS_DATA_TRANSFER_CONTROLLER_OFF DTCOFF_1
150 
151 //*****************************************************************************
152 //
153 // The following are values that can be passed to the param parameter for
154 // functions: SDHS_init(); the windowComparator parameter for
155 // functions: SDHS_init().
156 //
157 //*****************************************************************************
158 #define SDHS_WINDOW_COMPARATOR_DISABLE WINCMPEN_0
159 #define SDHS_WINDOW_COMPARATOR_ENABLE WINCMPEN_1
160 
161 //*****************************************************************************
162 //
163 // The following are values that can be passed to the param parameter for
164 // functions: SDHS_init(); the sampleSizeCounting parameter for
165 // functions: SDHS_init().
166 //
167 //*****************************************************************************
168 #define SDHS_SMPSZ_USED SMPCTLOFF_0
169 #define SDHS_SMPSZ_IGNORED SMPCTLOFF_1
170 
171 //*****************************************************************************
172 //
173 // The following are values that can be passed to the optimization parameter for
174 // functions: SDHS_setModularOptimization().
175 //
176 //*****************************************************************************
177 #define SDHS_OPTIMIZE_PLL_OUTPUT_FREQUENCY_77_80MHz 0xC
178 #define SDHS_OPTIMIZE_PLL_OUTPUT_FREQUENCY_74_77MHz 0xD
179 #define SDHS_OPTIMIZE_PLL_OUTPUT_FREQUENCY_71_74MHz 0xE
180 #define SDHS_OPTIMIZE_PLL_OUTPUT_FREQUENCY_68_71MHz 0xF
181 
182 //*****************************************************************************
183 //
184 //! \brief Used in the SDHS_init() function as the param parameter.
185 //
186 //*****************************************************************************
187 typedef struct SDHS_initParam
188 {
189  //! Trigger source select
190  //! \n Valid values are:
191  //! - \b SDHS_REGISTER_CONTROL_MODE [Default]
192  //! - \b SDHS_ASQ_CONTROL_MODE
194  //! Selects MSB shift from filter out
195  //! - \b SDHS_NO_SHIFT [Default]
196  //! - \b SDHS_SHIFT_LEFT_1
197  //! - \b SDHS_SHIFT_LEFT_2
198  uint8_t msbShift;
199  //! Selects the output bit resolution
200  //! \n Valid values are:
201  //! - \b SDHS_OUTPUT_RESOLUTION_12_BIT [Default]
202  //! - \b SDHS_OUTPUT_RESOLUTION_13_BIT
203  //! - \b SDHS_OUTPUT_RESOLUTION_14_BIT
205  //! Selects the data format
206  //! \n Valid values are:
207  //! - \b SDHS_DATA_FORMAT_TWOS_COMPLEMENT [Default]
208  //! - \b SDHS_DATA_FORMAT_OFFSET_BINARY
209  uint16_t dataFormat;
210  //! Selects the data format
211  //! \n Valid values are:
212  //! - \b SDHS_DATA_ALIGNED_RIGHT [Default]
213  //! - \b SDHS_DATA_ALIGNED_LEFT
214  uint16_t dataAlignment;
215  //! Selects the data format
216  //! \n Valid values are:
217  //! - \b SDHS_DELAY_SAMPLES_0
218  //! - \b SDHS_DELAY_SAMPLES_1 [Default]
219  //! - \b SDHS_DELAY_SAMPLES_2
220  //! - \b SDHS_DELAY_SAMPLES_3
221  //! - \b SDHS_DELAY_SAMPLES_4
222  //! - \b SDHS_DELAY_SAMPLES_5
223  //! - \b SDHS_DELAY_SAMPLES_6
224  //! - \b SDHS_DELAY_SAMPLES_7
226  //! Selects the Auto Sample Start
227  //! \n Valid values are:
228  //! - \b SDHS_AUTO_SAMPLE_START_DISABLED [Default]
229  //! - \b SDHS_AUTO_SAMPLE_START_ENABLED
230  uint16_t autoSampleStart;
231  //! Selects the Oversampling Rate
232  //! \n Valid values are:
233  //! - \b SDHS_OVERSAMPLING_RATE_10 [Default]
234  //! - \b SDHS_OVERSAMPLING_RATE_20
235  //! - \b SDHS_OVERSAMPLING_RATE_40
236  //! - \b SDHS_OVERSAMPLING_RATE_80
237  //! - \b SDHS_OVERSAMPLING_RATE_160
239  //! Selects the Data Transfer Controller State
240  //! \n Valid values are:
241  //! - \b SDHS_DATA_TRANSFER_CONTROLLER_ON [Default]
242  //! - \b SDHS_DATA_TRANSFER_CONTROLLER_OFF
244  //! Selects the Window Comparator State
245  //! \n Valid values are:
246  //! - \b SDHS_WINDOW_COMPARATOR_DISABLE [Default]
247  //! - \b SDHS_WINDOW_COMPARATOR_ENABLE
249  //! Selects the Sample Size Counting
250  //! \n Valid values are:
251  //! - \b SDHS_SMPSZ_USED [Default]
252  //! - \b SDHS_SMPSZ_IGNORED
255 
256 //*****************************************************************************
257 //
258 //! \brief Initializes the SDHS module
259 //!
260 //! Initializes the SDHS moduleress
261 //!
262 //! \param baseAddress is the base address of the SDHS module.
263 //!
264 //! \param params is the pointer to the initialization structure
265 //!
266 //! At the end of this call the TRIGEN and SDHS_LOCK bits are reset
267 //!
268 //! \return None
269 //
270 //*****************************************************************************
271 extern void SDHS_init(uint16_t baseAddress, SDHS_initParam *param);
272 
273 //*****************************************************************************
274 //
275 //! \brief Returns the status of the selected interrupt flags.
276 //!
277 //! Returns the status of the selected interrupt flags.
278 //!
279 //! \param baseAddress is the base address of the SDHS module.
280 //! \param interruptMask
281 //! Mask value is the logical OR of any of the following:
282 //! Valid values are:
283 //! - \b SDHS_INCOMPLETE_STOP_INTERRUPT
284 //! - \b SDHS_WINDOW_LOW_INTERRUPT
285 //! - \b SDHS_WINDOW_HIGH_INTERRUPT
286 //! - \b SDHS_DATA_READY_INTERRUPT
287 //! - \b SDHS_START_CONVERSION_TRIGGER_INTERRUPT
288 //! - \b SDHS_ACQUISITION_DONE_INTERRUPT
289 //! - \b SDHS_DATA_OVERFLOW_INTERRUPT
290 //! \return Logical OR of any of above valid values for interruptMask
291 //! \n indicating the status of the masked flags
292 //!
293 //
294 //*****************************************************************************
295 extern uint16_t SDHS_getInterruptStatus(uint16_t baseAddress, uint16_t interruptMask);
296 
297 //*****************************************************************************
298 //
299 //! \brief Returns the mask status of the selected interrupt.
300 //!
301 //! Returns the mask status of the selected interrupt flags.
302 //!
303 //! \param baseAddress is the base address of the SDHS module.
304 //! \param interruptMask
305 //! Mask value is the logical OR of any of the following:
306 //! Valid values are:
307 //! - \b SDHS_INCOMPLETE_STOP_INTERRUPT
308 //! - \b SDHS_WINDOW_LOW_INTERRUPT
309 //! - \b SDHS_WINDOW_HIGH_INTERRUPT
310 //! - \b SDHS_DATA_READY_INTERRUPT
311 //! - \b SDHS_START_CONVERSION_TRIGGER_INTERRUPT
312 //! - \b SDHS_ACQUISITION_DONE_INTERRUPT
313 //! - \b SDHS_DATA_OVERFLOW_INTERRUPT
314 //! \return Logical OR of any of above valid values for interruptMask
315 //! \n indicating the status of the masked flags
316 //!
317 //
318 //*****************************************************************************
319 extern uint16_t SDHS_getInterruptMaskStatus(uint16_t baseAddress, uint16_t interruptMask);
320 
321 //*****************************************************************************
322 //
323 //! \brief Clears SDHS selected interrupt flags.
324 //!
325 //! \param baseAddress is the base address of the SDHS module.
326 //! \param interruptMask
327 //! Mask value is the logical OR of any of the following:
328 //! Valid values are:
329 //! - \b SDHS_INCOMPLETE_STOP_INTERRUPT
330 //! - \b SDHS_WINDOW_LOW_INTERRUPT
331 //! - \b SDHS_WINDOW_HIGH_INTERRUPT
332 //! - \b SDHS_DATA_READY_INTERRUPT
333 //! - \b SDHS_START_CONVERSION_TRIGGER_INTERRUPT
334 //! - \b SDHS_ACQUISITION_DONE_INTERRUPT
335 //! - \b SDHS_DATA_OVERFLOW_INTERRUPT
336 //!
337 //! Modified registers are \b SDHSICR
338 //!
339 //! \return None
340 //
341 //*****************************************************************************
342 extern void SDHS_clearInterrupt(uint16_t baseAddress, uint16_t interruptMask);
343 
344 //*****************************************************************************
345 //
346 //! \brief Enable SDHS selected interrupt masks.
347 //!
348 //! \param baseAddress is the base address of the SDHS module.
349 //! \param interruptMask
350 //! Mask value is the logical OR of any of the following:
351 //! Valid values are:
352 //! - \b SDHS_WINDOW_LOW_INTERRUPT
353 //! - \b SDHS_WINDOW_HIGH_INTERRUPT
354 //! - \b SDHS_DATA_READY_INTERRUPT
355 //! - \b SDHS_START_CONVERSION_TRIGGER_INTERRUPT
356 //! - \b SDHS_ACQUISITION_DONE_INTERRUPT
357 //! - \b SDHS_DATA_OVERFLOW_INTERRUPT
358 //!
359 //! Modified registers are SDHSIMSC
360 //!
361 //! \return None
362 //
363 //*****************************************************************************
364 extern void SDHS_enableInterrupt(uint16_t baseAddress, uint16_t interruptMask);
365 
366 //*****************************************************************************
367 //
368 //! \brief Disable SDHS selected interrupt masks.
369 //!
370 //! \param baseAddress is the base address of the SDHS module.
371 //! \param interruptMask
372 //! Mask value is the logical OR of any of the following:
373 //! Valid values are:
374 //! - \b SDHS_WINDOW_LOW_INTERRUPT
375 //! - \b SDHS_WINDOW_HIGH_INTERRUPT
376 //! - \b SDHS_DATA_READY_INTERRUPT
377 //! - \b SDHS_START_CONVERSION_TRIGGER_INTERRUPT
378 //! - \b SDHS_ACQUISITION_DONE_INTERRUPT
379 //! - \b SDHS_DATA_OVERFLOW_INTERRUPT
380 //!
381 //! Modified registers are SDHSIMSC
382 //!
383 //! \return None
384 //
385 //*****************************************************************************
386 extern void SDHS_disableInterrupt(uint16_t baseAddress, uint16_t interruptMask);
387 
388 //*****************************************************************************
389 //
390 //! \brief Set SDHS selected interrupts.
391 //!
392 //! \param baseAddress is the base address of the SDHS module.
393 //! \param interruptMask
394 //! Mask value is the logical OR of any of the following:
395 //! Valid values are:
396 //! - \b SDHS_WINDOW_LOW_INTERRUPT
397 //! - \b SDHS_WINDOW_HIGH_INTERRUPT
398 //! - \b SDHS_DATA_READY_INTERRUPT
399 //! - \b SDHS_START_CONVERSION_TRIGGER_INTERRUPT
400 //! - \b SDHS_ACQUISITION_DONE_INTERRUPT
401 //! - \b SDHS_DATA_OVERFLOW_INTERRUPT
402 //!
403 //! Modified registers are SDHSISR
404 //!
405 //! \return None
406 //
407 //*****************************************************************************
408 extern void SDHS_setInterrupt(uint16_t baseAddress, uint16_t interruptMask);
409 
410 //*****************************************************************************
411 //
412 //! \brief Sets the high and low threshold for the window comparator feature.
413 //!
414 //! Sets the high and low threshold for the window comparator feature.
415 //!
416 //! \param baseAddress is the base address of the SDHS module.
417 //! \param highThreshold is the upper bound that could trip an interrupt for
418 //! the window comparator.
419 //! \param lowThreshold is the lower bound that could trip on interrupt for the
420 //! window comparator.
421 //!
422 //! \return None
423 //
424 //*****************************************************************************
425 extern void SDHS_setWindowComp(uint16_t baseAddress, uint16_t highThreshold,
426  uint16_t lowThreshold);
427 
428 //*****************************************************************************
429 //
430 //! \brief Sets total sample size
431 //!
432 //! Note that SDHSCTL2.SMPSZ includes the samples skipped by SDHSCTL0.INTDLY:
433 //! - The total number of samples SDHS generates = sampleSize + 1.
434 //! - The number of samples SDHS generates via SDHSDT register = sampleSize - INTDLY + 1.
435 //! If sampleSize - INTDLY + 1 <= 0, then no data output to SDHSDT register
436 //!
437 //! \param baseAddress is the base address of the SDHS module.
438 //! \param sampleSize is the total number of samples SDHS generates + 1
439 //!
440 //! \return None
441 //
442 //*****************************************************************************
443 extern void SDHS_setTotalSampleSize(uint16_t baseAddress, uint16_t sampleSize);
444 
445 //*****************************************************************************
446 //
447 //! \brief Enables the SDHS Trigger.
448 //!
449 //! Enables the SDHS Trigger.
450 //!
451 //! \param baseAddress is the base address of the SDHS module.
452 //!
453 //! \return None
454 //
455 //*****************************************************************************
456 extern void SDHS_enableTrigger(uint16_t baseAddress);
457 
458 //*****************************************************************************
459 //
460 //! \brief Disables the SDHS Trigger.
461 //!
462 //! Disables the SDHS Trigger.
463 //!
464 //! \param baseAddress is the base address of the SDHS module.
465 //!
466 //! \return None
467 //
468 //*****************************************************************************
469 extern void SDHS_disableTrigger(uint16_t baseAddress);
470 
471 //*****************************************************************************
472 //
473 //! \brief Turn On Module
474 //!
475 //! Turn On Module
476 //!
477 //! \param baseAddress is the base address of the SDHS module.
478 //!
479 //! \return None
480 //
481 //*****************************************************************************
482 extern void SDHS_enable(uint16_t baseAddress);
483 
484 //*****************************************************************************
485 //
486 //! \brief Start Conversion
487 //!
488 //! Start Conversion
489 //!
490 //! \param baseAddress is the base address of the SDHS module.
491 //!
492 //! \return None
493 //
494 //*****************************************************************************
495 extern void SDHS_startConversion(uint16_t baseAddress);
496 
497 //*****************************************************************************
498 //
499 //! \brief End Conversion
500 //!
501 //! End Conversion
502 //!
503 //! \param baseAddress is the base address of the SDHS module.
504 //!
505 //! \return None
506 //
507 //*****************************************************************************
508 extern void SDHS_endConversion(uint16_t baseAddress);
509 
510 //*****************************************************************************
511 //
512 //! \brief Set PGA Gain
513 //!
514 //! Set PGA Gain
515 //!
516 //! \param baseAddress is the base address of the SDHS module.
517 //!
518 //! \param gain is the PGA Gain control value
519 //!
520 //! \return None
521 //
522 //*****************************************************************************
523 extern void SDHS_setPGAGain(uint16_t baseAddress, uint16_t gain);
524 
525 //*****************************************************************************
526 //
527 //! \brief Set Modular Optimization
528 //!
529 //! Set Modular Optimization. Upper bound of optimization parameter label is non-inclusive.
530 //! For example, if your PLL output frequency is 77 MHz, you should select
531 //! SDHS_OPTIMIZE_PLL_OUTPUT_FREQUENCY_77_80MHz for optimization parameter.
532 //!
533 //! \param baseAddress is the base address of the SDHS module.
534 //!
535 //! \param optimization is the Modular Optimization value
536 //! Valid values are:
537 //! - \b SDHS_OPTIMIZE_PLL_OUTPUT_FREQUENCY_77_80MHz
538 //! - \b SDHS_OPTIMIZE_PLL_OUTPUT_FREQUENCY_74_77MHz
539 //! - \b SDHS_OPTIMIZE_PLL_OUTPUT_FREQUENCY_71_74MHz
540 //! - \b SDHS_OPTIMIZE_PLL_OUTPUT_FREQUENCY_68_71MHz [Default]
541 //!
542 //! \return None
543 //
544 //*****************************************************************************
545 extern void SDHS_setModularOptimization(uint16_t baseAddress, uint16_t optimization);
546 
547 //*****************************************************************************
548 //
549 //! \brief Turn Off Module
550 //!
551 //! Turn Off Module
552 //!
553 //! \param baseAddress is the base address of the SDHS module.
554 //!
555 //! \return None
556 //
557 //*****************************************************************************
558 extern void SDHS_disable(uint16_t baseAddress);
559 
560 //*****************************************************************************
561 //
562 //! \brief Returns the contents of the Data Conversion Register
563 //!
564 //! Returns the contents of the Data Conversion Register.
565 //! The sign bit is extended up to the bit 15.
566 //!
567 //! \param baseAddress is the base address of the SDHS module.
568 //!
569 //! \return The contents of the Data Conversion Register
570 //
571 //*****************************************************************************
572 extern uint16_t SDHS_getResults(uint16_t baseAddress);
573 
574 //*****************************************************************************
575 //
576 //! \brief Returns the lock status of the registers
577 //!
578 //! Returns the lock status of the registers
579 //!
580 //! \param baseAddress is the base address of the SDHS module.
581 //!
582 //! \return \b SDHS_REGISTERS_LOCKED or \b SDHS_REGISTERS_UNLOCKED
583 //
584 //*****************************************************************************
585 extern uint16_t SDHS_getRegisterLockStatus(uint16_t baseAddress);
586 
587 //*****************************************************************************
588 //
589 //! \brief Sets the DTC destination address
590 //!
591 //! Sets the DTC Destination Address
592 //!
593 //! \param baseAddress is the base address of the SDHS module.
594 //!
595 //! \param address is the destination address to be set
596 //!
597 //! \return None
598 //
599 //*****************************************************************************
600 extern void SDHS_setDTCDestinationAddress(uint16_t baseAddress, uint16_t address);
601 
602 //*****************************************************************************
603 //
604 // The following are deprecated APIs.
605 //
606 //*****************************************************************************
607 #define SDHS_turnOnModuleinStandaloneMode SDHS_enable
608 #define SDHS_turnOffModuleinStandaloneMode SDHS_disable
609 #define SDHS_startConversioninStandaloneMode SDHS_startConversion
610 
611 //*****************************************************************************
612 //
613 // Mark the end of the C bindings section for C++ compilers.
614 //
615 //*****************************************************************************
616 #ifdef __cplusplus
617 }
618 #endif
619 
620 #endif
621 #endif // __MSP430WARE_SDHS_H__
622 
void SDHS_enableTrigger(uint16_t baseAddress)
Enables the SDHS Trigger.
Definition: sdhs.c:77
uint16_t SDHS_getInterruptMaskStatus(uint16_t baseAddress, uint16_t interruptMask)
Returns the mask status of the selected interrupt.
Definition: sdhs.c:102
uint16_t dataAlignment
Definition: sdhs.h:214
uint8_t msbShift
Definition: sdhs.h:198
uint16_t autoSampleStart
Definition: sdhs.h:230
void SDHS_setDTCDestinationAddress(uint16_t baseAddress, uint16_t address)
Sets the DTC destination address.
Definition: sdhs.c:157
void SDHS_setPGAGain(uint16_t baseAddress, uint16_t gain)
Set PGA Gain.
Definition: sdhs.c:126
void SDHS_disableTrigger(uint16_t baseAddress)
Disables the SDHS Trigger.
Definition: sdhs.c:82
void SDHS_disableInterrupt(uint16_t baseAddress, uint16_t interruptMask)
Disable SDHS selected interrupt masks.
Definition: sdhs.c:111
uint16_t sampleSizeCounting
Definition: sdhs.h:253
void SDHS_enableInterrupt(uint16_t baseAddress, uint16_t interruptMask)
Enable SDHS selected interrupt masks.
Definition: sdhs.c:107
uint16_t dataFormat
Definition: sdhs.h:209
void SDHS_endConversion(uint16_t baseAddress)
End Conversion.
Definition: sdhs.c:147
void SDHS_init(uint16_t baseAddress, SDHS_initParam *param)
Initializes the SDHS module.
Definition: sdhs.c:21
uint16_t dataTransferController
Definition: sdhs.h:243
uint16_t SDHS_getRegisterLockStatus(uint16_t baseAddress)
Returns the lock status of the registers.
Definition: sdhs.c:137
uint16_t windowComparator
Definition: sdhs.h:248
Used in the SDHS_init() function as the param parameter.
Definition: sdhs.h:187
uint16_t outputBitResolution
Definition: sdhs.h:204
uint16_t triggerSourceSelect
Definition: sdhs.h:193
void SDHS_startConversion(uint16_t baseAddress)
Start Conversion.
Definition: sdhs.c:142
uint16_t SDHS_getInterruptStatus(uint16_t baseAddress, uint16_t interruptMask)
Returns the status of the selected interrupt flags.
Definition: sdhs.c:97
uint16_t oversamplingRate
Definition: sdhs.h:238
void SDHS_disable(uint16_t baseAddress)
Turn Off Module.
Definition: sdhs.c:92
uint16_t interruptDelayGeneration
Definition: sdhs.h:225
void SDHS_setInterrupt(uint16_t baseAddress, uint16_t interruptMask)
Set SDHS selected interrupts.
Definition: sdhs.c:121
void SDHS_setWindowComp(uint16_t baseAddress, uint16_t highThreshold, uint16_t lowThreshold)
Sets the high and low threshold for the window comparator feature.
Definition: sdhs.c:47
void SDHS_setModularOptimization(uint16_t baseAddress, uint16_t optimization)
Set Modular Optimization.
Definition: sdhs.c:132
void SDHS_clearInterrupt(uint16_t baseAddress, uint16_t interruptMask)
Clears SDHS selected interrupt flags.
Definition: sdhs.c:116
void SDHS_enable(uint16_t baseAddress)
Turn On Module.
Definition: sdhs.c:87
void SDHS_setTotalSampleSize(uint16_t baseAddress, uint16_t sampleSize)
Sets total sample size.
Definition: sdhs.c:65
uint16_t SDHS_getResults(uint16_t baseAddress)
Returns the contents of the Data Conversion Register.
Definition: sdhs.c:152

Copyright 2020, Texas Instruments Incorporated