aboutsummaryrefslogtreecommitdiffstats
path: root/src/endstop.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-03-09 13:49:03 -0500
committerKevin O'Connor <kevin@koconnor.net>2017-03-09 13:49:03 -0500
commit60a4bda9d489aa6c1da46ed35a2e7b414ba1ff59 (patch)
tree5cff0cfa54f76af6e137eddb6628b1daa34d816a /src/endstop.c
parentd5fc594317de58ad0c82e82eaa219dc0ca538990 (diff)
downloadkutter-60a4bda9d489aa6c1da46ed35a2e7b414ba1ff59.tar.gz
kutter-60a4bda9d489aa6c1da46ed35a2e7b414ba1ff59.tar.xz
kutter-60a4bda9d489aa6c1da46ed35a2e7b414ba1ff59.zip
basecmd: Use oid_ prefix for the oid manipulation functions
Consistently use an "oid_" prefix on the oid functions - this makes them similar to other functions with a common prefix. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/endstop.c')
-rw-r--r--src/endstop.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/endstop.c b/src/endstop.c
index fc63f123..ae41656a 100644
--- a/src/endstop.c
+++ b/src/endstop.c
@@ -4,7 +4,7 @@
//
// This file may be distributed under the terms of the GNU GPLv3 license.
-#include "basecmd.h" // alloc_oid
+#include "basecmd.h" // oid_alloc
#include "board/gpio.h" // struct gpio
#include "board/irq.h" // irq_disable
#include "command.h" // DECL_COMMAND
@@ -40,8 +40,8 @@ end_stop_event(struct timer *t)
void
command_config_end_stop(uint32_t *args)
{
- struct end_stop *e = alloc_oid(args[0], command_config_end_stop, sizeof(*e));
- struct stepper *s = lookup_oid(args[3], command_config_stepper);
+ struct end_stop *e = oid_alloc(args[0], command_config_end_stop, sizeof(*e));
+ struct stepper *s = oid_lookup(args[3], command_config_stepper);
e->time.func = end_stop_event;
e->stepper = s;
e->pin = gpio_in_setup(args[1], args[2]);
@@ -53,7 +53,7 @@ DECL_COMMAND(command_config_end_stop,
void
command_end_stop_home(uint32_t *args)
{
- struct end_stop *e = lookup_oid(args[0], command_config_end_stop);
+ struct end_stop *e = oid_lookup(args[0], command_config_end_stop);
sched_del_timer(&e->time);
e->time.waketime = args[1];
e->rest_time = args[2];
@@ -87,7 +87,7 @@ void
command_end_stop_query(uint32_t *args)
{
uint8_t oid = args[0];
- struct end_stop *e = lookup_oid(oid, command_config_end_stop);
+ struct end_stop *e = oid_lookup(oid, command_config_end_stop);
end_stop_report(oid, e);
}
DECL_COMMAND(command_end_stop_query, "end_stop_query oid=%c");