summaryrefslogtreecommitdiffstatshomepage
path: root/teensy/reg.h
blob: 5d1d27443b56e2c6e62c14012bf647c7debf196b (plain) (blame)
1
2
3
4
5
6
7
8
typedef struct {
    const char *name;
    mp_uint_t   offset;
} reg_t;

#define REG_ENTRY(st, name) { #name, offsetof(st, name) }

mp_obj_t reg_cmd(void *base, reg_t *reg, mp_uint_t num_reg, uint n_args, const mp_obj_t *args);