# HG changeset patch # User Ethan Zonca # Date 2014-08-24 00:21:36 # Node ID 5a612d89cbaf4679afd4ad78802ed9f23f755822 # Parent 91fbdc7bc1b8dd834a24c26a54e9c15f08960266 Added config.h diff --git a/config.h b/config.h new file mode 100644 --- /dev/null +++ b/config.h @@ -0,0 +1,19 @@ +#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 diff --git a/main.c b/main.c --- a/main.c +++ b/main.c @@ -1,6 +1,7 @@ #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