Changeset - 5a612d89cbaf
[Not reviewed]
default
0 1 1
Ethan Zonca - 10 years ago 2014-08-24 00:21:36
ez@ethanzonca.com
Added config.h
2 files changed with 20 insertions and 13 deletions:
main.c
1
13
0 comments (0 inline, 0 general)
config.h
Show inline comments
 
new file 100644
 
#ifndef CONFIG_H
 
#define CONFIG_H
 

	
 

	
 
#define SSR_PERIOD 200
 

	
 
#define LED_POWER GPIOB,GPIO_Pin_9
 
#define LED_STAT  GPIOA,GPIO_Pin_15
 

	
 
#define MAX_CS GPIOB,GPIO_Pin_12
 

	
 
#define SW_BTN  GPIOB, GPIO_Pin_3
 
#define SW_UP   GPIOB, GPIO_Pin_4
 
#define SW_DOWN GPIOB, GPIO_Pin_6
 
#define SW_LEFT GPIOB, GPIO_Pin_5
 
#define SW_RIGHT GPIOB, GPIO_Pin_7
 

	
 

	
 
#endif
main.c
Show inline comments
 
#include "main.h"
 
#include "stm32l100c_discovery.h"
 
#include "ssd1306.h"
 
#include "config.h"
 
 
// USB includes
 
#include "hw_config.h"
 
@@ -9,20 +10,8 @@
 
#include "usb_pwr.h"
 
#include "stringhelpers.h"
 
 
#define SSR_PERIOD 200
 
 
#define LED_POWER GPIOB,GPIO_Pin_9
 
#define LED_STAT  GPIOA,GPIO_Pin_15
 
 
#define MAX_CS GPIOB,GPIO_Pin_12
 
 
// TODO: Grab buttonpresses with interrupts
 
// TODO: Eliminate screen buffer since we aren't using it...
 
#define SW_BTN  GPIOB, GPIO_Pin_3
 
#define SW_UP   GPIOB, GPIO_Pin_4
 
#define SW_DOWN GPIOB, GPIO_Pin_6
 
#define SW_LEFT GPIOB, GPIO_Pin_5
 
#define SW_RIGHT GPIOB, GPIO_Pin_7
 
 
// USB Supporting Vars
 
extern __IO uint8_t Receive_Buffer[64];
 
@@ -47,7 +36,6 @@ enum state {
 
};
 
 
 
 
static __IO uint32_t TimingDelay;
 
 
// Move to header file
0 comments (0 inline, 0 general)