mirror of
https://gitea.tendokyu.moe/Hay1tsme/segatools.git
synced 2024-11-28 11:00:49 +01:00
27663b4b19
This is kind of a layer break but the alternative is way too much boilerplate to deal with.
29 lines
586 B
C
29 lines
586 B
C
#pragma once
|
|
|
|
#include <windows.h>
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
#include "board/sg-led.h"
|
|
#include "board/sg-nfc.h"
|
|
|
|
#include "hooklib/uart.h"
|
|
|
|
struct sg_reader {
|
|
CRITICAL_SECTION lock;
|
|
struct uart uart;
|
|
uint8_t written_bytes[520];
|
|
uint8_t readable_bytes[520];
|
|
struct sg_nfc nfc;
|
|
struct sg_led led;
|
|
};
|
|
|
|
HRESULT sg_reader_init(
|
|
struct sg_reader *reader,
|
|
unsigned int port_no);
|
|
|
|
bool sg_reader_match_irp(const struct sg_reader *reader, const struct irp *irp);
|
|
|
|
HRESULT sg_reader_handle_irp(struct sg_reader *reader, struct irp *irp);
|