Skip to content

Commit

Permalink
Install abort primitive on zephyr
Browse files Browse the repository at this point in the history
  • Loading branch information
MaartenS11 committed Oct 30, 2024
1 parent 5464d29 commit 7b98765
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Primitives/zephyr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include "primitives.h"

#define NUM_PRIMITIVES 0
#define NUM_PRIMITIVES_ARDUINO 12
#define NUM_PRIMITIVES_ARDUINO 13

#define ALL_PRIMITIVES (NUM_PRIMITIVES + NUM_PRIMITIVES_ARDUINO)

Expand Down Expand Up @@ -391,6 +391,8 @@ class MotorEncoder {
// encoder->pin6_encoder_spec.pin));
encoder->expect_pin5_int = false;
encoder->expect_pin6_int = true;

printf("encoder->angle = %d\n", encoder->angle);
}

static void encoder_pin6_edge_rising(const struct device *dev,
Expand All @@ -412,6 +414,8 @@ class MotorEncoder {
// encoder->pin5_encoder_spec.pin));
encoder->expect_pin6_int = false;
encoder->expect_pin5_int = true;

printf("encoder->angle = %d\n", encoder->angle);
}

public:
Expand Down Expand Up @@ -989,6 +993,7 @@ def_prim(abort, NoneToNoneU32) {
//------------------------------------------------------
void install_primitives() {
dbg_info("INSTALLING PRIMITIVES\n");
install_primitive(abort);
install_primitive(chip_delay);
install_primitive(chip_pin_mode);
install_primitive(chip_digital_write);
Expand Down

0 comments on commit 7b98765

Please sign in to comment.