Skip to content
Snippets Groups Projects
api.h 482 B
Newer Older
  • Learn to ignore specific revisions
  • rahix's avatar
    rahix committed
    #ifndef _API_H
    #define _API_H
    
    rahix's avatar
    rahix committed
    #include <stdint.h>
    
    rahix's avatar
    rahix committed
    
    #ifndef API
    #  define API(id, def) def
    #endif
    
    
    rahix's avatar
    rahix committed
    #define API_BUZZER 0x35c3
    API(API_BUZZER, void api_set_buzzer(uint8_t state));
    
    rahix's avatar
    rahix committed
    
    typedef struct {
    
    rahix's avatar
    rahix committed
        uint8_t red;
        uint8_t green;
        uint8_t blue;
    } led_color_t;
    
    rahix's avatar
    rahix committed
    
    
    rahix's avatar
    rahix committed
    #define API_LED 0xc0ffee
    API(API_LED, void api_set_led(uint8_t led, led_color_t color));
    
    rahix's avatar
    rahix committed
    
    
    ch3's avatar
    ch3 committed
    #define API_TEST 0xdeadc0de
    API(API_TEST, void api_test(char test0, short test1, int test2, long test3));
    
    
    rahix's avatar
    rahix committed
    #endif /* _API_H */