#ifndef __TYPE_A_H__
#define __TYPE_A_H__

#ifdef __cplusplus
 extern "C" {
#endif

/******************************************************************************/
/* Include files                                                              */
/******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include "fm175xx.h"

uint8_t LeftMoveBit(uint8_t bitNum);
uint8_t RightMoveBit(uint8_t bitNum);

void TypeA_Set_BitFraming(uint8_t collBit,uint8_t *NVB);
void TypeA_Save_UID(uint8_t Bytes,
                    uint8_t Bits,
                    uint8_t length,             
                    uint8_t *buff,
                    uint8_t *picc_uid);
void CollSaveUID(uint8_t preColl,uint8_t nowColl,uint8_t *buff,uint8_t *uid);	

bool TypeA_Request(uint8_t *pTagType);
bool TypeA_Anticollision(uint8_t selcode, uint8_t *pSnr);
bool TypeA_Select(uint8_t selcode, uint8_t *pSnr, uint8_t *pSak);

bool TypeA_CardActive(uint8_t *pTagType, uint8_t *pSnr, uint8_t *pSak);
bool TypeA_Halt(uint8_t AnticollisionFlag);
bool TypeA_WakeUp(uint8_t *pTagType);

#ifdef __cplusplus
}
#endif

#endif /* __TYPE_A_H__ */
