SlideShare ist ein Scribd-Unternehmen logo
1 von 1
Downloaden Sie, um offline zu lesen
The below code,in C language please, needs to be completed so that when a serial terminal is
open, echoing characters will turn the LED on or off. Typing ON to turn them on, and typing OFF
to turn them off.
. #include <stdint.h> #include <stddef.h> /* Driver Header files */ #include <ti/drivers/GPIO.h>
#include <ti/drivers/UART2.h> /* Driver configuration */ #include "ti_drivers_config.h" /* *
======== mainThread ======== */ void *mainThread(void *arg0) { char input; const char
echoPrompt[] = "Echoing characters:rn"; UART2_Handle uart; UART2_Params uartParams; size_t
bytesRead; size_t bytesWritten = 0; uint32_t status = UART2_STATUS_SUCCESS; /* Call driver
init functions */ GPIO_init(); /* Configure the LED pin */ GPIO_setConfig(CONFIG_GPIO_LED_0,
GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW); /* Create a UART where the default read and
write mode is BLOCKING */ UART2_Params_init(&uartParams); uartParams.baudRate = 115200;
uart = UART2_open(CONFIG_UART2_0, &uartParams); if (uart == NULL) { /* UART2_open()
failed */ while (1); } /* Turn on user LED to indicate successful initialization */
GPIO_write(CONFIG_GPIO_LED_0, CONFIG_GPIO_LED_ON); UART2_write(uart, echoPrompt,
sizeof(echoPrompt), &bytesWritten); /* Loop forever echoing */ while (1) { bytesRead = 0; while
(bytesRead == 0) { status = UART2_read(uart, &input, 1, &bytesRead); if (status !=
UART2_STATUS_SUCCESS) { /* UART2_read() failed */ while (1); } } bytesWritten = 0; while
(bytesWritten == 0) { status = UART2_write(uart, &input, 1, &bytesWritten); if (status !=
UART2_STATUS_SUCCESS) { /* UART2_write() failed */ while (1); } } } }

Weitere ähnliche Inhalte

Ähnlich wie The below codein C language please needs to be completed s.pdf

How do I draw the Labview code for pneumatic cylinder(air pistion). .pdf
How do I draw the Labview code for pneumatic cylinder(air pistion). .pdfHow do I draw the Labview code for pneumatic cylinder(air pistion). .pdf
How do I draw the Labview code for pneumatic cylinder(air pistion). .pdffootstatus
 
#include stdio.h#include systypes.h#include syssocket.h
#include stdio.h#include systypes.h#include syssocket.h#include stdio.h#include systypes.h#include syssocket.h
#include stdio.h#include systypes.h#include syssocket.hSilvaGraf83
 
#include stdio.h#include systypes.h#include syssocket.h
#include stdio.h#include systypes.h#include syssocket.h#include stdio.h#include systypes.h#include syssocket.h
#include stdio.h#include systypes.h#include syssocket.hMoseStaton39
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013Wave Digitech
 
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Macpaul Lin
 
The following code is an implementation of the producer consumer pro.pdf
The following code is an implementation of the producer consumer pro.pdfThe following code is an implementation of the producer consumer pro.pdf
The following code is an implementation of the producer consumer pro.pdfmarketing413921
 
#include avrinterrupt.h The global interrupt flag is maintained.pdf
#include avrinterrupt.h The global interrupt flag is maintained.pdf#include avrinterrupt.h The global interrupt flag is maintained.pdf
#include avrinterrupt.h The global interrupt flag is maintained.pdfarasanlethers
 
The Ring programming language version 1.7 book - Part 87 of 196
The Ring programming language version 1.7 book - Part 87 of 196The Ring programming language version 1.7 book - Part 87 of 196
The Ring programming language version 1.7 book - Part 87 of 196Mahmoud Samir Fayed
 
Dam gate open close lpc prog
Dam gate open close lpc progDam gate open close lpc prog
Dam gate open close lpc prognikhil dixit
 
