micropython/stm/led.h
Damien d99b05282d 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).
2013-12-21 18:17:45 +00:00

13 lines
240 B
C

typedef enum {
PYB_LED_R1 = 0,
PYB_LED_R2 = 1,
PYB_LED_G1 = 2,
PYB_LED_G2 = 3,
} pyb_led_t;
void led_init(void);
void led_state(pyb_led_t led, int state);
void led_toggle(pyb_led_t led);
mp_obj_t pyb_Led(mp_obj_t led_id);