You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
564 B
C
22 lines
564 B
C
#include <stdint.h>
|
|
#include <intrinsics.h>
|
|
#include "tm4c_cmsis.h"
|
|
#include "bsp.h"
|
|
|
|
int main() {
|
|
SYSCTL->RCGC2 |= (1U << 5); /* enable clock for GPIOF */
|
|
SYSCTL->GPIOHSCTL |= (1U << 5); /* enable AHB for GPIOF */
|
|
GPIOF_HS->DIR |= (LED_RED | LED_BLUE | LED_GREEN);
|
|
GPIOF_HS->DEN |= (LED_RED | LED_BLUE | LED_GREEN);
|
|
|
|
SysTick->LOAD = SYS_CLOCK_HZ/2U - 1U;
|
|
SysTick->VAL = 0U;
|
|
SysTick->CTRL = (1U << 2) | (1U << 1) | 1U;
|
|
|
|
__enable_interrupt();
|
|
//GPIOF_HS->DATA_Bits[LED_BLUE] = LED_BLUE;
|
|
while (1) {
|
|
}
|
|
//return 0;
|
|
}
|