2019-02-26 02:56:45 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2021-05-23 14:38:37 +00:00
|
|
|
/*
|
|
|
|
Get the version of the Aime IO API that this DLL supports. This function
|
|
|
|
should return a positive 16-bit integer, where the high byte is the major
|
|
|
|
version and the low byte is the minor version (as defined by the Semantic
|
|
|
|
Versioning standard).
|
|
|
|
|
|
|
|
The latest API version as of this writing is 0x0100.
|
|
|
|
*/
|
|
|
|
uint16_t aime_io_get_api_version(void);
|
|
|
|
|
2021-05-23 14:31:03 +00:00
|
|
|
/*
|
|
|
|
Initialize Aime IO provider DLL. Only called once, before any other
|
2021-05-23 14:38:37 +00:00
|
|
|
functions exported from this DLL are called (except for
|
|
|
|
aime_io_get_api_version).
|
|
|
|
|
|
|
|
Minimum API version: 0x0100
|
2021-05-23 14:31:03 +00:00
|
|
|
*/
|
2019-02-26 02:56:45 +00:00
|
|
|
HRESULT aime_io_init(void);
|
2021-05-23 14:31:03 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Poll for IC cards in the vicinity.
|
|
|
|
|
|
|
|
- unit_no: Always 0 as of the current API version
|
2021-05-23 14:38:37 +00:00
|
|
|
|
|
|
|
Minimum API version: 0x0100
|
2021-05-23 14:31:03 +00:00
|
|
|
*/
|
2019-10-19 19:51:10 +00:00
|
|
|
HRESULT aime_io_nfc_poll(uint8_t unit_no);
|
2021-05-23 14:31:03 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Attempt to read out a classic Aime card ID
|
|
|
|
|
|
|
|
- unit_no: Always 0 as of the current API version
|
|
|
|
- luid: Pointer to a ten-byte buffer that will receive the ID
|
|
|
|
- luid_size: Size of the buffer at *luid. Always 10.
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
|
|
|
- S_OK if a classic Aime is present and was read successfully
|
|
|
|
- S_FALSE if no classic Aime card is present (*luid will be ignored)
|
|
|
|
- Any HRESULT error if an error occured.
|
2021-05-23 14:38:37 +00:00
|
|
|
|
|
|
|
Minimum API version: 0x0100
|
2021-05-23 14:31:03 +00:00
|
|
|
*/
|
2019-10-19 19:51:10 +00:00
|
|
|
HRESULT aime_io_nfc_get_aime_id(
|
2019-02-26 02:56:45 +00:00
|
|
|
uint8_t unit_no,
|
|
|
|
uint8_t *luid,
|
|
|
|
size_t luid_size);
|
2021-05-23 14:31:03 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Attempt to read out a FeliCa card ID ("IDm"). The following are examples
|
|
|
|
of FeliCa cards:
|
|
|
|
|
|
|
|
- Amuse IC (which includes new-style Aime-branded cards, among others)
|
|
|
|
- Smartphones with FeliCa NFC capability (uncommon outside Japan)
|
|
|
|
- Various Japanese e-cash cards and train passes
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
|
|
|
- unit_no: Always 0 as of the current API version
|
|
|
|
- IDm: Output parameter that will receive the card ID
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
|
|
|
- S_OK if a FeliCa device is present and was read successfully
|
|
|
|
- S_FALSE if no FeliCa device is present (*IDm will be ignored)
|
|
|
|
- Any HRESULT error if an error occured.
|
2021-05-23 14:38:37 +00:00
|
|
|
|
|
|
|
Minimum API version: 0x0100
|
2021-05-23 14:31:03 +00:00
|
|
|
*/
|
2019-10-19 19:51:10 +00:00
|
|
|
HRESULT aime_io_nfc_get_felica_id(uint8_t unit_no, uint64_t *IDm);
|
2021-05-23 14:31:03 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Change the color and brightness of the card reader's RGB lighting
|
|
|
|
|
|
|
|
- unit_no: Always 0 as of the current API version
|
|
|
|
- r, g, b: Primary color intensity, from 0 to 255 inclusive.
|
2021-05-23 14:38:37 +00:00
|
|
|
|
|
|
|
Minimum API version: 0x0100
|
2021-05-23 14:31:03 +00:00
|
|
|
*/
|
2019-02-26 02:56:45 +00:00
|
|
|
void aime_io_led_set_color(uint8_t unit_no, uint8_t r, uint8_t g, uint8_t b);
|