adjusted for submodules and c99

This commit is contained in:
Wolfgang Hottgenroth 2016-09-19 13:34:08 +02:00
parent 16b64e6c15
commit 25f272ec49
4 changed files with 95 additions and 4 deletions

View File

@ -24,10 +24,21 @@
<tool id="dk.xpg.msp430eclipse.tool.compiler.gcc.1609866167" name="MSP430 C Compiler" superClass="dk.xpg.msp430eclipse.tool.compiler.gcc">
<option defaultValue="dk.xpg.msp430eclipse.compiler.option.optimization.level.none" id="dk.xpg.msp430eclipse.compiler.option.optimization.level.1638221170" name="Optimization Level" superClass="dk.xpg.msp430eclipse.compiler.option.optimization.level" valueType="enumerated"/>
<option defaultValue="dk.xpg.msp430eclipse.compiler.option.debugging.level.default" id="dk.xpg.msp430eclipse.compiler.option.debugging.level.423105011" name="Debugging Level" superClass="dk.xpg.msp430eclipse.compiler.option.debugging.level" valueType="enumerated"/>
<option id="dk.xpg.msp430eclipse.compiler.option.includes.paths.113771113" name="Include paths (-I)" superClass="dk.xpg.msp430eclipse.compiler.option.includes.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Inverter0/hottislib}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Inverter0/hottislibformsp430}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Inverter0/src}&quot;"/>
</option>
<option id="dk.xpg.msp430eclipse.compiler.option.language.standard.1069227926" superClass="dk.xpg.msp430eclipse.compiler.option.language.standard" useByScannerDiscovery="false" value="dk.xpg.msp430eclipse.compiler.option.language.standard.gnu99" valueType="enumerated"/>
<inputType id="dk.xpg.msp430eclipse.tool.compiler.gcc.input.2144495992" name="C Source File" superClass="dk.xpg.msp430eclipse.tool.compiler.gcc.input"/>
<inputType id="dk.xpg.msp430eclipse.tool.compiler.gcc.input.cc.194364093" name="C++ Source File" superClass="dk.xpg.msp430eclipse.tool.compiler.gcc.input.cc"/>
</tool>
<tool id="dk.xpg.msp430eclipse.tool.assembler.gcc.1721201165" name="MSP430 Assembler" superClass="dk.xpg.msp430eclipse.tool.assembler.gcc">
<option id="dk.xpg.msp430eclipse.assembler.option.general.include.1531893167" name="Include Paths (-I)" superClass="dk.xpg.msp430eclipse.assembler.option.general.include" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Inverter0/hottislib}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Inverter0/hottislibformsp430}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Inverter0/src}&quot;"/>
</option>
<inputType id="dk.xpg.msp430eclipse.tool.assembler.input.975463794" name="Assembler Files" superClass="dk.xpg.msp430eclipse.tool.assembler.input"/>
</tool>
<tool id="dk.xpg.msp430eclipse.tool.linker.gcc.1458265663" name="MSP430 Linker" superClass="dk.xpg.msp430eclipse.tool.linker.gcc">
@ -37,7 +48,9 @@
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="hottislibformsp430|hottislib|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="hottislib"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="hottislibformsp430"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
@ -67,10 +80,20 @@
<tool id="dk.xpg.msp430eclipse.tool.compiler.gcc.1537175940" name="MSP430 C Compiler" superClass="dk.xpg.msp430eclipse.tool.compiler.gcc">
<option defaultValue="dk.xpg.msp430eclipse.compiler.option.optimization.level.most" id="dk.xpg.msp430eclipse.compiler.option.optimization.level.1433764379" name="Optimization Level" superClass="dk.xpg.msp430eclipse.compiler.option.optimization.level" valueType="enumerated"/>
<option defaultValue="dk.xpg.msp430eclipse.compiler.option.debugging.level.none" id="dk.xpg.msp430eclipse.compiler.option.debugging.level.1577775141" name="Debugging Level" superClass="dk.xpg.msp430eclipse.compiler.option.debugging.level" valueType="enumerated"/>
<option id="dk.xpg.msp430eclipse.compiler.option.includes.paths.1055888372" name="Include paths (-I)" superClass="dk.xpg.msp430eclipse.compiler.option.includes.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Inverter0/hottislib}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Inverter0/hottislibformsp430}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Inverter0/src}&quot;"/>
</option>
<inputType id="dk.xpg.msp430eclipse.tool.compiler.gcc.input.2045842702" name="C Source File" superClass="dk.xpg.msp430eclipse.tool.compiler.gcc.input"/>
<inputType id="dk.xpg.msp430eclipse.tool.compiler.gcc.input.cc.1959192171" name="C++ Source File" superClass="dk.xpg.msp430eclipse.tool.compiler.gcc.input.cc"/>
</tool>
<tool id="dk.xpg.msp430eclipse.tool.assembler.gcc.1184555326" name="MSP430 Assembler" superClass="dk.xpg.msp430eclipse.tool.assembler.gcc">
<option id="dk.xpg.msp430eclipse.assembler.option.general.include.1398107933" name="Include Paths (-I)" superClass="dk.xpg.msp430eclipse.assembler.option.general.include" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Inverter0/hottislib}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Inverter0/hottislibformsp430}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Inverter0/src}&quot;"/>
</option>
<inputType id="dk.xpg.msp430eclipse.tool.assembler.input.1253938813" name="Assembler Files" superClass="dk.xpg.msp430eclipse.tool.assembler.input"/>
</tool>
<tool id="dk.xpg.msp430eclipse.tool.linker.gcc.1512735383" name="MSP430 Linker" superClass="dk.xpg.msp430eclipse.tool.linker.gcc">
@ -91,8 +114,21 @@
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="Inverter0.dk.xpg.msp430eclipse.project.gcc.elf.1154280891" name="MSP430 Cross Target Application" projectType="dk.xpg.msp430eclipse.project.gcc.elf"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="dk.xpg.msp430eclipse.configuration.app.debug.1419592438;dk.xpg.msp430eclipse.configuration.app.debug.1419592438.;dk.xpg.msp430eclipse.tool.compiler.gcc.1609866167;dk.xpg.msp430eclipse.tool.compiler.gcc.input.cc.194364093">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="dk.xpg.msp430eclipse.MSP430GCCManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="dk.xpg.msp430eclipse.configuration.app.release.1114517046;dk.xpg.msp430eclipse.configuration.app.release.1114517046.;dk.xpg.msp430eclipse.tool.compiler.gcc.1537175940;dk.xpg.msp430eclipse.tool.compiler.gcc.input.2045842702">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="dk.xpg.msp430eclipse.MSP430GCCManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="dk.xpg.msp430eclipse.configuration.app.debug.1419592438;dk.xpg.msp430eclipse.configuration.app.debug.1419592438.;dk.xpg.msp430eclipse.tool.compiler.gcc.1609866167;dk.xpg.msp430eclipse.tool.compiler.gcc.input.2144495992">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="dk.xpg.msp430eclipse.MSP430GCCManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="dk.xpg.msp430eclipse.configuration.app.release.1114517046;dk.xpg.msp430eclipse.configuration.app.release.1114517046.;dk.xpg.msp430eclipse.tool.compiler.gcc.1537175940;dk.xpg.msp430eclipse.tool.compiler.gcc.input.cc.1959192171">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="dk.xpg.msp430eclipse.MSP430GCCManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
</cproject>

