2020-2021 Sunseeker Telemetry and Lighting System
timer_d.h
Go to the documentation of this file.
1 //*****************************************************************************
2 //
3 // timer_d.h - Driver for the TIMER_D Module.
4 //
5 //*****************************************************************************
6 
7 #ifndef __MSP430WARE_TIMER_D_H__
8 #define __MSP430WARE_TIMER_D_H__
9 
10 #include "inc/hw_memmap.h"
11 
12 #ifdef __MSP430_HAS_TxD7__
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 // The following is a parameter used for Timer_D_getCounterValue that
29 // determines the maximum difference in counts of the TDxR register for a
30 // majority vote.
31 //
32 //*****************************************************************************
33 #define TIMER_D_THRESHOLD 50
34 
35 //*****************************************************************************
36 //
38 //
39 //*****************************************************************************
40 typedef struct Timer_D_initUpModeParam {
47  uint16_t clockSource;
70  uint16_t clockSourceDivider;
76  uint16_t clockingMode;
79  uint16_t timerPeriod;
84  uint16_t timerInterruptEnable_TDIE;
89  uint16_t captureCompareInterruptEnable_CCR0_CCIE;
95  uint16_t timerClear;
96 } Timer_D_initUpModeParam;
97 
98 //*****************************************************************************
99 //
102 //
103 //*****************************************************************************
104 typedef struct Timer_D_initCompareModeParam {
114  uint16_t compareRegister;
119  uint16_t compareInterruptEnable;
130  uint16_t compareOutputMode;
132  uint16_t compareValue;
133 } Timer_D_initCompareModeParam;
134 
135 //*****************************************************************************
136 //
139 //
140 //*****************************************************************************
141 typedef struct Timer_D_initContinuousModeParam {
148  uint16_t clockSource;
171  uint16_t clockSourceDivider;
177  uint16_t clockingMode;
182  uint16_t timerInterruptEnable_TDIE;
188  uint16_t timerClear;
189 } Timer_D_initContinuousModeParam;
190 
191 //*****************************************************************************
192 //
195 //
196 //*****************************************************************************
197 typedef struct Timer_D_initHighResGeneratorInRegulatedModeParam {
204  uint16_t clockSource;
227  uint16_t clockSourceDivider;
233  uint16_t clockingMode;
238  uint8_t highResClockMultiplyFactor;
245  uint8_t highResClockDivider;
246 } Timer_D_initHighResGeneratorInRegulatedModeParam;
247 
248 //*****************************************************************************
249 //
252 //
253 //*****************************************************************************
254 typedef struct Timer_D_initUpDownModeParam {
261  uint16_t clockSource;
284  uint16_t clockSourceDivider;
290  uint16_t clockingMode;
292  uint16_t timerPeriod;
297  uint16_t timerInterruptEnable_TDIE;
302  uint16_t captureCompareInterruptEnable_CCR0_CCIE;
308  uint16_t timerClear;
309 } Timer_D_initUpDownModeParam;
310 
311 //*****************************************************************************
312 //
315 //
316 //*****************************************************************************
317 typedef struct Timer_D_combineTDCCRToOutputPWMParam {
324  uint16_t clockSource;
347  uint16_t clockSourceDivider;
353  uint16_t clockingMode;
355  uint16_t timerPeriod;
361  uint16_t combineCCRRegistersCombination;
372  uint16_t compareOutputMode;
374  uint16_t dutyCycle1;
376  uint16_t dutyCycle2;
377 } Timer_D_combineTDCCRToOutputPWMParam;
378 
379 //*****************************************************************************
380 //
383 //
384 //*****************************************************************************
385 typedef struct Timer_D_initCaptureModeParam {
396  uint16_t captureRegister;
403  uint16_t captureMode;
410  uint16_t captureInputSelect;
415  uint16_t synchronizeCaptureSource;
420  uint16_t captureInterruptEnable;
431  uint16_t captureOutputMode;
436  uint8_t channelCaptureMode;
437 } Timer_D_initCaptureModeParam;
438 
439 //*****************************************************************************
440 //
442 //
443 //*****************************************************************************
444 typedef struct Timer_D_outputPWMParam {
451  uint16_t clockSource;
474  uint16_t clockSourceDivider;
480  uint16_t clockingMode;
482  uint16_t timerPeriod;
492  uint16_t compareRegister;
503  uint16_t compareOutputMode;
505  uint16_t dutyCycle;
506 } Timer_D_outputPWMParam;
507 
508 
509 //*****************************************************************************
510 //
511 // The following are values that can be passed to the param parameter for
512 // functions: Timer_D_initContinuousMode(), Timer_D_initUpMode(),
513 // Timer_D_initUpDownMode(), Timer_D_outputPWM(),
514 // Timer_D_initHighResGeneratorInRegulatedMode(), and
515 // Timer_D_combineTDCCRToOutputPWM().
516 //
517 //*****************************************************************************
518 #define TIMER_D_CLOCKSOURCE_DIVIDER_1 0x00
519 #define TIMER_D_CLOCKSOURCE_DIVIDER_2 0x08
520 #define TIMER_D_CLOCKSOURCE_DIVIDER_3 0x02
521 #define TIMER_D_CLOCKSOURCE_DIVIDER_4 0x10
522 #define TIMER_D_CLOCKSOURCE_DIVIDER_5 0x04
523 #define TIMER_D_CLOCKSOURCE_DIVIDER_6 0x05
524 #define TIMER_D_CLOCKSOURCE_DIVIDER_7 0x06
525 #define TIMER_D_CLOCKSOURCE_DIVIDER_8 0x18
526 #define TIMER_D_CLOCKSOURCE_DIVIDER_10 0x0C
527 #define TIMER_D_CLOCKSOURCE_DIVIDER_12 0x0D
528 #define TIMER_D_CLOCKSOURCE_DIVIDER_14 0x0E
529 #define TIMER_D_CLOCKSOURCE_DIVIDER_16 0x0F
530 #define TIMER_D_CLOCKSOURCE_DIVIDER_20 0x14
531 #define TIMER_D_CLOCKSOURCE_DIVIDER_24 0x15
532 #define TIMER_D_CLOCKSOURCE_DIVIDER_28 0x16
533 #define TIMER_D_CLOCKSOURCE_DIVIDER_32 0x17
534 #define TIMER_D_CLOCKSOURCE_DIVIDER_40 0x1C
535 #define TIMER_D_CLOCKSOURCE_DIVIDER_48 0x1D
536 #define TIMER_D_CLOCKSOURCE_DIVIDER_56 0x1E
537 #define TIMER_D_CLOCKSOURCE_DIVIDER_64 0x1F
538 
539 //*****************************************************************************
540 //
541 // The following are values that can be passed to the timerMode parameter for
542 // functions: Timer_D_startCounter().
543 //
544 //*****************************************************************************
545 #define TIMER_D_STOP_MODE MC_0
546 #define TIMER_D_UP_MODE MC_1
547 #define TIMER_D_CONTINUOUS_MODE MC_2
548 #define TIMER_D_UPDOWN_MODE MC_3
549 
550 //*****************************************************************************
551 //
552 // The following are values that can be passed to the param parameter for
553 // functions: Timer_D_initContinuousMode(), Timer_D_initUpMode(), and
554 // Timer_D_initUpDownMode().
555 //
556 //*****************************************************************************
557 #define TIMER_D_DO_CLEAR TDCLR
558 #define TIMER_D_SKIP_CLEAR 0x00
559 
560 //*****************************************************************************
561 //
562 // The following are values that can be passed to the param parameter for
563 // functions: Timer_D_initContinuousMode(), Timer_D_initUpMode(),
564 // Timer_D_initUpDownMode(), Timer_D_outputPWM(),
565 // Timer_D_initHighResGeneratorInRegulatedMode(), and
566 // Timer_D_combineTDCCRToOutputPWM().
567 //
568 //*****************************************************************************
569 #define TIMER_D_CLOCKSOURCE_EXTERNAL_TDCLK TDSSEL__TACLK
570 #define TIMER_D_CLOCKSOURCE_ACLK TDSSEL__ACLK
571 #define TIMER_D_CLOCKSOURCE_SMCLK TDSSEL__SMCLK
572 #define TIMER_D_CLOCKSOURCE_INVERTED_EXTERNAL_TDCLK TDSSEL__INCLK
573 
574 //*****************************************************************************
575 //
576 // The following are values that can be passed to the param parameter for
577 // functions: Timer_D_initContinuousMode(), Timer_D_initUpMode(),
578 // Timer_D_initUpDownMode(), Timer_D_outputPWM(),
579 // Timer_D_initHighResGeneratorInRegulatedMode(), and
580 // Timer_D_combineTDCCRToOutputPWM().
581 //
582 //*****************************************************************************
583 #define TIMER_D_CLOCKINGMODE_EXTERNAL_CLOCK TDCLKM_0
584 #define TIMER_D_CLOCKINGMODE_HIRES_LOCAL_CLOCK TDCLKM_1
585 #define TIMER_D_CLOCKINGMODE_AUXILIARY_CLK TDCLKM_2
586 
587 //*****************************************************************************
588 //
589 // The following are values that can be passed to the param parameter for
590 // functions: Timer_D_initContinuousMode(), Timer_D_initUpMode(), and
591 // Timer_D_initUpDownMode().
592 //
593 //*****************************************************************************
594 #define TIMER_D_TDIE_INTERRUPT_ENABLE TDIE
595 #define TIMER_D_TDIE_INTERRUPT_DISABLE 0x00
596 
597 //*****************************************************************************
598 //
599 // The following are values that can be passed to the param parameter for
600 // functions: Timer_D_initCaptureMode().
601 //
602 //*****************************************************************************
603 #define TIMER_D_CAPTURE_INTERRUPT_ENABLE TDIE
604 #define TIMER_D_CAPTURE_INTERRUPT_DISABLE 0x00
605 
606 //*****************************************************************************
607 //
608 // The following are values that can be passed to the param parameter for
609 // functions: Timer_D_initUpMode(), and Timer_D_initUpDownMode().
610 //
611 //*****************************************************************************
612 #define TIMER_D_CCIE_CCR0_INTERRUPT_ENABLE CCIE
613 #define TIMER_D_CCIE_CCR0_INTERRUPT_DISABLE 0x00
614 
615 //*****************************************************************************
616 //
617 // The following are values that can be passed to the param parameter for
618 // functions: Timer_D_initCaptureMode().
619 //
620 //*****************************************************************************
621 #define TIMER_D_SINGLE_CAPTURE_MODE 0x00
622 #define TIMER_D_DUAL_CAPTURE_MODE 0x01
623 
624 //*****************************************************************************
625 //
626 // The following are values that can be passed to the param parameter for
627 // functions: Timer_D_initCaptureMode().
628 //
629 //*****************************************************************************
630 #define TIMER_D_CAPTURE_INPUTSELECT_CCIxA CCIS_0
631 #define TIMER_D_CAPTURE_INPUTSELECT_CCIxB CCIS_1
632 #define TIMER_D_CAPTURE_INPUTSELECT_GND CCIS_2
633 #define TIMER_D_CAPTURE_INPUTSELECT_Vcc CCIS_3
634 
635 //*****************************************************************************
636 //
637 // The following are values that can be passed to the compareOutputMode
638 // parameter for functions: Timer_D_setOutputMode(); the param parameter for
639 // functions: Timer_D_initCaptureMode(), Timer_D_initCompareMode(),
640 // Timer_D_outputPWM(), and Timer_D_combineTDCCRToOutputPWM().
641 //
642 //*****************************************************************************
643 #define TIMER_D_OUTPUTMODE_OUTBITVALUE OUTMOD_0
644 #define TIMER_D_OUTPUTMODE_SET OUTMOD_1
645 #define TIMER_D_OUTPUTMODE_TOGGLE_RESET OUTMOD_2
646 #define TIMER_D_OUTPUTMODE_SET_RESET OUTMOD_3
647 #define TIMER_D_OUTPUTMODE_TOGGLE OUTMOD_4
648 #define TIMER_D_OUTPUTMODE_RESET OUTMOD_5
649 #define TIMER_D_OUTPUTMODE_TOGGLE_SET OUTMOD_6
650 #define TIMER_D_OUTPUTMODE_RESET_SET OUTMOD_7
651 
652 //*****************************************************************************
653 //
654 // The following are values that can be passed to the compareRegister parameter
655 // for functions: Timer_D_setCompareValue(),
656 // Timer_D_initCompareLatchLoadEvent(), and Timer_D_setOutputMode(); the
657 // captureCompareRegister parameter for functions:
658 // Timer_D_enableCaptureCompareInterrupt(),
659 // Timer_D_disableCaptureCompareInterrupt(),
660 // Timer_D_getCaptureCompareInterruptStatus(),
661 // Timer_D_getSynchronizedCaptureCompareInput(),
662 // Timer_D_getOutputForOutputModeOutBitValue(),
663 // Timer_D_getCaptureCompareCount(), Timer_D_getCaptureCompareLatchCount(),
664 // Timer_D_getCaptureCompareInputSignal(),
665 // Timer_D_setOutputForOutputModeOutBitValue(), and
666 // Timer_D_clearCaptureCompareInterrupt(); the param parameter for functions:
667 // Timer_D_initCaptureMode(), Timer_D_outputPWM(), and
668 // Timer_D_initCompareMode().
669 //
670 //*****************************************************************************
671 #define TIMER_D_CAPTURECOMPARE_REGISTER_0 0x08
672 #define TIMER_D_CAPTURECOMPARE_REGISTER_1 0x0E
673 #define TIMER_D_CAPTURECOMPARE_REGISTER_2 0x14
674 #define TIMER_D_CAPTURECOMPARE_REGISTER_3 0x1A
675 #define TIMER_D_CAPTURECOMPARE_REGISTER_4 0x20
676 #define TIMER_D_CAPTURECOMPARE_REGISTER_5 0x28
677 #define TIMER_D_CAPTURECOMPARE_REGISTER_6 0x2E
678 
679 //*****************************************************************************
680 //
681 // The following are values that can be passed to the param parameter for
682 // functions: Timer_D_initCaptureMode().
683 //
684 //*****************************************************************************
685 #define TIMER_D_CAPTUREMODE_NO_CAPTURE CM_0
686 #define TIMER_D_CAPTUREMODE_RISING_EDGE CM_1
687 #define TIMER_D_CAPTUREMODE_FALLING_EDGE CM_2
688 #define TIMER_D_CAPTUREMODE_RISING_AND_FALLING_EDGE CM_3
689 
690 //*****************************************************************************
691 //
692 // The following are values that can be passed to the param parameter for
693 // functions: Timer_D_initCaptureMode().
694 //
695 //*****************************************************************************
696 #define TIMER_D_CAPTURE_ASYNCHRONOUS 0x00
697 #define TIMER_D_CAPTURE_SYNCHRONOUS SCS
698 
699 //*****************************************************************************
700 //
701 // The following are values that can be passed to the param parameter for
702 // functions: Timer_D_initCompareMode().
703 //
704 //*****************************************************************************
705 #define TIMER_D_CAPTURECOMPARE_INTERRUPT_ENABLE CCIE
706 #define TIMER_D_CAPTURECOMPARE_INTERRUPT_DISABLE 0x00
707 
708 //*****************************************************************************
709 //
710 // The following are values that can be passed to the mask parameter for
711 // functions: Timer_D_enableHighResInterrupt(),
712 // Timer_D_disableHighResInterrupt(), Timer_D_getHighResInterruptStatus(), and
713 // Timer_D_clearHighResInterrupt() as well as returned by the
714 // Timer_D_getHighResInterruptStatus() function.
715 //
716 //*****************************************************************************
717 #define TIMER_D_HIGH_RES_FREQUENCY_UNLOCK TDHUNLKIE
718 #define TIMER_D_HIGH_RES_FREQUENCY_LOCK TDHLKIE
719 #define TIMER_D_HIGH_RES_FAIL_HIGH TDHFHIE
720 #define TIMER_D_HIGH_RES_FAIL_LOW TDHFLIE
721 
722 //*****************************************************************************
723 //
724 // The following are values that can be passed to the mask parameter for
725 // functions: Timer_D_getCaptureCompareInterruptStatus() as well as returned by
726 // the Timer_D_getCaptureCompareInterruptStatus() function.
727 //
728 //*****************************************************************************
729 #define TIMER_D_CAPTURE_OVERFLOW COV
730 #define TIMER_D_CAPTURECOMPARE_INTERRUPT_FLAG CCIFG
731 
732 //*****************************************************************************
733 //
734 // The following are values that can be passed to the synchronized parameter
735 // for functions: Timer_D_getSynchronizedCaptureCompareInput().
736 //
737 //*****************************************************************************
738 #define TIMER_D_READ_SYNCHRONIZED_CAPTURECOMPAREINPUT SCCI
739 #define TIMER_D_READ_CAPTURE_COMPARE_INPUT CCI
740 
741 //*****************************************************************************
742 //
743 // The following are values that can be passed to the outputModeOutBitValue
744 // parameter for functions: Timer_D_setOutputForOutputModeOutBitValue() as well
745 // as returned by the Timer_D_getOutputForOutputModeOutBitValue() function.
746 //
747 //*****************************************************************************
748 #define TIMER_D_OUTPUTMODE_OUTBITVALUE_HIGH OUT
749 #define TIMER_D_OUTPUTMODE_OUTBITVALUE_LOW 0x00
750 
751 //*****************************************************************************
752 //
753 // The following are values that can be passed to the desiredHighResFrequency
754 // parameter for functions: Timer_D_initHighResGeneratorInFreeRunningMode().
755 //
756 //*****************************************************************************
757 #define TIMER_D_HIGHRES_64MHZ 0x00
758 #define TIMER_D_HIGHRES_128MHZ 0x01
759 #define TIMER_D_HIGHRES_200MHZ 0x02
760 #define TIMER_D_HIGHRES_256MHZ 0x03
761 
762 //*****************************************************************************
763 //
764 // The following are values that can be passed to the param parameter for
765 // functions: Timer_D_initHighResGeneratorInRegulatedMode().
766 //
767 //*****************************************************************************
768 #define TIMER_D_HIGHRES_CLK_DIVIDER_1 TDHD__1
769 #define TIMER_D_HIGHRES_CLK_DIVIDER_2 TDHD__2
770 #define TIMER_D_HIGHRES_CLK_DIVIDER_4 TDHD__4
771 #define TIMER_D_HIGHRES_CLK_DIVIDER_8 TDHD__8
772 
773 //*****************************************************************************
774 //
775 // The following are values that can be passed to the param parameter for
776 // functions: Timer_D_initHighResGeneratorInRegulatedMode().
777 //
778 //*****************************************************************************
779 #define TIMER_D_HIGHRES_CLK_MULTIPLY_FACTOR_8x TDHM_0
780 #define TIMER_D_HIGHRES_CLK_MULTIPLY_FACTOR_16x TDHM_1
781 
782 //*****************************************************************************
783 //
784 // The following are values that can be passed to the param parameter for
785 // functions: Timer_D_combineTDCCRToOutputPWM().
786 //
787 //*****************************************************************************
788 #define TIMER_D_COMBINE_CCR1_CCR2 2
789 #define TIMER_D_COMBINE_CCR3_CCR4 4
790 #define TIMER_D_COMBINE_CCR5_CCR6 6
791 
792 //*****************************************************************************
793 //
794 // The following are values that can be passed to the groupLatch parameter for
795 // functions: Timer_D_selectLatchingGroup().
796 //
797 //*****************************************************************************
798 #define TIMER_D_GROUP_NONE TDCLGRP_0
799 #define TIMER_D_GROUP_CL12_CL23_CL56 TDCLGRP_1
800 #define TIMER_D_GROUP_CL123_CL456 TDCLGRP_2
801 #define TIMER_D_GROUP_ALL TDCLGRP_3
802 
803 //*****************************************************************************
804 //
805 // The following are values that can be passed to the counterLength parameter
806 // for functions: Timer_D_selectCounterLength().
807 //
808 //*****************************************************************************
809 #define TIMER_D_COUNTER_16BIT CNTL_0
810 #define TIMER_D_COUNTER_12BIT CNTL_1
811 #define TIMER_D_COUNTER_10BIT CNTL_2
812 #define TIMER_D_COUNTER_8BIT CNTL_3
813 
814 //*****************************************************************************
815 //
816 // The following are values that can be passed to the compareLatchLoadEvent
817 // parameter for functions: Timer_D_initCompareLatchLoadEvent().
818 //
819 //*****************************************************************************
820 #define TIMER_D_LATCH_ON_WRITE_TO_TDxCCRn_COMPARE_REGISTER CLLD_0
821 #define TIMER_D_LATCH_WHEN_COUNTER_COUNTS_TO_0_IN_UP_OR_CONT_MODE CLLD_1
822 #define TIMER_D_LATCH_WHEN_COUNTER_COUNTS_TO_0_IN_UPDOWN_MODE CLLD_2
823 #define TIMER_D_LATCH_WHEN_COUNTER_COUNTS_TO_CURRENT_COMPARE_LATCH_VALUE CLLD_3
824 
825 //*****************************************************************************
826 //
827 // The following are values that can be passed to the highResCoarseClockRange
828 // parameter for functions: Timer_D_selectHighResCoarseClockRange().
829 //
830 //*****************************************************************************
831 #define TIMER_D_HIGHRES_BELOW_15MHz 0x00
832 #define TIMER_D_HIGHRES_ABOVE_15MHz TDHCLKCR
833 
834 //*****************************************************************************
835 //
836 // The following are values that can be passed to the highResClockRange
837 // parameter for functions: Timer_D_selectHighResClockRange().
838 //
839 //*****************************************************************************
840 #define TIMER_D_CLOCK_RANGE0 0x0000
841 #define TIMER_D_CLOCK_RANGE1 0x2000
842 #define TIMER_D_CLOCK_RANGE2 0x4000
843 
844 //*****************************************************************************
845 //
846 // The following are values that can be passed toThe following are values that
847 // can be returned by the Timer_D_getSynchronizedCaptureCompareInput()
848 // function.
849 //
850 //*****************************************************************************
851 #define TIMER_D_CAPTURECOMPARE_INPUT_HIGH 0x01
852 #define TIMER_D_CAPTURECOMPARE_INPUT_LOW 0x00
853 
854 //*****************************************************************************
855 //
856 // The following are values that can be passed toThe following are values that
857 // can be returned by the Timer_D_getTimerInterruptStatus() function.
858 //
859 //*****************************************************************************
860 #define TIMER_D_INTERRUPT_NOT_PENDING 0x00
861 #define TIMER_D_INTERRUPT_PENDING 0x01
862 
863 //*****************************************************************************
864 //
865 // The following are values that can be passed toThe following are values that
866 // can be returned by the Timer_D_getCaptureCompareInputSignal() function.
867 //
868 //*****************************************************************************
869 #define TIMER_D_CAPTURECOMPARE_INPUT CCI
870 
871 //*****************************************************************************
872 //
873 // Prototypes for the APIs.
874 //
875 //*****************************************************************************
876 
877 //*****************************************************************************
878 //
896 //
897 //*****************************************************************************
898 extern void Timer_D_startCounter(uint16_t baseAddress,
899  uint16_t timerMode);
900 
901 //*****************************************************************************
902 //
914 //
915 //*****************************************************************************
916 extern void Timer_D_initContinuousMode(uint16_t baseAddress,
917  Timer_D_initContinuousModeParam *param);
918 
919 //*****************************************************************************
920 //
933 //
934 //*****************************************************************************
935 extern void Timer_D_initUpMode(uint16_t baseAddress,
936  Timer_D_initUpModeParam *param);
937 
938 //*****************************************************************************
939 //
952 //
953 //*****************************************************************************
954 extern void Timer_D_initUpDownMode(uint16_t baseAddress,
955  Timer_D_initUpDownModeParam *param);
956 
957 //*****************************************************************************
958 //
967 //
968 //*****************************************************************************
969 extern void Timer_D_initCaptureMode(uint16_t baseAddress,
970  Timer_D_initCaptureModeParam *param);
971 
972 //*****************************************************************************
973 //
982 //
983 //*****************************************************************************
984 extern void Timer_D_initCompareMode(uint16_t baseAddress,
985  Timer_D_initCompareModeParam *param);
986 
987 //*****************************************************************************
988 //
996 //
997 //*****************************************************************************
998 extern void Timer_D_enableTimerInterrupt(uint16_t baseAddress);
999 
1000 //*****************************************************************************
1001 //
1015 //
1016 //*****************************************************************************
1017 extern void Timer_D_enableHighResInterrupt(uint16_t baseAddress,
1018  uint16_t mask);
1019 
1020 //*****************************************************************************
1021 //
1029 //
1030 //*****************************************************************************
1031 extern void Timer_D_disableTimerInterrupt(uint16_t baseAddress);
1032 
1033 //*****************************************************************************
1034 //
1048 //
1049 //*****************************************************************************
1050 extern void Timer_D_disableHighResInterrupt(uint16_t baseAddress,
1051  uint16_t mask);
1052 
1053 //*****************************************************************************
1054 //
1063 //
1064 //*****************************************************************************
1065 extern uint32_t Timer_D_getTimerInterruptStatus(uint16_t baseAddress);
1066 
1067 //*****************************************************************************
1068 //
1085 //
1086 //*****************************************************************************
1087 extern void Timer_D_enableCaptureCompareInterrupt(uint16_t baseAddress,
1088  uint16_t captureCompareRegister);
1089 
1090 //*****************************************************************************
1091 //
1108 //
1109 //*****************************************************************************
1110 extern void Timer_D_disableCaptureCompareInterrupt(uint16_t baseAddress,
1111  uint16_t captureCompareRegister);
1112 
1113 //*****************************************************************************
1114 //
1136 //
1137 //*****************************************************************************
1138 extern uint32_t Timer_D_getCaptureCompareInterruptStatus(uint16_t baseAddress,
1139  uint16_t captureCompareRegister,
1140  uint16_t mask);
1141 
1142 //*****************************************************************************
1143 //
1162 //
1163 //*****************************************************************************
1164 extern uint16_t Timer_D_getHighResInterruptStatus(uint16_t baseAddress,
1165  uint16_t mask);
1166 
1167 //*****************************************************************************
1168 //
1176 //
1177 //*****************************************************************************
1178 extern void Timer_D_clear(uint16_t baseAddress);
1179 
1180 //*****************************************************************************
1181 //
1195 //
1196 //*****************************************************************************
1197 extern void Timer_D_clearHighResInterrupt(uint16_t baseAddress,
1198  uint16_t mask);
1199 
1200 //*****************************************************************************
1201 //
1222 //
1223 //*****************************************************************************
1224 extern uint8_t Timer_D_getSynchronizedCaptureCompareInput(uint16_t baseAddress,
1225  uint16_t captureCompareRegister,
1226  uint16_t synchronized);
1227 
1228 //*****************************************************************************
1229 //
1246 //
1247 //*****************************************************************************
1248 extern uint8_t Timer_D_getOutputForOutputModeOutBitValue(uint16_t baseAddress,
1249  uint16_t captureCompareRegister);
1250 
1251 //*****************************************************************************
1252 //
1267 //
1268 //*****************************************************************************
1269 extern uint16_t Timer_D_getCaptureCompareCount(uint16_t baseAddress,
1270  uint16_t captureCompareRegister);
1271 
1272 //*****************************************************************************
1273 //
1288 //
1289 //*****************************************************************************
1290 extern uint16_t Timer_D_getCaptureCompareLatchCount(uint16_t baseAddress,
1291  uint16_t captureCompareRegister);
1292 
1293 //*****************************************************************************
1294 //
1312 //
1313 //*****************************************************************************
1314 extern uint8_t Timer_D_getCaptureCompareInputSignal(uint16_t baseAddress,
1315  uint16_t captureCompareRegister);
1316 
1317 //*****************************************************************************
1318 //
1339 //
1340 //*****************************************************************************
1341 extern void Timer_D_setOutputForOutputModeOutBitValue(uint16_t baseAddress,
1342  uint16_t captureCompareRegister,
1343  uint8_t outputModeOutBitValue);
1344 
1345 //*****************************************************************************
1346 //
1357 //
1358 //*****************************************************************************
1359 extern void Timer_D_outputPWM(uint16_t baseAddress,
1360  Timer_D_outputPWMParam *param);
1361 
1362 //*****************************************************************************
1363 //
1371 //
1372 //*****************************************************************************
1373 extern void Timer_D_stop(uint16_t baseAddress);
1374 
1375 //*****************************************************************************
1376 //
1394 //
1395 //*****************************************************************************
1396 extern void Timer_D_setCompareValue(uint16_t baseAddress,
1397  uint16_t compareRegister,
1398  uint16_t compareValue);
1399 
1400 //*****************************************************************************
1401 //
1409 //
1410 //*****************************************************************************
1411 extern void Timer_D_clearTimerInterrupt(uint16_t baseAddress);
1412 
1413 //*****************************************************************************
1414 //
1432 //
1433 //*****************************************************************************
1434 extern void Timer_D_clearCaptureCompareInterrupt(uint16_t baseAddress,
1435  uint16_t captureCompareRegister);
1436 
1437 //*****************************************************************************
1438 //
1454 //
1455 //*****************************************************************************
1456 extern uint8_t Timer_D_initHighResGeneratorInFreeRunningMode(uint16_t baseAddress,
1457  uint8_t desiredHighResFrequency);
1458 
1459 //*****************************************************************************
1460 //
1471 //
1472 //*****************************************************************************
1473 extern void Timer_D_initHighResGeneratorInRegulatedMode(uint16_t baseAddress,
1474  Timer_D_initHighResGeneratorInRegulatedModeParam *param);
1475 
1476 //*****************************************************************************
1477 //
1488 //
1489 //*****************************************************************************
1490 extern void Timer_D_combineTDCCRToOutputPWM(uint16_t baseAddress,
1491  Timer_D_combineTDCCRToOutputPWMParam *param);
1492 
1493 //*****************************************************************************
1494 //
1508 //
1509 //*****************************************************************************
1510 extern void Timer_D_selectLatchingGroup(uint16_t baseAddress,
1511  uint16_t groupLatch);
1512 
1513 //*****************************************************************************
1514 //
1528 //
1529 //*****************************************************************************
1530 extern void Timer_D_selectCounterLength(uint16_t baseAddress,
1531  uint16_t counterLength);
1532 
1533 //*****************************************************************************
1534 //
1558 //
1559 //*****************************************************************************
1560 extern void Timer_D_initCompareLatchLoadEvent(uint16_t baseAddress,
1561  uint16_t compareRegister,
1562  uint16_t compareLatchLoadEvent);
1563 
1564 //*****************************************************************************
1565 //
1573 //
1574 //*****************************************************************************
1575 extern void Timer_D_disableHighResFastWakeup(uint16_t baseAddress);
1576 
1577 //*****************************************************************************
1578 //
1586 //
1587 //*****************************************************************************
1588 extern void Timer_D_enableHighResFastWakeup(uint16_t baseAddress);
1589 
1590 //*****************************************************************************
1591 //
1599 //
1600 //*****************************************************************************
1601 extern void Timer_D_disableHighResClockEnhancedAccuracy(uint16_t baseAddress);
1602 
1603 //*****************************************************************************
1604 //
1612 //
1613 //*****************************************************************************
1614 extern void Timer_D_enableHighResClockEnhancedAccuracy(uint16_t baseAddress);
1615 
1616 //*****************************************************************************
1617 //
1627 //
1628 //*****************************************************************************
1629 extern void Timer_D_disableHighResGeneratorForceON(uint16_t baseAddress);
1630 
1631 //*****************************************************************************
1632 //
1643 //
1644 //*****************************************************************************
1645 extern void Timer_D_enableHighResGeneratorForceON(uint16_t baseAddress);
1646 
1647 //*****************************************************************************
1648 //
1661 //
1662 //*****************************************************************************
1663 extern void Timer_D_selectHighResCoarseClockRange(uint16_t baseAddress,
1664  uint16_t highResCoarseClockRange);
1665 
1666 //*****************************************************************************
1667 //
1679 //
1680 //*****************************************************************************
1681 extern void Timer_D_selectHighResClockRange(uint16_t baseAddress,
1682  uint16_t highResClockRange);
1683 
1684 //*****************************************************************************
1685 //
1696 //
1697 //*****************************************************************************
1698 extern uint16_t Timer_D_getCounterValue(uint16_t baseAddress);
1699 
1700 //*****************************************************************************
1701 //
1730 //
1731 //*****************************************************************************
1732 extern void Timer_D_setOutputMode(uint16_t baseAddress,
1733  uint16_t compareRegister,
1734  uint16_t compareOutputMode);
1735 
1736 //*****************************************************************************
1737 //
1738 // Mark the end of the C bindings section for C++ compilers.
1739 //
1740 //*****************************************************************************
1741 #ifdef __cplusplus
1742 }
1743 #endif
1744 
1745 #endif
1746 #endif // __MSP430WARE_TIMER_D_H__
MPU_initThreeSegmentsParam param