The Ring programming language version 1.5.3 book - Part 91 of 184
The Ring programming language version 1.5.3 book - Part 91 of 184The Ring programming language version 1.5.3 book - Part 91 of 184
The Ring programming language version 1.5.3 book - Part 91 of 184Mahmoud Samir Fayed
 
C for Java programmers (part 1)
C for Java programmers (part 1)C for Java programmers (part 1)
C for Java programmers (part 1)Dmitry Zinoviev
 
Embedded c programming22 for fdp
Embedded c programming22 for fdpEmbedded c programming22 for fdp
Embedded c programming22 for fdpPradeep Kumar TS
 
01_DIGITAL IO.pptx
01_DIGITAL IO.pptx01_DIGITAL IO.pptx
01_DIGITAL IO.pptxssuser593a2d
 
Hello Please I wanna fix the code problems as it does not run throug.docx
Hello Please I wanna fix the code problems as it does not run throug.docxHello Please I wanna fix the code problems as it does not run throug.docx
Hello Please I wanna fix the code problems as it does not run throug.docxjosephineboon366
 
Id. 01 router (computing)
Id. 01 router (computing)Id. 01 router (computing)
Id. 01 router (computing)Rawa KirKuKi
 
proxyc CSAPP Web proxy NAME IMPORTANT Giv.pdf
  proxyc  CSAPP Web proxy   NAME    IMPORTANT Giv.pdf  proxyc  CSAPP Web proxy   NAME    IMPORTANT Giv.pdf
proxyc CSAPP Web proxy NAME IMPORTANT Giv.pdfajay1317
 

Ähnlich wie The below codein C language please needs to be completed s.pdf (20)

How do I draw the Labview code for pneumatic cylinder(air pistion). .pdf
How do I draw the Labview code for pneumatic cylinder(air pistion). .pdfHow do I draw the Labview code for pneumatic cylinder(air pistion). .pdf
How do I draw the Labview code for pneumatic cylinder(air pistion). .pdf
 
PIC and LCD
PIC and LCDPIC and LCD
PIC and LCD
 
#include stdio.h#include systypes.h#include syssocket.h
#include stdio.h#include systypes.h#include syssocket.h#include stdio.h#include systypes.h#include syssocket.h
#include stdio.h#include systypes.h#include syssocket.h
 
#include stdio.h#include systypes.h#include syssocket.h
#include stdio.h#include systypes.h#include syssocket.h#include stdio.h#include systypes.h#include syssocket.h
#include stdio.h#include systypes.h#include syssocket.h
 
Lcd n PIC16F
Lcd n PIC16FLcd n PIC16F
Lcd n PIC16F
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013
 
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)
 
The following code is an implementation of the producer consumer pro.pdf
The following code is an implementation of the producer consumer pro.pdfThe following code is an implementation of the producer consumer pro.pdf
The following code is an implementation of the producer consumer pro.pdf
 
#include avrinterrupt.h The global interrupt flag is maintained.pdf
#include avrinterrupt.h The global interrupt flag is maintained.pdf#include avrinterrupt.h The global interrupt flag is maintained.pdf
#include avrinterrupt.h The global interrupt flag is maintained.pdf
 
FINISHED_CODE
FINISHED_CODEFINISHED_CODE
FINISHED_CODE
 
The Ring programming language version 1.7 book - Part 87 of 196
The Ring programming language version 1.7 book - Part 87 of 196The Ring programming language version 1.7 book - Part 87 of 196
The Ring programming language version 1.7 book - Part 87 of 196
 
Dam gate open close lpc prog
Dam gate open close lpc progDam gate open close lpc prog
Dam gate open close lpc prog
 
The Ring programming language version 1.5.3 book - Part 91 of 184
The Ring programming language version 1.5.3 book - Part 91 of 184The Ring programming language version 1.5.3 book - Part 91 of 184
The Ring programming language version 1.5.3 book - Part 91 of 184
 
