2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-21 17:34:03 +08:00
artiq/soc/runtime/messages.h

117 lines
1.8 KiB
C
Raw Normal View History

#ifndef __MESSAGES_H
#define __MESSAGES_H
2015-04-06 19:40:12 +08:00
#include <stdarg.h>
enum {
MESSAGE_TYPE_NOW_INIT_REQUEST,
MESSAGE_TYPE_NOW_INIT_REPLY,
MESSAGE_TYPE_NOW_SAVE,
MESSAGE_TYPE_FINISHED,
2015-04-06 19:40:12 +08:00
MESSAGE_TYPE_EXCEPTION,
MESSAGE_TYPE_WATCHDOG_SET_REQUEST,
MESSAGE_TYPE_WATCHDOG_SET_REPLY,
MESSAGE_TYPE_WATCHDOG_CLEAR,
2015-04-06 19:40:12 +08:00
MESSAGE_TYPE_RPC_REQUEST,
MESSAGE_TYPE_RPC_REPLY,
2015-04-16 21:47:05 +08:00
MESSAGE_TYPE_LOG,
2015-04-16 21:47:05 +08:00
MESSAGE_TYPE_BRG_READY,
MESSAGE_TYPE_BRG_TTL_O,
MESSAGE_TYPE_BRG_TTL_OE,
2015-05-09 17:11:34 +08:00
MESSAGE_TYPE_BRG_DDS_INITALL,
2015-04-16 21:47:05 +08:00
MESSAGE_TYPE_BRG_DDS_SEL,
MESSAGE_TYPE_BRG_DDS_RESET,
MESSAGE_TYPE_BRG_DDS_READ_REQUEST,
MESSAGE_TYPE_BRG_DDS_READ_REPLY,
MESSAGE_TYPE_BRG_DDS_WRITE,
MESSAGE_TYPE_BRG_DDS_FUD,
};
2015-04-16 21:47:05 +08:00
struct msg_base {
int type;
};
2015-04-16 21:47:05 +08:00
/* kernel messages */
struct msg_now_init_reply {
int type;
long long int now;
};
struct msg_now_save {
int type;
long long int now;
};
struct msg_exception {
int type;
int eid;
long long int eparams[3];
};
struct msg_watchdog_set_request {
int type;
int ms;
};
struct msg_watchdog_set_reply {
int type;
int id;
};
struct msg_watchdog_clear {
int type;
int id;
};
2015-04-06 19:40:12 +08:00
struct msg_rpc_request {
int type;
int rpc_num;
va_list args;
};
struct msg_rpc_reply {
int type;
2015-04-06 22:28:10 +08:00
int eid;
int retval;
2015-04-06 19:40:12 +08:00
};
struct msg_log {
int type;
const char *fmt;
va_list args;
};
2015-04-16 21:47:05 +08:00
/* bridge messages */
struct msg_brg_ttl_out {
/* used for OE and O */
2015-04-16 21:47:05 +08:00
int type;
int channel;
int value;
};
struct msg_brg_dds_sel {
int type;
int channel;
};
struct msg_brg_dds_read_request {
int type;
unsigned int address;
};
struct msg_brg_dds_read_reply {
int type;
unsigned int data;
};
struct msg_brg_dds_write {
int type;
unsigned int address;
unsigned int data;
};
#endif /* __MESSAGES_H */