summaryrefslogtreecommitdiff
path: root/stm/servo.h
diff options
context:
space:
mode:
authorDamien <damien.p.george@gmail.com>2013-12-21 18:17:45 +0000
committerDamien <damien.p.george@gmail.com>2013-12-21 18:17:45 +0000
commitd99b05282d14ceb0163cbcd059aa37bdb415af43 (patch)
tree978135f9fe83d3c4d5b3c95f84cb104c0092936a /stm/servo.h
parente2880aa2fdc75298df487df7519d483acb03959c (diff)
Change object representation from 1 big union to individual structs.
A big change. Micro Python objects are allocated as individual structs with the first element being a pointer to the type information (which is itself an object). This scheme follows CPython. Much more flexible, not necessarily slower, uses same heap memory, and can allocate objects statically. Also change name prefix, from py_ to mp_ (mp for Micro Python).
Diffstat (limited to 'stm/servo.h')
-rw-r--r--stm/servo.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/stm/servo.h b/stm/servo.h
new file mode 100644
index 000000000..02702e067
--- /dev/null
+++ b/stm/servo.h
@@ -0,0 +1,5 @@
+void servo_init(void);
+
+mp_obj_t pyb_servo_set(mp_obj_t port, mp_obj_t value);
+mp_obj_t pyb_pwm_set(mp_obj_t period, mp_obj_t pulse);
+mp_obj_t pyb_Servo(mp_obj_t servo_id);