24
src/gpioCfg.c Normal file
View File

@ -0,0 +1,24 @@
/*
* gpioCfg.c
*
* Created on: 29.08.2016
* Author: wn
*/
#include <msp430g2553.h>
#include "gpio.h"
tPinCfg pinCfg[PINS_END] = {
{PORT1, BIT7, PIN_OUT, LOW}, //A
{PORT1, BIT6, PIN_OUT, LOW}, //B
{PORT2, BIT1, PIN_OUT, LOW}, //C
{PORT2, BIT3, PIN_OUT, LOW}, //D
{PORT2, BIT4, PIN_OUT, LOW}, //E
{PORT2, BIT5, PIN_OUT, LOW}, //F
{PORT2, BIT2, PIN_OUT, LOW}, //G
{PORT2, BIT0, PIN_OUT, HIGH}, //0
{PORT1, BIT5, PIN_OUT, HIGH}, //1
{PORT1, BIT2, PIN_OUT, HIGH}, //2
{PORT1, BIT0, PIN_IN_PULLUP, LOW}, // BUTTON_1
{PORT1, BIT1, PIN_OUT, LOW}, // LED_1
};

31
src/gpioCfg.h Normal file
View File

@ -0,0 +1,31 @@
/*
* gpioCfg.h
*
* Created on: 18.09.2016
* Author: wn
*/
#ifndef GPIOCFG_H_
#define GPIOCFG_H_
#include "gpio.h"
typedef enum {
PINS_FIRST,
SEG_A = PINS_FIRST,
SEG_B,
SEG_C,
SEG_D,
SEG_E,
SEG_F,
SEG_G,
DIGIT_0,
DIGIT_1,
DIGIT_2,
BUTTON_1,
LED_1,
PINS_END
} tPin;
#endif /* GPIOCFG_H_ */

View File

@ -10,14 +10,14 @@
#include <stdint.h>
#include "time.h"
// #include "PontCoopScheduler.h"
#include "PontCoopScheduler.h"
volatile uint32_t timestamp;
ISR(TIMER0_A0, TA0_ISR) {
timestamp++;
// schUpdate();
schUpdate();
}
void timeInit() {