SlideShare una empresa de Scribd logo
1 de 1
Descargar para leer sin conexión
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); } } } }

Más contenido relacionado

Similar a 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
 

Similar a 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
 

Más de 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
 

Más de 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
 

Último

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
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
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 

Último (20)

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
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...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 

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); } } } }