Changeset - 667b32311f8f
[Not reviewed]
default
19 4 15
Ethan Zonca - 8 years ago 2017-06-23 12:34:32
ezonca@sealandaire.com
Reorganize structure and cleanup
23 files changed with 8 insertions and 172 deletions:
0 comments (0 inline, 0 general)
.cproject
Show inline comments
 
@@ -47,52 +47,58 @@
 
							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1641379360" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
 
							<builder buildPath="${workspace_loc:/S3467-MiniBuoy-BT-Sensor-Software}/Debug" id="ilg.gnuarmeclipse.managedbuild.cross.builder.1145700756" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder">
 
								<outputEntries>
 
									<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="Debug"/>
 
									<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="Release"/>
 
								</outputEntries>
 
							</builder>
 
							<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.1885536253" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
 
								<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.1335843010" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" useByScannerDiscovery="false" value="true" valueType="boolean"/>
 
								<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.119815874" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths" useByScannerDiscovery="false" valueType="includePath">
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/drivers/CMSIS/Include}&quot;"/>
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}&quot;"/>
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/lib&quot;"/>
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/drivers/CMSIS/Device/ST/STM32F3xx/Include}&quot;"/>
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/inc/system&quot;"/>
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/ldscripts/STM32F302K8_FLASH.ld}&quot;"/>
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/drivers/STM32F3xx_HAL_Driver/Inc}&quot;"/>
 
								</option>
 
								<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs.2115290648" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
 
									<listOptionValue builtIn="false" value="STM32F302x8"/>
 
								</option>
 
								<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.1515695785" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
 
							</tool>
 
							<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1368546832" name="Cross ARM C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
 
								<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.1718280814" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="false" valueType="includePath">
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/drivers/CMSIS/Include}&quot;"/>
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}&quot;"/>
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/lib&quot;"/>
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/drivers/CMSIS/Device/ST/STM32F3xx/Include}&quot;"/>
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/inc/system&quot;"/>
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/ldscripts/STM32F302K8_FLASH.ld}&quot;"/>
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/drivers/STM32F3xx_HAL_Driver/Inc}&quot;"/>
 
								</option>
 
								<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.2029242032" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
 
									<listOptionValue builtIn="false" value="STM32F302x8"/>
 
								</option>
 
								<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1631434836" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
 
							</tool>
 
							<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1466486850" name="Cross ARM C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
 
								<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths.1649547949" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths" useByScannerDiscovery="false" valueType="includePath">
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/drivers/CMSIS/Include}&quot;"/>
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}&quot;"/>
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/lib&quot;"/>
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/inc/system&quot;"/>
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/drivers/CMSIS/Device/ST/STM32F3xx/Include}&quot;"/>
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/ldscripts/STM32F302K8_FLASH.ld}&quot;"/>
 
									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/drivers/STM32F3xx_HAL_Driver/Inc}&quot;"/>
 
								</option>
 
								<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.noexceptions.2001834700" name="Do not use exceptions (-fno-exceptions)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.noexceptions" useByScannerDiscovery="true" value="true" valueType="boolean"/>
 
								<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nortti.464976546" name="Do not use RTTI (-fno-rtti)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nortti" useByScannerDiscovery="true" value="true" valueType="boolean"/>
 
								<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nousecxaatexit.1192802280" name="Do not use _cxa_atexit() (-fno-use-cxa-atexit)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nousecxaatexit" useByScannerDiscovery="true" value="true" valueType="boolean"/>
 
								<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nothreadsafestatics.575366037" name="Do not use thread-safe statics (-fno-threadsafe-statics)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nothreadsafestatics" useByScannerDiscovery="true" value="true" valueType="boolean"/>
 
								<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.324180980" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
 
									<listOptionValue builtIn="false" value="STM32F302x8"/>
 
								</option>
inc/buttons.h
Show inline comments
 
deleted file
inc/config.h
Show inline comments
 
@@ -21,34 +21,26 @@
 
// Solid-state relay maximum on-time
 
#define SSR_PERIOD 200
 
 
// Interval of PID calculations
 
#define PID_PERIOD 120
 
 
 
 
// Pin settings
 
#define LED_POWER GPIOF,GPIO_PIN_0
 
