lab 3 setup
This commit is contained in:
9
lab3subroutines/src/gpio.s
Normal file
9
lab3subroutines/src/gpio.s
Normal file
@@ -0,0 +1,9 @@
|
||||
# gpio.s
|
||||
# Trevor Barnes
|
||||
# CE2801-031
|
||||
# Description: A file to handle the GPIO behavior of the Dev Board
|
||||
|
||||
.syntax unified
|
||||
.cpu cortex-m4
|
||||
.thumb
|
||||
.section .text
|
||||
25
lab3subroutines/src/led.s
Normal file
25
lab3subroutines/src/led.s
Normal file
@@ -0,0 +1,25 @@
|
||||
# led.s
|
||||
# Trevor Barnes
|
||||
# CE2801-031
|
||||
# Description: A file for handling the LED pins on the Dev Board
|
||||
|
||||
# Lights are on PB5-PB15 except PB11
|
||||
|
||||
.syntax unified
|
||||
.cpu cortex-m4
|
||||
.thumb
|
||||
.section .text
|
||||
|
||||
# Base RCC
|
||||
.equ RCC_BASE, 0x40023800
|
||||
# GPIOB Enable Register
|
||||
.equ RCC_AHB1ENR, 0x30
|
||||
# GPIOB Enable
|
||||
.equ RCC_GPIOBEN, 1<<1
|
||||
|
||||
# Base GPIOB Location
|
||||
.equ GPIOB_BASE, 0x40020400
|
||||
# GPIO Mode Register
|
||||
.equ GPIO_MODER, 0x00
|
||||
# GPIO Output Data Register
|
||||
.equ GPIO_ODR, 0x14
|
||||
15
lab3subroutines/src/main.s
Normal file
15
lab3subroutines/src/main.s
Normal file
@@ -0,0 +1,15 @@
|
||||
# main.s
|
||||
# Trevor Barnes
|
||||
# CE2801-031
|
||||
# Lab 3: Subroutines
|
||||
# Description:
|
||||
|
||||
.syntax unified
|
||||
.cpu cortex-m4
|
||||
.thumb
|
||||
.section .text
|
||||
|
||||
.global main
|
||||
|
||||
main:
|
||||
|
||||
Reference in New Issue
Block a user