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.
gpio.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 | #ifndef __GPIO_H_ |
| rajathr | 0:34ee385f4d2d | 2 | #define __GPIO_H_ |
| rajathr | 0:34ee385f4d2d | 3 | |
| 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 | #include "main_Lec9.h" |
| rajathr | 0:34ee385f4d2d | 10 | |
| rajathr | 0:34ee385f4d2d | 11 | /*Defining function that initializes the Port B Pin 0 as Output*/ |
| rajathr | 0:34ee385f4d2d | 12 | void InitPortBPin0asOutput(void); |
| rajathr | 0:34ee385f4d2d | 13 | |
| rajathr | 0:34ee385f4d2d | 14 | /*Defining function that toggles the LED Switch*/ |
| rajathr | 0:34ee385f4d2d | 15 | void toggleGPIOB0(void); |
| rajathr | 0:34ee385f4d2d | 16 | |
| rajathr | 0:34ee385f4d2d | 17 | /*Defining function that initializes PortB Pin0 as Output Compare*/ |
| rajathr | 0:34ee385f4d2d | 18 | void InitGPIOBPin0asOutputCompare(void); |
| rajathr | 0:34ee385f4d2d | 19 | |
| rajathr | 0:34ee385f4d2d | 20 | /*Defining function that initializes PortC Pin6 as Input Capture*/ |
| rajathr | 0:34ee385f4d2d | 21 | void InitGPIOCPin6asInputCapture(void); |
| rajathr | 0:34ee385f4d2d | 22 | |
| rajathr | 0:34ee385f4d2d | 23 | /*Defining function that initializes PortB Pin0 as Output - PWM Mode 1*/ |
| rajathr | 0:34ee385f4d2d | 24 | void InitGPIOBPin0asPWMMode1(void); |
| rajathr | 0:34ee385f4d2d | 25 | |
| rajathr | 0:34ee385f4d2d | 26 | /*Defining function that initializes PortB Pin0 as Output - ODR HIGH*/ |
| rajathr | 0:34ee385f4d2d | 27 | void setGPIOB0(void); |
| rajathr | 0:34ee385f4d2d | 28 | |
| rajathr | 0:34ee385f4d2d | 29 | /*Defining function that initializes PortB Pin0 as Output - CLEARS ODR*/ |
| rajathr | 0:34ee385f4d2d | 30 | void clearGPIOB0(void); |
| rajathr | 0:34ee385f4d2d | 31 | |
| rajathr | 0:34ee385f4d2d | 32 | /*Defining function that initializes PortC Pin6 as Input - For Toggling LED when you see an interrupt*/ |
| rajathr | 0:34ee385f4d2d | 33 | void initGpioC6AsInput(void); |
| rajathr | 0:34ee385f4d2d | 34 | |
| rajathr | 0:34ee385f4d2d | 35 | #ifdef __cplusplus |
| rajathr | 0:34ee385f4d2d | 36 | } |
| rajathr | 0:34ee385f4d2d | 37 | #endif |
| rajathr | 0:34ee385f4d2d | 38 | |
| rajathr | 0:34ee385f4d2d | 39 | #endif /*__GPIO_H */ |
| rajathr | 0:34ee385f4d2d | 40 |