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.
Diff: led1.c
- Revision:
- 0:34ee385f4d2d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/led1.c Sat Oct 23 05:49:09 2021 +0000
@@ -0,0 +1,43 @@
+#include "led1.h"
+#include "gpio.h"
+#include "main_Lec9.h"
+#include "stm32f4xx_rcc_mort.h"
+#include "hardware_timer3.h"
+
+
+//LECTURE 9 PROBLEM 1
+//void init_LED1(void)
+//{
+// InitPortBPin0asOutput();
+//}
+//
+//void toggle_LED1(void)
+//{
+// toggleGPIOB0();
+//}
+
+//Lecture 10 Problem 1 - BEGIN
+
+void init_LED1(void)
+{
+ InitGPIOBPin0asOutputCompare();
+}
+
+void toggle_LED1(void)
+{
+ toggleGPIOB0();
+}
+
+//Lecture 10 Problem 1 - END
+
+//Lecture 10 Problem 2 - BEGIN
+
+void init_GPIOCPort6AsInputCompare(void)
+{
+ InitGPIOCPin6asInputCapture();
+ TMR3CH1GPIOCPin6asInputCapture();
+}
+
+//Lecture 10 Problem 2 - END
+
+