#define MAX_CS GPIOA,GPIO_PIN_15
 
 
#define SW_BTN  GPIOB, GPIO_PIN_4
 
#define SW_UP   GPIOB, GPIO_PIN_7
 
#define SW_DOWN GPIOB, GPIO_PIN_3
 
#define SW_LEFT GPIOB, GPIO_PIN_5
 
#define SW_RIGHT GPIOB, GPIO_PIN_6
 
 
#define SSR_PIN GPIOA, GPIO_PIN_1
 
 
// Visual niceness
 
#define hal_init() HAL_Init()
 
 
// Add bootloader option to top of idle screen menu
 
#define BOOTLOADER_SHORTCUT
 
 
 
#define DEFAULT_BOOT_TO_BREW 0
 
#define DEFAULT_TEMP_UNITS TEMP_UNITS_FAHRENHEIT
 
#define DEFAULT_WINDUP_GUARD 10
 
#define DEFAULT_K_P 10
 
#define DEFAULT_K_I 1
 
#define DEFAULT_K_D 1
 
#define DEFAULT_TEMP_OFFSET 0
inc/dma.h
Show inline comments
 
deleted file
inc/system/error.h
Show inline comments
 
file renamed from inc/error.h to inc/system/error.h
inc/system/flash.h
Show inline comments
 
file renamed from inc/flash.h to inc/system/flash.h
inc/system/gpio.h
Show inline comments
 
file renamed from inc/gpio.h to inc/system/gpio.h
inc/system/interrupts.h
Show inline comments
 
file renamed from inc/interrupts.h to inc/system/interrupts.h
inc/system/system.h
Show inline comments
 
file renamed from inc/system.h to inc/system/system.h
inc/system/watchdog.h
Show inline comments
 
file renamed from inc/watchdog.h to inc/system/watchdog.h
lib/ssd1306/ssd1306.c
Show inline comments
 
file renamed from src/ssd1306.c to lib/ssd1306/ssd1306.c
lib/ssd1306/ssd1306.h
Show inline comments
 
file renamed from inc/ssd1306.h to lib/ssd1306/ssd1306.h
src/buttons.c
Show inline comments
 
deleted file
src/display.c
Show inline comments
 
#include "display.h"
 
#include "gpio.h"
 
#include "ssd1306.h"
 
#include "ssd1306/ssd1306.h"
 
#include "system/stringhelpers.h"
 
#include "flash.h"
 

	
 
// Private function prototypes
 
static void draw_setpoint(therm_status_t* status);
 

	
 

	
 
// Button transition variables
 
static uint8_t sw_btn_last = 0;
 
static uint8_t sw_up_last = 0;
 
static uint8_t sw_down_last = 0;
 
static uint8_t sw_left_last = 0;
src/dma.c
Show inline comments
 
deleted file
src/main.c
Show inline comments
 
@@ -5,28 +5,26 @@
 
//
 
 
#include "stm32f3xx_hal.h"
 
#include "config.h"
 
 
#include "watchdog.h"
 
#include "system.h"
 
#include "display.h"
 
#include "gpio.h"
 
#include "pid.h"
 
#include "error.h"
 
#include "flash.h"
 
#include "ssd1306.h"
 
#include "dma.h"
 
#include "ssd1306/ssd1306.h"
 
#include "interrupts.h"
 
#include "buttons.h"
 
 
 
therm_settings_t set;
 
therm_status_t status;
 
pid_state_t pid_state;
 
 
 
int main(void)
 
{
 
	sysclock_init();
 
	hal_init();
 
	gpio_init();
src/system/error.c
Show inline comments
 
file renamed from src/error.c to src/system/error.c
src/system/flash.c
Show inline comments
 
file renamed from src/flash.c to src/system/flash.c
src/system/gpio.c
Show inline comments
 
file renamed from src/gpio.c to src/system/gpio.c
src/system/interrupts.c
Show inline comments
 
file renamed from src/interrupts.c to src/system/interrupts.c
src/system/sbrk.c
Show inline comments
 
file renamed from src/sbrk.c to src/system/sbrk.c
src/system/system.c
Show inline comments
 
file renamed from src/system.c to src/system/system.c
src/system/watchdog.c
Show inline comments
 
file renamed from src/watchdog.c to src/system/watchdog.c
0 comments (0 inline, 0 general)