36 typedef void write_fn(uint8_t chan, uint8_t *
buf, uint8_t len);
39 init_fn init_ ## _s; \
40 poll_fn poll_ ## _s; \
41 read_len_fn read_ ## _s ## _len; \
42 read_fn read_ ## _s; \
43 read_done_fn read_ ## _s ## _done; \
44 write_check_fn write_ ## _s ## _check; \
45 write_fn write_ ## _s; \
48 #ifdef CONDITIONAL_SEARCH
50 alert_check_fn alert_ ## _s ## _check; \
51 alert_fill_fn alert_ ## _s ## _fill;
53 #define ADEFS(_s) // nothing
56 #define ALIASDEFS(_s) \
57 init_fn init_ ## _s __attribute__((weak,alias("dummy_init_fn"))); \
58 poll_fn poll_ ## _s __attribute__((weak,alias("dummy_poll_fn"))); \
59 read_len_fn read_ ## _s ## _len __attribute__((weak,alias("dummy_read_len_fn"))); \
60 read_fn read_ ## _s __attribute__((weak,alias("dummy_read_fn"))); \
61 read_done_fn read_ ## _s ## _done __attribute__((weak,alias("dummy_read_done_fn"))); \
62 write_check_fn write_ ## _s ## _check __attribute__((weak,alias("dummy_write_check_fn"))); \
63 write_fn write_ ## _s __attribute__((weak,alias("dummy_write_fn"))); \
65 #ifdef CONDITIONAL_SEARCH
66 #define ALERT_ALIASDEF(_s) \
67 alert_check_fn alert_ ## _s ## _check __attribute__((weak,alias("dummy_alert_check_fn"))); \
68 alert_fill_fn alert_ ## _s ## _fill __attribute__((weak,alias("dummy_alert_fill_fn")));
70 #define ALERT_ALIASDEF(x) // nothing
73 #define FUNCPTRS(_s) \
77 &read_ ## _s ## _len, \
79 &read_ ## _s ## _done, \
80 &write_ ## _s ## _check, \
84 #ifdef CONDITIONAL_SEARCH
85 #define ALERTPTRS(_s) \
86 &alert_ ## _s ## _check, \
87 &alert_ ## _s ## _fill,
89 #define ALERTPTRS(x) // nothing
100 #ifdef CONDITIONAL_SEARCH
107 extern const uint8_t moat_sizes[TC_MAX]
__attribute__ ((progmem));
109 #if defined(IS_BOOTLOADER) || defined(USE_BOOTLOADER)
118 #define TC_DEFINE(x) \
126 #endif // moat_internal.h
void read_fn(uint8_t chan, uint8_t *buf)
Definition: moat_internal.h:31
write_check_fn * write_check
Definition: moat_internal.h:98
void write_check_fn(uint8_t chan, uint8_t *buf, uint8_t len)
Definition: moat_internal.h:35
read_done_fn * read_done
Definition: moat_internal.h:97
void init_fn(void)
Definition: moat_internal.h:28
poll_fn * poll
Definition: moat_internal.h:94
const moat_call_t moat_calls[TC_MAX] __attribute__((progmem))
void read_done_fn(uint8_t chan)
Definition: moat_internal.h:32
void alert_fill_fn(uint8_t *buf)
Definition: moat_internal.h:34
char alert_check_fn(void)
Definition: moat_internal.h:33
void poll_fn(void)
Definition: moat_internal.h:29
tuple buf
Definition: DeviceGeneric.py:119
init_fn * init
Definition: moat_internal.h:93
void end_transmission(uint16_t crc)
Definition: moat.c:49
uint8_t moat_alert_present
uint8_t moat_buf[MAXBUF]
Definition: moat.c:72
read_len_fn * read_len
Definition: moat_internal.h:95
void write_fn(uint8_t chan, uint8_t *buf, uint8_t len)
Definition: moat_internal.h:36
Definition: moat_internal.h:92
read_fn * read
Definition: moat_internal.h:96
write_fn * write
Definition: moat_internal.h:99
def init
Definition: ow-slave-test.py:11
#define MAXBUF
Definition: moat_internal.h:21
uint8_t read_len_fn(uint8_t chan)
Definition: moat_internal.h:30