C for Java programmers (part 1)
C for Java programmers (part 1)C for Java programmers (part 1)
C for Java programmers (part 1)
 
Embedded c programming22 for fdp
Embedded c programming22 for fdpEmbedded c programming22 for fdp
Embedded c programming22 for fdp
 
01_DIGITAL IO.pptx
01_DIGITAL IO.pptx01_DIGITAL IO.pptx
01_DIGITAL IO.pptx
 
Gps c
Gps cGps c
Gps c
 
Hello Please I wanna fix the code problems as it does not run throug.docx
Hello Please I wanna fix the code problems as it does not run throug.docxHello Please I wanna fix the code problems as it does not run throug.docx
Hello Please I wanna fix the code problems as it does not run throug.docx
 
Id. 01 router (computing)
Id. 01 router (computing)Id. 01 router (computing)
Id. 01 router (computing)
 
proxyc CSAPP Web proxy NAME IMPORTANT Giv.pdf
  proxyc  CSAPP Web proxy   NAME    IMPORTANT Giv.pdf  proxyc  CSAPP Web proxy   NAME    IMPORTANT Giv.pdf
proxyc CSAPP Web proxy NAME IMPORTANT Giv.pdf
 

Mehr von aayushi9925064438

The Axial and Appendicular Skeletons 7a Label the bones in.pdf
The Axial and Appendicular Skeletons 7a  Label the bones in.pdfThe Axial and Appendicular Skeletons 7a  Label the bones in.pdf
The Axial and Appendicular Skeletons 7a Label the bones in.pdfaayushi9925064438
 
The broader definition of the money supply M2 includes whi.pdf
The broader definition of the money supply M2 includes whi.pdfThe broader definition of the money supply M2 includes whi.pdf
The broader definition of the money supply M2 includes whi.pdfaayushi9925064438
 
the bveit aniamedies thesch3 arberinist Eilinit x Eraria.pdf
the bveit aniamedies thesch3 arberinist Eilinit x Eraria.pdfthe bveit aniamedies thesch3 arberinist Eilinit x Eraria.pdf
the bveit aniamedies thesch3 arberinist Eilinit x Eraria.pdfaayushi9925064438
 
The bito Corporation sells two brands of wine glasses Pl.pdf
The bito Corporation  sells two brands of wine glasses Pl.pdfThe bito Corporation  sells two brands of wine glasses Pl.pdf
The bito Corporation sells two brands of wine glasses Pl.pdfaayushi9925064438
 
The balance of payments of any country focuses exclusively o.pdf
The balance of payments of any country focuses exclusively o.pdfThe balance of payments of any country focuses exclusively o.pdf
The balance of payments of any country focuses exclusively o.pdfaayushi9925064438
 
The Assignment Centralized Mutual Exclusion Algorithm The a.pdf
The Assignment Centralized Mutual Exclusion Algorithm The a.pdfThe Assignment Centralized Mutual Exclusion Algorithm The a.pdf
The Assignment Centralized Mutual Exclusion Algorithm The a.pdfaayushi9925064438
 
The assets A of public pension funds in trilions of dollars.pdf
The assets A of public pension funds in trilions of dollars.pdfThe assets A of public pension funds in trilions of dollars.pdf
The assets A of public pension funds in trilions of dollars.pdfaayushi9925064438
 
4- Identify the skin structures and areas indicated in the accompanyin.pdf
4- Identify the skin structures and areas indicated in the accompanyin.pdf4- Identify the skin structures and areas indicated in the accompanyin.pdf
4- Identify the skin structures and areas indicated in the accompanyin.pdfaayushi9925064438
 
Becker Stores- Ine- prowided the following statement of not income for.pdf
Becker Stores- Ine- prowided the following statement of not income for.pdfBecker Stores- Ine- prowided the following statement of not income for.pdf
Becker Stores- Ine- prowided the following statement of not income for.pdfaayushi9925064438
 
