MSP430 DriverLib for MSP430i2xx Devices  2.91.13.01
sd24.h
1 //*****************************************************************************
2 //
3 // sd24.h - Driver for the SD24 Module.
4 //
5 //*****************************************************************************
6 
7 #ifndef __MSP430WARE_SD24_H__
8 #define __MSP430WARE_SD24_H__
9 
10 #include "inc/hw_memmap.h"
11 
12 #ifdef __MSP430_HAS_SD24__
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 SD24_initConverterAdvanced() function as the param
29 //! parameter.
30 //
31 //*****************************************************************************
33  //! Selects the converter that will be configured. Check check datasheet
34  //! for available converters on device.
35  //! \n Valid values are:
36  //! - \b SD24_CONVERTER_0
37  //! - \b SD24_CONVERTER_1
38  //! - \b SD24_CONVERTER_2
39  //! - \b SD24_CONVERTER_3
40  uint8_t converter;
41  //! Determines whether the converter will do continuous samples or a single
42  //! sample
43  //! \n Valid values are:
44  //! - \b SD24_CONTINUOUS_MODE [Default]
45  //! - \b SD24_SINGLE_MODE
46  uint16_t conversionMode;
47  //! \n Valid values are:
48  //! - \b SD24_NOT_GROUPED
49  //! - \b SD24_GROUPED [Default]
50  uint8_t groupEnable;
51  //! Selects oversampling ratio for the converter
52  //! \n Valid values are:
53  //! - \b SD24_INPUT_CH_ANALOG
54  //! - \b SD24_INPUT_CH_TEMPERATURE
55  uint8_t inputChannel;
56  //! Selects how the data format of the results
57  //! \n Valid values are:
58  //! - \b SD24_DATA_FORMAT_BINARY [Default]
59  //! - \b SD24_DATA_FORMAT_2COMPLEMENT
60  uint8_t dataFormat;
61  //! Selects the delay for the interrupt
62  //! \n Valid values are:
63  //! - \b SD24_FIRST_SAMPLE_INTERRUPT
64  //! - \b SD24_FOURTH_SAMPLE_INTERRUPT [Default]
65  uint8_t interruptDelay;
66  //! Selects oversampling ratio for the converter
67  //! \n Valid values are:
68  //! - \b SD24_OVERSAMPLE_32
69  //! - \b SD24_OVERSAMPLE_64
70  //! - \b SD24_OVERSAMPLE_128
71  //! - \b SD24_OVERSAMPLE_256
72  uint16_t oversampleRatio;
73  //! Selects the gain for the converter
74  //! \n Valid values are:
75  //! - \b SD24_GAIN_1 [Default]
76  //! - \b SD24_GAIN_2
77  //! - \b SD24_GAIN_4
78  //! - \b SD24_GAIN_8
79  //! - \b SD24_GAIN_16
80  uint8_t gain;
82 
83 
84 //*****************************************************************************
85 //
86 // The following are values that can be passed to the referenceSelect parameter
87 // for functions: SD24_init().
88 //
89 //*****************************************************************************
90 #define SD24_REF_EXTERNAL (0x00)
91 #define SD24_REF_INTERNAL (SD24REFS)
92 
93 //*****************************************************************************
94 //
95 // The following are values that can be passed to the param parameter for
96 // functions: SD24_initConverterAdvanced(); the conversionMode parameter for
97 // functions: SD24_initConverter().
98 //
99 //*****************************************************************************
100 #define SD24_CONTINUOUS_MODE (0x00)
101 #define SD24_SINGLE_MODE (SD24SNGL)
102 
103 //*****************************************************************************
104 //
105 // The following are values that can be passed to the converter parameter for
106 // functions: SD24_initConverter(), SD24_setConverterDataFormat(),
107 // SD24_startConverterConversion(), SD24_stopConverterConversion(),
108 // SD24_setInputChannel(), SD24_setInterruptDelay(), SD24_setOversampling(),
109 // SD24_setGain(), SD24_getResults(), SD24_getHighWordResults(),
110 // SD24_enableInterrupt(), SD24_disableInterrupt(), SD24_clearInterrupt(), and
111 // SD24_getInterruptStatus(); the param parameter for functions:
112 // SD24_initConverterAdvanced().
113 //
114 //*****************************************************************************
115 #define SD24_CONVERTER_0 0
116 #define SD24_CONVERTER_1 1
117 #define SD24_CONVERTER_2 2
118 #define SD24_CONVERTER_3 3
119 
120 //*****************************************************************************
121 //
122 // The following are values that can be passed to the oversampleRatio parameter
123 // for functions: SD24_setOversampling(); the param parameter for functions:
124 // SD24_initConverterAdvanced().
125 //
126 //*****************************************************************************
127 #define SD24_OVERSAMPLE_32 (SD24OSR_32)
128 #define SD24_OVERSAMPLE_64 (SD24OSR_64)
129 #define SD24_OVERSAMPLE_128 (SD24OSR_128)
130 #define SD24_OVERSAMPLE_256 (SD24OSR_256)
131 
132 //*****************************************************************************
133 //
134 // The following are values that can be passed to the inputChannel parameter
135 // for functions: SD24_setInputChannel(); the param parameter for functions:
136 // SD24_initConverterAdvanced().
137 //
138 //*****************************************************************************
139 #define SD24_INPUT_CH_ANALOG (SD24INCH_0)
140 #define SD24_INPUT_CH_TEMPERATURE (SD24INCH_6)
141 
142 //*****************************************************************************
143 //
144 // The following are values that can be passed to the dataFormat parameter for
145 // functions: SD24_setConverterDataFormat(); the param parameter for functions:
146 // SD24_initConverterAdvanced().
147 //
148 //*****************************************************************************
149 #define SD24_DATA_FORMAT_BINARY (0x00)
150 #define SD24_DATA_FORMAT_2COMPLEMENT (SD24DF)
151 
152 //*****************************************************************************
153 //
154 // The following are values that can be passed to the gain parameter for
155 // functions: SD24_setGain(); the param parameter for functions:
156 // SD24_initConverterAdvanced().
157 //
158 //*****************************************************************************
159 #define SD24_GAIN_1 (SD24GAIN_1)
160 #define SD24_GAIN_2 (SD24GAIN_2)
161 #define SD24_GAIN_4 (SD24GAIN_4)
162 #define SD24_GAIN_8 (SD24GAIN_8)
163 #define SD24_GAIN_16 (SD24GAIN_16)
164 
165 //*****************************************************************************
166 //
167 // The following are values that can be passed to the interruptDelay parameter
168 // for functions: SD24_setInterruptDelay(); the param parameter for functions:
169 // SD24_initConverterAdvanced().
170 //
171 //*****************************************************************************
172 #define SD24_FIRST_SAMPLE_INTERRUPT (SD24INTDLY)
173 #define SD24_FOURTH_SAMPLE_INTERRUPT (0x00)
174 
175 //*****************************************************************************
176 //
177 // The following are values that can be passed to the param parameter for
178 // functions: SD24_initConverterAdvanced().
179 //
180 //*****************************************************************************
181 #define SD24_NOT_GROUPED (0x00)
182 #define SD24_GROUPED (SD24GRP)
183 
184 //*****************************************************************************
185 //
186 // The following are values that can be passed to the mask parameter for
187 // functions: SD24_enableInterrupt(), SD24_disableInterrupt(),
188 // SD24_clearInterrupt(), and SD24_getInterruptStatus() as well as returned by
189 // the SD24_getInterruptStatus() function.
190 //
191 //*****************************************************************************
192 #define SD24_CONVERTER_INTERRUPT (SD24IFG)
193 #define SD24_CONVERTER_OVERFLOW_INTERRUPT (SD24OVIFG)
194 
195 //*****************************************************************************
196 //
197 // Prototypes for the APIs.
198 //
199 //*****************************************************************************
200 
201 //*****************************************************************************
202 //
203 //! \brief Initializes the SD24 Module
204 //!
205 //! This function initializes the SD24 module sigma-delta analog-to-digital
206 //! conversions. Specifically the function sets up the clock source for the
207 //! SD24 core to use for conversions. Upon completion of the initialization the
208 //! SD24 interrupt registers will be reset and the given parameters will be
209 //! set. The converter configuration settings are independent of this function.
210 //!
211 //! \param baseAddress is the base address of the SD24 module.
212 //! \param referenceSelect selects the reference source for the SD24 core
213 //! Valid values are:
214 //! - \b SD24_REF_EXTERNAL [Default]
215 //! - \b SD24_REF_INTERNAL
216 //! \n Modified bits are \b SD24REFS of \b SD24BCTL0 register.
217 //!
218 //! \return None
219 //
220 //*****************************************************************************
221 extern void SD24_init(uint16_t baseAddress,
222  uint8_t referenceSelect);
223 
224 //*****************************************************************************
225 //
226 //! \brief Configure SD24 converter
227 //!
228 //! This function initializes a converter of the SD24 module. Upon completion
229 //! the converter will be ready for a conversion and can be started with the
230 //! SD24_startConverterConversion(). Additional configuration such as data
231 //! format can be configured in SD24_setConverterDataFormat().
232 //!
233 //! \param baseAddress is the base address of the SD24 module.
234 //! \param converter selects the converter that will be configured. Check check
235 //! datasheet for available converters on device.
236 //! Valid values are:
237 //! - \b SD24_CONVERTER_0
238 //! - \b SD24_CONVERTER_1
239 //! - \b SD24_CONVERTER_2
240 //! - \b SD24_CONVERTER_3
241 //! \param conversionMode determines whether the converter will do continuous
242 //! samples or a single sample
243 //! Valid values are:
244 //! - \b SD24_CONTINUOUS_MODE [Default]
245 //! - \b SD24_SINGLE_MODE
246 //! \n Modified bits are \b SD24SNGL of \b SD24CCTLx register.
247 //!
248 //! \return None
249 //
250 //*****************************************************************************
251 extern void SD24_initConverter(uint16_t baseAddress,
252  uint16_t converter,
253  uint16_t conversionMode);
254 
255 //*****************************************************************************
256 //
257 //! \brief Configure SD24 converter - Advanced Configure
258 //!
259 //! This function initializes a converter of the SD24 module. Upon completion
260 //! the converter will be ready for a conversion and can be started with the
261 //! SD24_startConverterConversion().
262 //!
263 //! \param baseAddress is the base address of the SD24 module.
264 //! \param param is the pointer to struct for converter advanced configuration.
265 //!
266 //! \return None
267 //
268 //*****************************************************************************
269 extern void SD24_initConverterAdvanced(uint16_t baseAddress,
271 
272 //*****************************************************************************
273 //
274 //! \brief Set SD24 converter data format
275 //!
276 //! This function sets the converter format so that the resulting data can be
277 //! viewed in either binary or 2's complement.
278 //!
279 //! \param baseAddress is the base address of the SD24 module.
280 //! \param converter selects the converter that will be configured. Check check
281 //! datasheet for available converters on device.
282 //! Valid values are:
283 //! - \b SD24_CONVERTER_0
284 //! - \b SD24_CONVERTER_1
285 //! - \b SD24_CONVERTER_2
286 //! - \b SD24_CONVERTER_3
287 //! \param dataFormat selects how the data format of the results
288 //! Valid values are:
289 //! - \b SD24_DATA_FORMAT_BINARY [Default]
290 //! - \b SD24_DATA_FORMAT_2COMPLEMENT
291 //! \n Modified bits are \b SD24DFx of \b SD24CCTLx register.
292 //!
293 //! \return None
294 //
295 //*****************************************************************************
296 extern void SD24_setConverterDataFormat(uint16_t baseAddress,
297  uint16_t converter,
298  uint16_t dataFormat);
299 
300 //*****************************************************************************
301 //
302 //! \brief Start Conversion for Converter
303 //!
304 //! This function starts a single converter.
305 //!
306 //! \param baseAddress is the base address of the SD24 module.
307 //! \param converter selects the converter that will be started
308 //! Valid values are:
309 //! - \b SD24_CONVERTER_0
310 //! - \b SD24_CONVERTER_1
311 //! - \b SD24_CONVERTER_2
312 //! - \b SD24_CONVERTER_3
313 //! \n Modified bits are \b SD24SC of \b SD24CCTLx register.
314 //!
315 //! \return None
316 //
317 //*****************************************************************************
318 extern void SD24_startConverterConversion(uint16_t baseAddress,
319  uint8_t converter);
320 
321 //*****************************************************************************
322 //
323 //! \brief Stop Conversion for Converter
324 //!
325 //! This function stops a single converter.
326 //!
327 //! \param baseAddress is the base address of the SD24 module.
328 //! \param converter selects the converter that will be stopped
329 //! Valid values are:
330 //! - \b SD24_CONVERTER_0
331 //! - \b SD24_CONVERTER_1
332 //! - \b SD24_CONVERTER_2
333 //! - \b SD24_CONVERTER_3
334 //! \n Modified bits are \b SD24SC of \b SD24CCTLx register.
335 //!
336 //! \return None
337 //
338 //*****************************************************************************
339 extern void SD24_stopConverterConversion(uint16_t baseAddress,
340  uint8_t converter);
341 
342 //*****************************************************************************
343 //
344 //! \brief Configures the input channel
345 //!
346 //! This function configures the input channel. For MSP430i2xx devices, users
347 //! can choose either analog input or internal temperature input.
348 //!
349 //! \param baseAddress is the base address of the SD24 module.
350 //! \param converter selects the converter that will be configured
351 //! Valid values are:
352 //! - \b SD24_CONVERTER_0
353 //! - \b SD24_CONVERTER_1
354 //! - \b SD24_CONVERTER_2
355 //! - \b SD24_CONVERTER_3
356 //! \param inputChannel selects oversampling ratio for the converter
357 //! Valid values are:
358 //! - \b SD24_INPUT_CH_ANALOG
359 //! - \b SD24_INPUT_CH_TEMPERATURE
360 //! \n Modified bits are \b SD24INCHx of \b SD24INCTLx register.
361 //!
362 //! \return None
363 //
364 //*****************************************************************************
365 extern void SD24_setInputChannel(uint16_t baseAddress,
366  uint8_t converter,
367  uint8_t inputChannel);
368 
369 //*****************************************************************************
370 //
371 //! \brief Configures the delay for an interrupt to trigger
372 //!
373 //! This function configures the delay for the first interrupt service request
374 //! for the corresponding converter. This feature delays the interrupt request
375 //! for a completed conversion by up to four conversion cycles allowing the
376 //! digital filter to settle prior to generating an interrupt request.
377 //!
378 //! \param baseAddress is the base address of the SD24 module.
379 //! \param converter selects the converter that will be stopped
380 //! Valid values are:
381 //! - \b SD24_CONVERTER_0
382 //! - \b SD24_CONVERTER_1
383 //! - \b SD24_CONVERTER_2
384 //! - \b SD24_CONVERTER_3
385 //! \param interruptDelay selects the delay for the interrupt
386 //! Valid values are:
387 //! - \b SD24_FIRST_SAMPLE_INTERRUPT
388 //! - \b SD24_FOURTH_SAMPLE_INTERRUPT [Default]
389 //! \n Modified bits are \b SD24INTDLYx of \b SD24INCTLx register.
390 //!
391 //! \return None
392 //
393 //*****************************************************************************
394 extern void SD24_setInterruptDelay(uint16_t baseAddress,
395  uint8_t converter,
396  uint8_t interruptDelay);
397 
398 //*****************************************************************************
399 //
400 //! \brief Configures the oversampling ratio for a converter
401 //!
402 //! This function configures the oversampling ratio for a given converter.
403 //!
404 //! \param baseAddress is the base address of the SD24 module.
405 //! \param converter selects the converter that will be configured
406 //! Valid values are:
407 //! - \b SD24_CONVERTER_0
408 //! - \b SD24_CONVERTER_1
409 //! - \b SD24_CONVERTER_2
410 //! - \b SD24_CONVERTER_3
411 //! \param oversampleRatio selects oversampling ratio for the converter
412 //! Valid values are:
413 //! - \b SD24_OVERSAMPLE_32
414 //! - \b SD24_OVERSAMPLE_64
415 //! - \b SD24_OVERSAMPLE_128
416 //! - \b SD24_OVERSAMPLE_256
417 //! \n Modified bits are \b SD24OSRx of \b SD24OSRx register.
418 //!
419 //! \return None
420 //
421 //*****************************************************************************
422 extern void SD24_setOversampling(uint16_t baseAddress,
423  uint8_t converter,
424  uint16_t oversampleRatio);
425 
426 //*****************************************************************************
427 //
428 //! \brief Configures the gain for the converter
429 //!
430 //! This function configures the gain for a single converter.
431 //!
432 //! \param baseAddress is the base address of the SD24 module.
433 //! \param converter selects the converter that will be configured
434 //! Valid values are:
435 //! - \b SD24_CONVERTER_0
436 //! - \b SD24_CONVERTER_1
437 //! - \b SD24_CONVERTER_2
438 //! - \b SD24_CONVERTER_3
439 //! \param gain selects the gain for the converter
440 //! Valid values are:
441 //! - \b SD24_GAIN_1 [Default]
442 //! - \b SD24_GAIN_2
443 //! - \b SD24_GAIN_4
444 //! - \b SD24_GAIN_8
445 //! - \b SD24_GAIN_16
446 //! \n Modified bits are \b SD24GAINx of \b SD24INCTLx register.
447 //!
448 //! \return None
449 //
450 //*****************************************************************************
451 extern void SD24_setGain(uint16_t baseAddress,
452  uint8_t converter,
453  uint8_t gain);
454 
455 //*****************************************************************************
456 //
457 //! \brief Returns the results for a converter
458 //!
459 //! This function gets the results from the SD24MEMx register for upper 16-bit
460 //! and lower 16-bit results, and concatenates them to form a long. The actual
461 //! result is a maximum 24 bits.
462 //!
463 //! \param baseAddress is the base address of the SD24 module.
464 //! \param converter selects the converter who's results will be returned
465 //! Valid values are:
466 //! - \b SD24_CONVERTER_0
467 //! - \b SD24_CONVERTER_1
468 //! - \b SD24_CONVERTER_2
469 //! - \b SD24_CONVERTER_3
470 //!
471 //! \return Result of conversion
472 //
473 //*****************************************************************************
474 extern uint32_t SD24_getResults(uint16_t baseAddress,
475  uint8_t converter);
476 
477 //*****************************************************************************
478 //
479 //! \brief Returns the high word results for a converter
480 //!
481 //! This function gets the upper 16-bit result from the SD24MEMx register and
482 //! returns it.
483 //!
484 //! \param baseAddress is the base address of the SD24 module.
485 //! \param converter selects the converter who's results will be returned
486 //! Valid values are:
487 //! - \b SD24_CONVERTER_0
488 //! - \b SD24_CONVERTER_1
489 //! - \b SD24_CONVERTER_2
490 //! - \b SD24_CONVERTER_3
491 //!
492 //! \return Result of conversion
493 //
494 //*****************************************************************************
495 extern uint16_t SD24_getHighWordResults(uint16_t baseAddress,
496  uint8_t converter);
497 
498 //*****************************************************************************
499 //
500 //! \brief Enables interrupts for the SD24 Module
501 //!
502 //! This function enables interrupts for the SD24 module. Does not clear
503 //! interrupt flags.
504 //!
505 //! \param baseAddress is the base address of the SD24 module.
506 //! \param converter is the selected converter.
507 //! Valid values are:
508 //! - \b SD24_CONVERTER_0
509 //! - \b SD24_CONVERTER_1
510 //! - \b SD24_CONVERTER_2
511 //! - \b SD24_CONVERTER_3
512 //! \param mask is the bit mask of the converter interrupt sources to be
513 //! enabled.
514 //! Mask value is the logical OR of any of the following:
515 //! - \b SD24_CONVERTER_INTERRUPT
516 //! - \b SD24_CONVERTER_OVERFLOW_INTERRUPT
517 //! \n Modified bits are \b SD24OVIEx of \b SD24BIE register.
518 //!
519 //! \return None
520 //
521 //*****************************************************************************
522 extern void SD24_enableInterrupt(uint16_t baseAddress,
523  uint8_t converter,
524  uint16_t mask);
525 
526 //*****************************************************************************
527 //
528 //! \brief Disables interrupts for the SD24 Module
529 //!
530 //! This function disables interrupts for the SD24 module.
531 //!
532 //! \param baseAddress is the base address of the SD24 module.
533 //! \param converter is the selected converter.
534 //! Valid values are:
535 //! - \b SD24_CONVERTER_0
536 //! - \b SD24_CONVERTER_1
537 //! - \b SD24_CONVERTER_2
538 //! - \b SD24_CONVERTER_3
539 //! \param mask is the bit mask of the converter interrupt sources to be
540 //! disabled.
541 //! Mask value is the logical OR of any of the following:
542 //! - \b SD24_CONVERTER_INTERRUPT
543 //! - \b SD24_CONVERTER_OVERFLOW_INTERRUPT
544 //! \n Modified bits are \b SD24OVIEx of \b SD24BIE register.
545 //!
546 //! Modified bits of \b SD24BIE register.
547 //!
548 //! \return None
549 //
550 //*****************************************************************************
551 extern void SD24_disableInterrupt(uint16_t baseAddress,
552  uint8_t converter,
553  uint16_t mask);
554 
555 //*****************************************************************************
556 //
557 //! \brief Clears interrupts for the SD24 Module
558 //!
559 //! This function clears interrupt flags for the SD24 module.
560 //!
561 //! \param baseAddress is the base address of the SD24 module.
562 //! \param converter is the selected converter.
563 //! Valid values are:
564 //! - \b SD24_CONVERTER_0
565 //! - \b SD24_CONVERTER_1
566 //! - \b SD24_CONVERTER_2
567 //! - \b SD24_CONVERTER_3
568 //! \param mask is the bit mask of the converter interrupt sources to clear.
569 //! Mask value is the logical OR of any of the following:
570 //! - \b SD24_CONVERTER_INTERRUPT
571 //! - \b SD24_CONVERTER_OVERFLOW_INTERRUPT
572 //! \n Modified bits are \b SD24OVIFGx of \b SD24BIFG register.
573 //!
574 //! \return None
575 //
576 //*****************************************************************************
577 extern void SD24_clearInterrupt(uint16_t baseAddress,
578  uint8_t converter,
579  uint16_t mask);
580 
581 //*****************************************************************************
582 //
583 //! \brief Returns the interrupt status for the SD24 Module
584 //!
585 //! This function returns interrupt flag statuses for the SD24 module.
586 //!
587 //! \param baseAddress is the base address of the SD24 module.
588 //! \param converter is the selected converter.
589 //! Valid values are:
590 //! - \b SD24_CONVERTER_0
591 //! - \b SD24_CONVERTER_1
592 //! - \b SD24_CONVERTER_2
593 //! - \b SD24_CONVERTER_3
594 //! \param mask is the bit mask of the converter interrupt sources to return.
595 //! Mask value is the logical OR of any of the following:
596 //! - \b SD24_CONVERTER_INTERRUPT
597 //! - \b SD24_CONVERTER_OVERFLOW_INTERRUPT
598 //!
599 //! \return Logical OR of any of the following:
600 //! - \b SD24_CONVERTER_INTERRUPT
601 //! - \b SD24_CONVERTER_OVERFLOW_INTERRUPT
602 //! \n indicating the status of the masked interrupts
603 //
604 //*****************************************************************************
605 extern uint16_t SD24_getInterruptStatus(uint16_t baseAddress,
606  uint8_t converter,
607  uint16_t mask);
608 
609 //*****************************************************************************
610 //
611 // Mark the end of the C bindings section for C++ compilers.
612 //
613 //*****************************************************************************
614 #ifdef __cplusplus
615 }
616 #endif
617 
618 #endif
619 #endif // __MSP430WARE_SD24_H__
uint16_t conversionMode
Definition: sd24.h:46
uint8_t inputChannel
Definition: sd24.h:55
void SD24_setConverterDataFormat(uint16_t baseAddress, uint16_t converter, uint16_t dataFormat)
Set SD24 converter data format.
Definition: sd24.c:73
uint8_t dataFormat
Definition: sd24.h:60
uint8_t interruptDelay
Definition: sd24.h:65
void SD24_disableInterrupt(uint16_t baseAddress, uint8_t converter, uint16_t mask)
Disables interrupts for the SD24 Module.
Definition: sd24.c:247
void SD24_stopConverterConversion(uint16_t baseAddress, uint8_t converter)
Stop Conversion for Converter.
Definition: sd24.c:101
uint8_t groupEnable
Definition: sd24.h:50
void SD24_setGain(uint16_t baseAddress, uint8_t converter, uint8_t gain)
Configures the gain for the converter.
Definition: sd24.c:166
void SD24_setOversampling(uint16_t baseAddress, uint8_t converter, uint16_t oversampleRatio)
Configures the oversampling ratio for a converter.
Definition: sd24.c:146
uint8_t converter
Definition: sd24.h:40
uint16_t SD24_getHighWordResults(uint16_t baseAddress, uint8_t converter)
Returns the high word results for a converter.
Definition: sd24.c:213
uint8_t gain
Definition: sd24.h:80
void SD24_initConverter(uint16_t baseAddress, uint16_t converter, uint16_t conversionMode)
Configure SD24 converter.
Definition: sd24.c:37
uint16_t SD24_getInterruptStatus(uint16_t baseAddress, uint8_t converter, uint16_t mask)
Returns the interrupt status for the SD24 Module.
Definition: sd24.c:278
void SD24_setInputChannel(uint16_t baseAddress, uint8_t converter, uint8_t inputChannel)
Configures the input channel.
Definition: sd24.c:115
uint16_t oversampleRatio
Definition: sd24.h:72
Used in the SD24_initConverterAdvanced() function as the param parameter.
Definition: sd24.h:32
void SD24_setInterruptDelay(uint16_t baseAddress, uint8_t converter, uint8_t interruptDelay)
Configures the delay for an interrupt to trigger.
Definition: sd24.c:126
void SD24_init(uint16_t baseAddress, uint8_t referenceSelect)
Initializes the SD24 Module.
Definition: sd24.c:21
void SD24_startConverterConversion(uint16_t baseAddress, uint8_t converter)
Start Conversion for Converter.
Definition: sd24.c:86
void SD24_enableInterrupt(uint16_t baseAddress, uint8_t converter, uint16_t mask)
Enables interrupts for the SD24 Module.
Definition: sd24.c:226
void SD24_initConverterAdvanced(uint16_t baseAddress, SD24_initConverterAdvancedParam *param)
Configure SD24 converter - Advanced Configure.
Definition: sd24.c:51
uint32_t SD24_getResults(uint16_t baseAddress, uint8_t converter)
Returns the results for a converter.
Definition: sd24.c:176
void SD24_clearInterrupt(uint16_t baseAddress, uint8_t converter, uint16_t mask)
Clears interrupts for the SD24 Module.
Definition: sd24.c:265

Copyright 2020, Texas Instruments Incorporated