Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Error when compiling #182

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

/MM-control-01.sln
/__vm/.MMU_FW.vsarduino.h
.cproject
.project
.settings
/Debug
.cproject
.project
.settings
/Debug
/__vm/.MM-Control.vsarduino.h
/.vs/MM-control-01/v14/.suo
/main.cpp~RFdf1346e.TMP
/__vm/.MM-control-01.vsarduino.h
Doc
/build-env
Doc
/build-env
/MM-control-01/*.hex
/MM-control-01/version.h
1 change: 1 addition & 0 deletions MM-control-01/dirty.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define FW_LOCAL_CHANGES 1
12 changes: 6 additions & 6 deletions MM-control-01/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,45 @@

const uint8_t selector_step_pin = 0x10;

inline void selector_step_pin_init()
static inline void selector_step_pin_init()
{
DDRD |= selector_step_pin;
}
inline void selector_step_pin_set()
{
PORTD |= selector_step_pin;
}
inline void selector_step_pin_reset()
static inline void selector_step_pin_reset()
{
PORTD &= ~selector_step_pin;
}

const uint8_t idler_step_pin = 0x40;

inline void idler_step_pin_init()
static inline void idler_step_pin_init()
{
DDRD |= idler_step_pin;
}
inline void idler_step_pin_set()
{
PORTD |= idler_step_pin;
}
inline void idler_step_pin_reset()
static inline void idler_step_pin_reset()
{
PORTD &= ~idler_step_pin;
}

const uint8_t pulley_step_pin = 0x10;

inline void pulley_step_pin_init()
static inline void pulley_step_pin_init()
{
DDRB |= pulley_step_pin;
}
inline void pulley_step_pin_set()
{
PORTB |= pulley_step_pin;
}
inline void pulley_step_pin_reset()
static inline void pulley_step_pin_reset()
{
PORTB &= ~pulley_step_pin;
}
Expand Down
2 changes: 1 addition & 1 deletion MM-control-01/spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ inline void spi_setup(uint8_t spcr, uint8_t spsr)
SPSR = spsr;
}

inline uint8_t spi_txrx(uint8_t tx)
static inline uint8_t spi_txrx(uint8_t tx)
{
SPDR = tx;
while (!(SPSR & (1 << SPIF)));
Expand Down
8 changes: 4 additions & 4 deletions MM-control-01/tmc2130.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ inline uint16_t __tcoolthrs(uint8_t axis)
return TMC2130_TCOOLTHRS;
}

inline int8_t __sg_thr(uint8_t axis)
static inline int8_t __sg_thr(uint8_t axis)
{
switch (axis)
{
Expand All @@ -147,7 +147,7 @@ inline int8_t __sg_thr(uint8_t axis)
return TMC2130_SG_THR;
}

inline int8_t __res(uint8_t axis)
static inline int8_t __res(uint8_t axis)
{
switch (axis)
{
Expand Down Expand Up @@ -269,7 +269,7 @@ uint16_t tmc2130_read_sg(uint8_t axis)
}


inline void tmc2130_cs_low(uint8_t axis)
static inline void tmc2130_cs_low(uint8_t axis)
{
switch (axis)
{
Expand All @@ -279,7 +279,7 @@ inline void tmc2130_cs_low(uint8_t axis)
}
}

inline void tmc2130_cs_high(uint8_t axis)
static inline void tmc2130_cs_high(uint8_t axis)
{
switch (axis)
{
Expand Down
15 changes: 15 additions & 0 deletions MM-control-01/version.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//! @file

#ifndef VERSION_H_
#define VERSION_H_

static const uint16_t fw_version = 106; //!< example: 103 means version 1.0.3
static const uint16_t fw_buildnr = 374; //!< number of commits preceeding current HEAD
#define FW_HASH "13bc6224bf30c95a6305cf5924a0a93bd942c4f1"

//! @macro FW_LOCAL_CHANGES
//! @val 0 no changes in tracked local files
//! @val 1 some local git tracked files has been changed
#include "dirty.h"

#endif //VERSION_H_