1- During the year 2019 - the Munro Corporation was named as a defenda.pdf
1- During the year 2019 - the Munro Corporation was named as a defenda.pdf1- During the year 2019 - the Munro Corporation was named as a defenda.pdf
1- During the year 2019 - the Munro Corporation was named as a defenda.pdfaayushi9925064438
 
1-use Binomial Distribution to find the probability of getting 495 tai.pdf
1-use Binomial Distribution to find the probability of getting 495 tai.pdf1-use Binomial Distribution to find the probability of getting 495 tai.pdf
1-use Binomial Distribution to find the probability of getting 495 tai.pdfaayushi9925064438
 
1- Choose two leaders in real-life- Describe what makes one a bad lead.pdf
1- Choose two leaders in real-life- Describe what makes one a bad lead.pdf1- Choose two leaders in real-life- Describe what makes one a bad lead.pdf
1- Choose two leaders in real-life- Describe what makes one a bad lead.pdfaayushi9925064438
 
5- (10 points) Fill out the table below-.pdf
5- (10 points) Fill out the table below-.pdf5- (10 points) Fill out the table below-.pdf
5- (10 points) Fill out the table below-.pdfaayushi9925064438
 
- A 78-year-old man is a retired banker whose wife died several years.pdf
- A 78-year-old man is a retired banker whose wife died several years.pdf- A 78-year-old man is a retired banker whose wife died several years.pdf
- A 78-year-old man is a retired banker whose wife died several years.pdfaayushi9925064438
 
(1 point) Which of the following expressions rounds the double variabl.pdf
(1 point) Which of the following expressions rounds the double variabl.pdf(1 point) Which of the following expressions rounds the double variabl.pdf
(1 point) Which of the following expressions rounds the double variabl.pdfaayushi9925064438
 

Mehr von aayushi9925064438 (15)

The Axial and Appendicular Skeletons 7a Label the bones in.pdf
The Axial and Appendicular Skeletons 7a  Label the bones in.pdfThe Axial and Appendicular Skeletons 7a  Label the bones in.pdf
The Axial and Appendicular Skeletons 7a Label the bones in.pdf
 
The broader definition of the money supply M2 includes whi.pdf
The broader definition of the money supply M2 includes whi.pdfThe broader definition of the money supply M2 includes whi.pdf
The broader definition of the money supply M2 includes whi.pdf
 
the bveit aniamedies thesch3 arberinist Eilinit x Eraria.pdf
the bveit aniamedies thesch3 arberinist Eilinit x Eraria.pdfthe bveit aniamedies thesch3 arberinist Eilinit x Eraria.pdf
the bveit aniamedies thesch3 arberinist Eilinit x Eraria.pdf
 
The bito Corporation sells two brands of wine glasses Pl.pdf
The bito Corporation  sells two brands of wine glasses Pl.pdfThe bito Corporation  sells two brands of wine glasses Pl.pdf
The bito Corporation sells two brands of wine glasses Pl.pdf
 
The balance of payments of any country focuses exclusively o.pdf
The balance of payments of any country focuses exclusively o.pdfThe balance of payments of any country focuses exclusively o.pdf
The balance of payments of any country focuses exclusively o.pdf
 
The Assignment Centralized Mutual Exclusion Algorithm The a.pdf
The Assignment Centralized Mutual Exclusion Algorithm The a.pdfThe Assignment Centralized Mutual Exclusion Algorithm The a.pdf
The Assignment Centralized Mutual Exclusion Algorithm The a.pdf
 
The assets A of public pension funds in trilions of dollars.pdf
The assets A of public pension funds in trilions of dollars.pdfThe assets A of public pension funds in trilions of dollars.pdf
The assets A of public pension funds in trilions of dollars.pdf
 
4- Identify the skin structures and areas indicated in the accompanyin.pdf
4- Identify the skin structures and areas indicated in the accompanyin.pdf4- Identify the skin structures and areas indicated in the accompanyin.pdf
4- Identify the skin structures and areas indicated in the accompanyin.pdf
 
