summaryrefslogtreecommitdiff
path: root/teensy/reg.h
blob: 0da6378ee7add570ddab0915b219be90864e1e9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#ifndef MICROPY_INCLUDED_TEENSY_REG_H
#define MICROPY_INCLUDED_TEENSY_REG_H

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);

#endif // MICROPY_INCLUDED_TEENSY_REG_H