Question: Basic C Language Program for Texas Instrument Board CM4C123G Comment the code on all the operations the program is doing. I commented most of it

Basic C Language Program for Texas Instrument Board CM4C123G

Comment the code on all the operations the program is doing. I commented most of it but cant figure out the rest.

#include //all the header files are included here

#include

#include "inc/hw_types.h"

#include "inc/hw_memmap.h"

#include "driverlib/sysctl.h"

#include "driverlib/pin_map.h"

#include "driverlib/debug.h"

#include "driverlib/gpio.h"

int main(void) //start of the program

{

SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN); //set the clock frequency

SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);

GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3); //configure gpio pins

while(1)

{

GPIOPinWrite(GPIO_PORTF_BASE,GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3, 0x08); //write to gpio LED

SysCtlDelay(20000000); //delay time for LED on

GPIOPinWrite(GPIO_PORTF_BASE,GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3, 0x00);

SysCtlDelay(20000000); //delay time for LED off

}

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!