Becker Stores- Ine- prowided the following statement of not income for.pdf
Becker Stores- Ine- prowided the following statement of not income for.pdfBecker Stores- Ine- prowided the following statement of not income for.pdf
Becker Stores- Ine- prowided the following statement of not income for.pdf
 
1- During the year 2019 - the Munro Corporation was named as a defenda.pdf
1- During the year 2019 - the Munro Corporation was named as a defenda.pdf1- During the year 2019 - the Munro Corporation was named as a defenda.pdf
1- During the year 2019 - the Munro Corporation was named as a defenda.pdf
 
1-use Binomial Distribution to find the probability of getting 495 tai.pdf
1-use Binomial Distribution to find the probability of getting 495 tai.pdf1-use Binomial Distribution to find the probability of getting 495 tai.pdf
1-use Binomial Distribution to find the probability of getting 495 tai.pdf
 
1- Choose two leaders in real-life- Describe what makes one a bad lead.pdf
1- Choose two leaders in real-life- Describe what makes one a bad lead.pdf1- Choose two leaders in real-life- Describe what makes one a bad lead.pdf
1- Choose two leaders in real-life- Describe what makes one a bad lead.pdf
 
5- (10 points) Fill out the table below-.pdf
5- (10 points) Fill out the table below-.pdf5- (10 points) Fill out the table below-.pdf
5- (10 points) Fill out the table below-.pdf
 
- A 78-year-old man is a retired banker whose wife died several years.pdf
- A 78-year-old man is a retired banker whose wife died several years.pdf- A 78-year-old man is a retired banker whose wife died several years.pdf
- A 78-year-old man is a retired banker whose wife died several years.pdf
 
(1 point) Which of the following expressions rounds the double variabl.pdf
(1 point) Which of the following expressions rounds the double variabl.pdf(1 point) Which of the following expressions rounds the double variabl.pdf
(1 point) Which of the following expressions rounds the double variabl.pdf
 

Kürzlich hochgeladen

Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 

Kürzlich hochgeladen (20)

Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 

The below codein C language please needs to be completed s.pdf

  • 1. The below code,in C language please, needs to be completed so that when a serial terminal is open, echoing characters will turn the LED on or off. Typing ON to turn them on, and typing OFF to turn them off. . #include <stdint.h> #include <stddef.h> /* Driver Header files */ #include <ti/drivers/GPIO.h> #include <ti/drivers/UART2.h> /* Driver configuration */ #include "ti_drivers_config.h" /* * ======== mainThread ======== */ void *mainThread(void *arg0) { char input; const char echoPrompt[] = "Echoing characters:rn"; UART2_Handle uart; UART2_Params uartParams; size_t bytesRead; size_t bytesWritten = 0; uint32_t status = UART2_STATUS_SUCCESS; /* Call driver init functions */ GPIO_init(); /* Configure the LED pin */ GPIO_setConfig(CONFIG_GPIO_LED_0, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW); /* Create a UART where the default read and write mode is BLOCKING */ UART2_Params_init(&uartParams); uartParams.baudRate = 115200; uart = UART2_open(CONFIG_UART2_0, &uartParams); if (uart == NULL) { /* UART2_open() failed */ while (1); } /* Turn on user LED to indicate successful initialization */ GPIO_write(CONFIG_GPIO_LED_0, CONFIG_GPIO_LED_ON); UART2_write(uart, echoPrompt, sizeof(echoPrompt), &bytesWritten); /* Loop forever echoing */ while (1) { bytesRead = 0; while (bytesRead == 0) { status = UART2_read(uart, &input, 1, &bytesRead); if (status != UART2_STATUS_SUCCESS) { /* UART2_read() failed */ while (1); } } bytesWritten = 0; while (bytesWritten == 0) { status = UART2_write(uart, &input, 1, &bytesWritten); if (status != UART2_STATUS_SUCCESS) { /* UART2_write() failed */ while (1); } } } }