Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Flow chart and pseudo code 0x04 0x04 // blue 0x08 // green G-0x08 0x0A // yellow RG-OxOA 0xoc // sky blue -GB oxoC 0xOE //

image text in transcribedFlow chart and pseudo code
0x04 0x04 // blue 0x08 // green G-0x08 0x0A // yellow RG-OxOA 0xoc // sky blue -GB oxoC 0xOE // whiteRGB0x0E 0x06 // pinkR-B -B #define LED BLUE #define LEDGREEN #define LED YELLOW #define LEDSKYBLUE #define LED WHITE fde fine LEDPINK - - 0x06 - unsigned long SW1, SW2: // input from PF4, PFO unsigned long Out: // outputs to PF3, PF2, PFl (multicolor LED) void PortF Init (void) : void Delay (void): void EnableInterrupts (void)? main (void) { TExaS Init initializes the real board grader TExaS Init (SW PIN PF40, LED PIN PF321) // Call initialization of port PF4, PF3, PF2, PFI, PFO PortF Init0: / The grader uses interrupts EnableInterrupts while (1) { int SW1 GPIO PORIF DATA REox1OF SW2 GPIO PORTE DATA REOx01: read PF4 into swi /f read PFO into SW2 both pressed GPO PORT F DATA R-LED-BLUE, // LED is blue 1 elset if ( ( ! SWI) (SW2) ) { // bust SWi preased LED i8 red GPIO PORTE DATA R LED RED: lelset if ((SW1)&& (ISW2)) t / just SW2 pressed 9 GPIO PORTF DATA R LED GREEN:/LED is green else( // neither switch // LED is off GPIO PORTF DATA R LEDOFF; - 6 / PE4 and PFO are input SW1 and SW2 respectively ::// pF3, pF2,PF1 are outputs to the LED // These five pins are connected to hardware on the Launch Pad 0x04 0x04 // blue 0x08 // green G-0x08 0x0A // yellow RG-OxOA 0xoc // sky blue -GB oxoC 0xOE // whiteRGB0x0E 0x06 // pinkR-B -B #define LED BLUE #define LEDGREEN #define LED YELLOW #define LEDSKYBLUE #define LED WHITE fde fine LEDPINK - - 0x06 - unsigned long SW1, SW2: // input from PF4, PFO unsigned long Out: // outputs to PF3, PF2, PFl (multicolor LED) void PortF Init (void) : void Delay (void): void EnableInterrupts (void)? main (void) { TExaS Init initializes the real board grader TExaS Init (SW PIN PF40, LED PIN PF321) // Call initialization of port PF4, PF3, PF2, PFI, PFO PortF Init0: / The grader uses interrupts EnableInterrupts while (1) { int SW1 GPIO PORIF DATA REox1OF SW2 GPIO PORTE DATA REOx01: read PF4 into swi /f read PFO into SW2 both pressed GPO PORT F DATA R-LED-BLUE, // LED is blue 1 elset if ( ( ! SWI) (SW2) ) { // bust SWi preased LED i8 red GPIO PORTE DATA R LED RED: lelset if ((SW1)&& (ISW2)) t / just SW2 pressed 9 GPIO PORTF DATA R LED GREEN:/LED is green else( // neither switch // LED is off GPIO PORTF DATA R LEDOFF; - 6 / PE4 and PFO are input SW1 and SW2 respectively ::// pF3, pF2,PF1 are outputs to the LED // These five pins are connected to hardware on the Launch Pad

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions