board/sg-reader.c: Configurate sg_reader

This commit is contained in:
Tau
2019-06-03 22:28:44 -04:00
parent 924c1d8fdb
commit e06be9fc7b
9 changed files with 34 additions and 6 deletions

View File

@ -6,6 +6,7 @@
#include "aimeio/aimeio.h"
#include "board/config.h"
#include "board/sg-led.h"
#include "board/sg-nfc.h"
#include "board/sg-reader.h"
@ -43,10 +44,18 @@ static uint8_t sg_reader_readable_bytes[520];
static struct sg_nfc sg_reader_nfc;
static struct sg_led sg_reader_led;
HRESULT sg_reader_hook_init(unsigned int port_no)
HRESULT sg_reader_hook_init(
const struct aime_config *cfg,
unsigned int port_no)
{
HRESULT hr;
assert(cfg != NULL);
if (!cfg->enable) {
return S_FALSE;
}
hr = aime_io_init();
if (FAILED(hr)) {

View File

@ -2,4 +2,8 @@
#include <windows.h>
HRESULT sg_reader_hook_init(unsigned int port_no);
#include "board/config.h"
HRESULT sg_reader_hook_init(
const struct aime_config *cfg,
unsigned int port_no);