Initialized some more ports
This commit is contained in:
parent
e199fec0c0
commit
83a8b28d36
12
lab5.c
12
lab5.c
|
@ -2,6 +2,7 @@
|
|||
#include <stdbool.h>
|
||||
#include "tm4c123gh6pm.h"
|
||||
|
||||
void GPIOIntHandler(void);
|
||||
int main(void)
|
||||
{
|
||||
SYSCTL_RCGC2_R |= 0x00000020; /* enable clock to GPIOF */
|
||||
|
@ -10,8 +11,17 @@ int main(void)
|
|||
GPIO_PORTF_DEN_R = 0x1F; /* set PORTF pins 5 pins*/
|
||||
GPIO_PORTF_DIR_R = 0x0E; /* set PORTF0 PORTF4 pin as input user switch pin */
|
||||
GPIO_PORTF_PUR_R = 0x11; /* PORTF4 PORT0 is pulled up */
|
||||
GPIO_PORTF_IM_R = 0x11 /*Masking the ports*/
|
||||
GPIO_PORTF_IM_R = 0x11; /*Masking the ports*/
|
||||
GPIO_PORTF_IS_R = 0x00;
|
||||
GPIO_PORTF_IEV_R = 0x00; /*detects the falling edge of the switch*/
|
||||
GPIO_PORTF_IBE_R = 0x00
|
||||
}
|
||||
|
||||
while(1)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ void ResetISR(void);
|
|||
static void NmiSR(void);
|
||||
static void FaultISR(void);
|
||||
static void IntDefaultHandler(void);
|
||||
void GPIOIntHandler(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
|
@ -113,7 +114,7 @@ void (* const g_pfnVectors[])(void) =
|
|||
IntDefaultHandler, // Analog Comparator 2
|
||||
IntDefaultHandler, // System Control (PLL, OSC, BO)
|
||||
IntDefaultHandler, // FLASH Control
|
||||
IntDefaultHandler, // GPIO Port F
|
||||
GPIOIntHandler, // GPIO Port F
|
||||
IntDefaultHandler, // GPIO Port G
|
||||
IntDefaultHandler, // GPIO Port H
|
||||
IntDefaultHandler, // UART2 Rx and Tx
|
||||
|
|
Loading…
Reference in New Issue