2019-02-26 19:47:41 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
2019-03-16 16:42:36 +01:00
|
|
|
#include <stdbool.h>
|
2019-02-26 19:47:41 +01:00
|
|
|
#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;
|
|
|
|
};
|
|
|
|
|
2019-03-16 16:42:36 +01:00
|
|
|
HRESULT sg_reader_init(
|
2019-02-26 19:47:41 +01:00
|
|
|
struct sg_reader *reader,
|
2019-03-16 16:42:36 +01:00
|
|
|
unsigned int port_no);
|
|
|
|
|
|
|
|
bool sg_reader_match_irp(const struct sg_reader *reader, const struct irp *irp);
|
2019-02-26 19:47:41 +01:00
|
|
|
|
|
|
|
HRESULT sg_reader_handle_irp(struct sg_reader *reader, struct irp *irp);
|