1
0
forked from me/IronOS

Fix order of definitions for some variables

This commit is contained in:
Ben V. Brown
2017-07-25 08:28:33 +10:00
parent 7bedad5d51
commit f077c0241f
3 changed files with 8 additions and 8 deletions

View File

@@ -50,6 +50,7 @@
<option id="gnu.c.compiler.option.dialect.std.1983627145" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.c11" valueType="enumerated"/>
<option id="gnu.c.compiler.option.warnings.nowarn.1227270879" name="Inhibit all warnings (-w)" superClass="gnu.c.compiler.option.warnings.nowarn" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<option id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.fdata.1556802580" name="Place the data in their own section (-fdata-sections)" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.fdata" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.warnings.extrawarn.826041739" superClass="gnu.c.compiler.option.warnings.extrawarn" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.1635097739" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.211510996" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
</tool>

View File

@@ -8,11 +8,11 @@
/* Functions for access to data */
extern volatile uint32_t system_Ticks;
void delayMs(uint32_t ticks);
volatile extern uint32_t lastKeyPress;
volatile extern uint32_t lastMovement;
extern volatile uint32_t lastKeyPress;
extern volatile uint32_t lastMovement;
volatile extern uint8_t keyState;
volatile extern uint8_t rawKeys;
extern volatile uint8_t keyState;
extern volatile uint8_t rawKeys;
inline uint32_t millis() {
return system_Ticks;
@@ -39,9 +39,8 @@ inline uint16_t getButtons() {
inline uint16_t getRawButtons() {
return rawKeys;
}
inline void restoreButtons()
{
keyState=getRawButtons();
inline void restoreButtons() {
keyState = getRawButtons();
}
/*IRQ prototypes*/

View File

@@ -250,7 +250,7 @@ void Clear_Watchdog(void) {
//TIM3_ISR handles the tick of the timer 3 IRQ
void TIM3_ISR(void) {
volatile static u8 heat_flag = 0;
static volatile u8 heat_flag = 0;
//heat flag == used to make the pin toggle
//As the output is passed through a cap, the iron is on whilever we provide a square wave drive output