Skip to content

Commit

Permalink
Farah Updated this file
Browse files Browse the repository at this point in the history
  • Loading branch information
Farahihab authored Jun 13, 2021
1 parent 040853b commit 9cfe149
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions PortF_LED.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "tm4c123gh6pm.h"
#include "define.h"

void delay_ms(int n);

void RGBLED_Init(void) {

SYSCTL_RCGCGPIO_R |= 0x20;
Expand All @@ -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);

}


0 comments on commit 9cfe149

Please sign in to comment.