From 9cfe149c2363cbc110af6aeed93776afa779fd00 Mon Sep 17 00:00:00 2001 From: Farahihab <85008571+Farahihab@users.noreply.github.com> Date: Sun, 13 Jun 2021 03:16:17 +0200 Subject: [PATCH] Farah Updated this file --- PortF_LED.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/PortF_LED.c b/PortF_LED.c index 45e5f0c..22403ec 100644 --- a/PortF_LED.c +++ b/PortF_LED.c @@ -1,6 +1,8 @@ #include "tm4c123gh6pm.h" #include "define.h" +void delay_ms(int n); + void RGBLED_Init(void) { SYSCTL_RCGCGPIO_R |= 0x20; @@ -21,3 +23,22 @@ void LED_Output (unsigned char input){ GPIO_PORTF_DATA_R &= ~RGB ; GPIO_PORTF_DATA_R |= input; } + +void LED_clear (unsigned char input){ + + GPIO_PORTF_DATA_R &= ~input ; +} + +void LED_Output_sim (unsigned char input){ + + GPIO_PORTF_DATA_R |= input; +} + +void Red_blink (){ + LED_Output_sim (RED); + delay_ms(100); + LED_clear(RED); + +} + +