Skip to content
Snippets Groups Projects
Select Git revision
  • a80ff04fe7458b8ed8e948619b3700b720832ec2
  • wip-bootstrap default
  • dualcore
  • ch3/leds
  • ch3/time
  • master
6 results

builtin.h

Blame
    • Paul Sokolovsky's avatar
      a80ff04f
      Add dummy bytes() constructor. · a80ff04f
      Paul Sokolovsky authored
      Currently, MicroPython strings are mix between CPython byte and unicode
      strings. So, conversion is null so far. This dummy implementation is
      intended for compatibility with CPython (so, same code can run on both).
      a80ff04f
      History
      Add dummy bytes() constructor.
      Paul Sokolovsky authored
      Currently, MicroPython strings are mix between CPython byte and unicode
      strings. So, conversion is null so far. This dummy implementation is
      intended for compatibility with CPython (so, same code can run on both).
    api.h 375 B
    #ifndef _API_H
    #define _API_H
    #include <stdint.h>
    
    #ifndef API
    #  define API(id, def) def
    #endif
    
    #define API_BUZZER 0x35c3
    API(API_BUZZER, void api_set_buzzer(uint8_t state));
    
    typedef struct {
        uint8_t red;
        uint8_t green;
        uint8_t blue;
    } led_color_t;
    
    #define API_LED 0xc0ffee
    API(API_LED, void api_set_led(uint8_t led, led_color_t color));
    
    #endif /* _API_H */