Answered step by step
Verified Expert Solution
Question
1 Approved Answer
void LedBlinkingTask ( uint 3 2 _ t period _ seconds ) { while ( g _ ledBlinking ) { GPIO _ PORTN _ DATA
void LedBlinkingTaskuintt periodseconds
while gledBlinking
GPIOPORTNDATAR LEDPIN; Birinci LED'i yak
SysCtlDelayguiSysClock periodseconds; Belirtilen sre kadar bekle
GPIOPORTNDATAR & ~LEDPIN; Birinci LED'i sndr
GPIOPORTNDATAR LEDPIN; kinci LED'i yak
SysCtlDelayguiSysClock periodseconds; Belirtilen sre kadar bekle
GPIOPORTNDATAR & ~
LEDPIN;
int mainvoid
MAPSysCtlClockFreqSetSYSCTLXTALMHZ SYSCTLOSCMAIN SYSCTLUSEPLL SYSCTLCFGVCO;
MAPSysCtlPeripheralEnableSYSCTLPERIPHGPION;
MAPSysCtlPeripheralEnableSYSCTLPERIPHGPIOJ;
MAPSysCtlPeripheralEnableSYSCTLPERIPHGPIOC;
MAPGPIOPinTypeGPIOOutputGPIOPORTNBASE, GPIOPIN GPIOPIN;
MAPGPIOPinTypeGPIOInputGPIOPORTJBASE, GPIOPIN GPIOPIN;
MAPGPIOPinTypeGPIOInputGPIOPORTCBASE, GPIOPIN GPIOPIN GPIOPIN GPIOPIN;
MAPGPIOPadConfigSetGPIOPORTJBASE, GPIOPIN GPIOPIN GPIOSTRENGTHMA GPIOPINTYPESTDWPU;
MAPGPIOPadConfigSetGPIOPORTCBASE, GPIOPIN GPIOPIN GPIOPIN GPIOPIN GPIOSTRENGTHMA GPIOPINTYPESTDWPU;
ConfigureUART;
guiSysClock SysCtlClockGet;
MAPSysTickPeriodSetguiSysClock ;
MAPSysTickEnable;
MAPSysTickIntEnable;
while
LedBlinkingTask; Start LED blinking with a second period LedBlinkTask func
Hello, this code is a small part of the code I wrote for the Tiva Tmc device, I want to add a timer function called Timer to this code and this function should not contain delay, for example, if I say Timer in main after defining this function, it will need to create a second timer. For example, I will be able to call this function in a led onoff function etc. It should also contain an interrupt.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started