#include <stdint.h>
#include "common.h"

#ifndef _EXPCOM_H
#define _EXPCOM_H

#define SERIAL_PORT "/dev/ttySAC1"

#define EXPCOM_BORDER_OFFSET 0
#define EXPCOM_LENGTH_H_OFFSET 1
#define EXPCOM_LENGTH_L_OFFSET 2
#define EXPCOM_DATA_OFFSET 3
#define EXPCOM_BALAST_SIZE 5



#define EXPOUT_BOOTLOAD_RESET_CMD		0xB0
#define EXPOUT_FPR_SWITCH_CMD			0xB1
#define EXPOUT_FPR_SCAN_CMD			0xB2
#define EXPOUT_FPR_DOWNLOAD_CMD			0xB3
#define EXPOUT_FPR_DELETE_CMD			0xB4
#define HOSTIN_AMP_SWITCH_CMD			0xB5
#define EXPOUT_KEYB_MODE_CMD			0xB7


#define EXPCOM_DATA_OFFSET 3

#define BORDER_P 0xC0

enum input_mode{keybmode_numeric,keybmode_alpha};

int ExpanderSend(uint8_t* data, uint16_t length);
int ExpCom_SwitchFPR(char state);
int ExpCom_ScanFPR(void);
int ExpCom_DownloadFPR(int UserID, char* ftemplate);
int ExpCom_SwitchKeybMode(char state);
int ExpCom_DeleteFPR(int UserID);
int ExpCom_BootloadReset(void);


void* IOReceive(void* ThreadData);












#endif
