+/rtos

git clone https://git.julia.blue/+/rtos

Vivek MalneediMerge branch 'master' of github.com:EE445M-Sp20/lab-6-vm22967_jbr2558ee4080a

master
650 B31 linesraw
1#pragma once
2
3#include "tivaware/gpio.h"
4#include <stdbool.h>
5#include <stdint.h>
6
7// PF0 - Left button
8// PF1 - Red LED
9// PF2 - Blue LED
10// PF3 - Green LED
11// PF4 - Right button
12
13// Initializes the LED and button pins on the launchpad
14// and enables portf interrupts for the buttons
15void launchpad_init(void);
16
17void enable_button_interupts(uint8_t priority);
18
19#define RED_LED GPIO_PIN_1
20#define BLUE_LED GPIO_PIN_2
21#define GREEN_LED GPIO_PIN_3
22
23bool left_switch(void);
24
25bool right_switch(void);
26
27// led: RED_LED, GREEN_LED, or BLUE_LED
28void led_toggle(uint8_t led);
29
30// led: RED_LED, GREEN_LED, or BLUE_LED
31void led_write(uint8_t led, bool value);