Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
hardware_timer3.h@0:34ee385f4d2d, 2021-10-23 (annotated)
- Committer:
- rajathr
- Date:
- Sat Oct 23 05:49:09 2021 +0000
- Revision:
- 0:34ee385f4d2d
At 23rd Oct 21 - All Code
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| rajathr | 0:34ee385f4d2d | 1 | /* Define to prevent recursive inclusion -------------------------------------*/ |
| rajathr | 0:34ee385f4d2d | 2 | #ifndef __HARDWARE_TIMER_3_H_ |
| rajathr | 0:34ee385f4d2d | 3 | #define __HARDWARE_TIMER_3_H_ |
| rajathr | 0:34ee385f4d2d | 4 | |
| rajathr | 0:34ee385f4d2d | 5 | #ifdef __cplusplus |
| rajathr | 0:34ee385f4d2d | 6 | extern "C" { |
| rajathr | 0:34ee385f4d2d | 7 | #endif |
| rajathr | 0:34ee385f4d2d | 8 | |
| rajathr | 0:34ee385f4d2d | 9 | /* Includes ------------------------------------------------------------------*/ |
| rajathr | 0:34ee385f4d2d | 10 | #include "main_Lec9.h" |
| rajathr | 0:34ee385f4d2d | 11 | |
| rajathr | 0:34ee385f4d2d | 12 | |
| rajathr | 0:34ee385f4d2d | 13 | |
| rajathr | 0:34ee385f4d2d | 14 | /*Function definitions---------------------------------------------------------*/ |
| rajathr | 0:34ee385f4d2d | 15 | |
| rajathr | 0:34ee385f4d2d | 16 | /*Defining funtion that initializes Timer3 Channel3 as Output Compare*/ |
| rajathr | 0:34ee385f4d2d | 17 | void TMR3CH3OutputCompare(void); |
| rajathr | 0:34ee385f4d2d | 18 | |
| rajathr | 0:34ee385f4d2d | 19 | /*Defining funtion that initializes Timer3 Channel1 as Input Capture*/ |
| rajathr | 0:34ee385f4d2d | 20 | void TMR3CH1GPIOCPin6asInputCapture(void); |
| rajathr | 0:34ee385f4d2d | 21 | |
| rajathr | 0:34ee385f4d2d | 22 | /*Defining funtion that reads countervalue when Timer3 Channel1 as an Input Capture*/ |
| rajathr | 0:34ee385f4d2d | 23 | uint16_t readCounterValueIfFlagIsSet(void); |
| rajathr | 0:34ee385f4d2d | 24 | |
| rajathr | 0:34ee385f4d2d | 25 | /*Defining funtion that Initializes Timer3 Channel3 as an Output - PWM Mode 1*/ |
| rajathr | 0:34ee385f4d2d | 26 | void TMR3CH3OutputPWMMode1(void); |
| rajathr | 0:34ee385f4d2d | 27 | |
| rajathr | 0:34ee385f4d2d | 28 | ///*Defining funtion that Initializes Timer3 Channel3 to Interrupt - Output Compare Interrupt Mode*/ |
| rajathr | 0:34ee385f4d2d | 29 | void initTimer3ToInterrupt(void); |
| rajathr | 0:34ee385f4d2d | 30 | |
| rajathr | 0:34ee385f4d2d | 31 | #ifdef __cplusplus |
| rajathr | 0:34ee385f4d2d | 32 | } |
| rajathr | 0:34ee385f4d2d | 33 | #endif |
| rajathr | 0:34ee385f4d2d | 34 | |
| rajathr | 0:34ee385f4d2d | 35 | #endif /*__HARDWARE_TIMER_3_H */ |