pimoroni-pico/micropython/modules/breakout_trackball/breakout_trackball.h

28 lines
1.4 KiB
C

// Include MicroPython API.
#include "py/runtime.h"
/***** Constants *****/
enum {
LEFT = 0,
RIGHT,
UP,
DOWN,
SW_CHANGED,
SW_PRESSED
};
/***** Extern of Class Definition *****/
extern const mp_obj_type_t breakout_trackball_BreakoutTrackball_type;
/***** Extern of Class Methods *****/
extern void BreakoutTrackball_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind);
extern mp_obj_t BreakoutTrackball_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args);
extern mp_obj_t BreakoutTrackball_change_address(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args);
extern mp_obj_t BreakoutTrackball_enable_interrupt(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args);
extern mp_obj_t BreakoutTrackball_get_interrupt(mp_obj_t self_in);
extern mp_obj_t BreakoutTrackball_set_rgbw(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args);
extern mp_obj_t BreakoutTrackball_set_red(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args);
extern mp_obj_t BreakoutTrackball_set_green(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args);
extern mp_obj_t BreakoutTrackball_set_blue(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args);
extern mp_obj_t BreakoutTrackball_set_white(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args);
extern mp_obj_t BreakoutTrackball_read(mp_obj_t self_in);