Files
spice2x.github.io/src/spice2x/acioemu/icca.h
T
bicarusandCopilot fdc7adff7f add card connect support (#923)
There are no servers to test this, but:

* touch, touch with mouse
* in theory card reader should work
* printer works (RGB, front and back)
* test/service button, lights

What is (painfully) missing:
* windowed mode

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-11 01:04:14 -07:00

45 lines
1.1 KiB
C++

#pragma once
#include <cstring>
#include <ctime>
#include <mutex>
#include <optional>
#include <thread>
#include "device.h"
#include "hooks/sleephook.h"
#include "reader/crypt.h"
namespace acioemu {
extern bool ICCA_DEVICE_HACK;
class ICCADevice : public ACIODeviceEmu {
private:
bool type_new;
bool flip_order;
std::jthread keypad_thread;
std::mutex keypad_mutex;
uint8_t **cards;
time_t *cards_time;
uint8_t *status;
bool *accept;
bool *hold;
uint8_t *keydown;
uint16_t *keypad;
bool **keypad_last;
uint8_t *keypad_capture;
std::optional<Crypt> *crypt;
uint8_t *counter;
public:
explicit ICCADevice(bool flip_order, bool keypad_thread, uint8_t node_count);
~ICCADevice() override;
bool parse_msg(MessageData *msg_in, circular_buffer<uint8_t> *response_buffer) override;
void update_card(int unit);
void update_keypad(int unit, bool update_edge);
void update_status(int unit);
};
}