aboutsummaryrefslogtreecommitdiff
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)
downloadqmk_firmware-363950982a291c3bfa03ac6362061b1d37dc06b0.tar.gz
qmk_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.
14You should have received a copy of the GNU General Public License 14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/ 16*/
17#include <util/delay.h>
18#include "action.h" 17#include "action.h"
19#include "action_util.h" 18#include "action_util.h"
20#include "action_macro.h" 19#include "action_macro.h"
20#include "wait.h"
21 21
22#ifdef DEBUG_ACTION 22#ifdef DEBUG_ACTION
23#include "debug.h" 23#include "debug.h"
@@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
28 28
29#ifndef NO_ACTION_MACRO 29#ifndef NO_ACTION_MACRO
30 30
31#define MACRO_READ() (macro = pgm_read_byte(macro_p++)) 31#define MACRO_READ() (macro = MACRO_GET(macro_p++))
32void action_macro_play(const macro_t *macro_p) 32void action_macro_play(const macro_t *macro_p)
33{ 33{
34 macro_t macro = END; 34 macro_t macro = END;
@@ -58,7 +58,7 @@ void action_macro_play(const macro_t *macro_p)
58 case WAIT: 58 case WAIT:
59 MACRO_READ(); 59 MACRO_READ();
60 dprintf("WAIT(%u)\n", macro); 60 dprintf("WAIT(%u)\n", macro);
61 { uint8_t ms = macro; while (ms--) _delay_ms(1); } 61 { uint8_t ms = macro; while (ms--) wait_ms(1); }
62 break; 62 break;
63 case INTERVAL: 63 case INTERVAL:
64 interval = MACRO_READ(); 64 interval = MACRO_READ();
@@ -77,7 +77,7 @@ void action_macro_play(const macro_t *macro_p)
77 return; 77 return;
78 } 78 }
79 // interval 79 // interval
80 { uint8_t ms = interval; while (ms--) _delay_ms(1); } 80 { uint8_t ms = interval; while (ms--) wait_ms(1); }
81 } 81 }
82} 82}
83#endif 83#endif