ezusb: decouple some nodes from ezusb-iidx-emu

This fixes a build failure in newer gcc for popnhook.
Since node-16seg has a dependency on iidxio
This commit is contained in:
Will Xyen
2022-06-23 23:54:30 -07:00
parent 523c0ad3f2
commit dc931faf86
35 changed files with 165 additions and 150 deletions
+29
View File
@@ -0,0 +1,29 @@
#ifndef EZUSB_IIDX_EMU_NODE_H
#define EZUSB_IIDX_EMU_NODE_H
#include <stdbool.h>
#include <stdint.h>
#include "ezusb-iidx/msg.h"
/**
* Interface for an ezusb node
*/
struct ezusb_iidx_emu_node {
/* Addressable node id by the ezusb device */
const uint8_t node_id;
/* "Constructor" like init call. Called when node is added */
void (*init_node)(void);
/* Process an incoming command detrmined for this node */
uint8_t (*process_cmd)(uint8_t cmd_id, uint8_t cmd_data, uint8_t cmd_data2);
/* Bulk read data from the node */
bool (*read_packet)(struct ezusb_iidx_msg_bulk_packet *pkg);
/* Bulk write data to the node */
bool (*write_packet)(const struct ezusb_iidx_msg_bulk_packet *pkg);
};
#endif