aboutsummaryrefslogtreecommitdiffstats
path: root/common/action_macro.c
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2014-11-24 13:50:33 +0900
committertmk <nobody@nowhere>2014-11-24 13:50:33 +0900
commit363950982a291c3bfa03ac6362061b1d37dc06b0 (patch)
treec46fc53fe00137ced3c8edd3d0766ee844f77516 /common/action_macro.c
parenteb90ed6238426db9367e294abfaefb5de07564f5 (diff)
parent60096e11c77980ca6b54674c5b68248e8aa15d8d (diff)
downloadfirmware-363950982a291c3bfa03ac6362061b1d37dc06b0.tar.gz
firmware-363950982a291c3bfa03ac6362061b1d37dc06b0.tar.bz2
firmware-363950982a291c3bfa03ac6362061b1d37dc06b0.zip
Merge branch 'rn42' into merge_rn42
Conflicts: .gitignore common.mk common/debug_config.h common/print.h
Diffstat (limited to 'common/action_macro.c')
-rw-r--r--common/action_macro.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/action_macro.c b/common/action_macro.c
index d85aee379..ba93fc8b2 100644
--- a/common/action_macro.c
+++ b/common/action_macro.c
@@ -14,10 +14,10 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <util/delay.h>
#include "action.h"
#include "action_util.h"
#include "action_macro.h"
+#include "wait.h"
#ifdef DEBUG_ACTION
#include "debug.h"
@@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef NO_ACTION_MACRO
-#define MACRO_READ() (macro = pgm_read_byte(macro_p++))
+#define MACRO_READ() (macro = MACRO_GET(macro_p++))
void action_macro_play(const macro_t *macro_p)
{
macro_t macro = END;
@@ -58,7 +58,7 @@ void action_macro_play(const macro_t *macro_p)
case WAIT:
MACRO_READ();
dprintf("WAIT(%u)\n", macro);
- { uint8_t ms = macro; while (ms--) _delay_ms(1); }
+ { uint8_t ms = macro; while (ms--) wait_ms(1); }
break;
case INTERVAL:
interval = MACRO_READ();
@@ -77,7 +77,7 @@ void action_macro_play(const macro_t *macro_p)
return;
}
// interval
- { uint8_t ms = interval; while (ms--) _delay_ms(1); }
+ { uint8_t ms = interval; while (ms--) wait_ms(1); }
}
}
#endif