mirror of
https://gitea.tendokyu.moe/Dniel97/segatools.git
synced 2024-11-14 08:07:37 +01:00
bc2928804c
Combine the NFC module emulator with the LED module emulator and a virtual UART to build a higher-level reusable building block.
29 lines
587 B
C
29 lines
587 B
C
#pragma once
|
|
|
|
#include <windows.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;
|
|
};
|
|
|
|
void sg_reader_init(
|
|
struct sg_reader *reader,
|
|
unsigned int port_no,
|
|
const struct sg_nfc_ops *nfc_ops,
|
|
const struct sg_led_ops *led_ops,
|
|
void *ops_ctx);
|
|
|
|
HRESULT sg_reader_handle_irp(struct sg_reader *reader, struct irp *irp);
|