mirror of
https://github.com/Polprzewodnikowy/SummerCart64.git
synced 2025-01-14 13:39:14 +01:00
0dbec80183
- N64 -> PC heartbeat datatype support - PC -> N64 debug write timeout implementation (1 second) - PC -> N64 text datatype bug fix (added null byte at the end) - 64DD disk insertion by default
39 lines
858 B
C
39 lines
858 B
C
#ifndef USB_H__
|
|
#define USB_H__
|
|
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
|
|
typedef enum packet_cmd {
|
|
PACKET_CMD_BUTTON_TRIGGER = 'B',
|
|
PACKET_CMD_DATA_FLUSHED = 'G',
|
|
PACKET_CMD_DEBUG_OUTPUT = 'U',
|
|
PACKET_CMD_DD_REQUEST = 'D',
|
|
PACKET_CMD_ISV_OUTPUT = 'I',
|
|
PACKET_CMD_SAVE_WRITEBACK = 'S',
|
|
PACKET_CMD_UPDATE_STATUS = 'F',
|
|
} usb_packet_cmd_e;
|
|
|
|
|
|
typedef struct usb_tx_info {
|
|
uint8_t cmd;
|
|
uint32_t data_length;
|
|
uint32_t data[4];
|
|
uint32_t dma_length;
|
|
uint32_t dma_address;
|
|
void (*done_callback)(void);
|
|
} usb_tx_info_t;
|
|
|
|
|
|
void usb_create_packet (usb_tx_info_t *info, usb_packet_cmd_e cmd);
|
|
bool usb_enqueue_packet (usb_tx_info_t *info);
|
|
bool usb_prepare_read (uint32_t *args);
|
|
void usb_get_read_info (uint32_t *args);
|
|
void usb_init (void);
|
|
void usb_process (void);
|
|
|
|
|
|
#endif
|