aboutsummaryrefslogtreecommitdiff
path: root/ports/teensy/reg.h
diff options
context:
space:
mode:
Diffstat (limited to 'ports/teensy/reg.h')
-rw-r--r--ports/teensy/reg.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/ports/teensy/reg.h b/ports/teensy/reg.h
new file mode 100644
index 000000000..0da6378ee
--- /dev/null
+++ b/ports/teensy/reg.h
@@ -0,0 +1,13 @@
+#ifndef MICROPY_INCLUDED_TEENSY_REG_H
+#define MICROPY_INCLUDED_TEENSY_REG_H
+
+typedef struct {
+ const char *name;
+ mp_uint_t offset;
+} reg_t;
+
+#define REG_ENTRY(st, name) { #name, offsetof(st, name) }
+
+mp_obj_t reg_cmd(void *base, reg_t *reg, mp_uint_t num_reg, uint n_args, const mp_obj_t *args);
+
+#endif // MICROPY_INCLUDED_TEENSY_REG_H