/**
 * @file   gpio-mst.h
 * @brief  Contains common definitions for GPIO control 
 *
 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
 */

#ifndef __MSTDRV_H__
#define __MSTDRV_H__

/* max track data size */
#define TRACK_DATA_SIZE			512 // Max MST char size
#define MAX_MST_TOTAL_BIT		1060 // TRACK1,2,3 max bit + LZ50 + TZ50

/* MST mode */
#define ZERO_IN_MODE			1 //ZERO
#define NOBLE_ZERO2_IN_MODE		2 //NOBLE, ZERO2
#define A_PHASE_EN_MODE			3//A5XE, A7XE
#define HERO_PHASE_EN_MODE		4 //HERO, HERO2
#define GRACE_PHASE_EN_MODE		5 //GRACE
#define A3Y17_PHASE_EN_MODE		6 //A3Y17
#define A57Y17_PHASE_EN_MODE		7 //A57Y17
#define DREAM_PHASE_EN_MODE		8 //DREAM, DREAM2
#define JACKPOT_PHASE_EN_MODE		9 //JACKPOT
#define STAR_PHASE_EN_MODE		10 //STAR, STAR2

/* Error definition */
#define MST_SUCCESS				0
#define MST_MAX_BIT_OVERFLOW	2
#define MST_NFC_EXIT			3

uint32_t fcNFCAction(fastcall_registers_t regs);
void gpio_set_mst_gpio_pin(uint32_t pin_conf);
int trans_loop(int i);
int fcMstTransmit(fastcall_registers_t regs, unsigned char * input, uint32_t pin_conf, uint8_t system_rev);

#endif /* __GPIO_MST_H__ */
