/*
 * main.h
 *
 *  Created on: 21.04.2017.
 *      Author: Zborac
 */

#ifndef MAIN_H_
#define MAIN_H_

#ifdef __linux
#define __USE_BSD				1
#define _BSD_SOURCE				1
#define __USE_POSIX				1
#define __USE_POSIX199309		1
#define __USE_POSIX199506		1
#define __USE_POSIX_IMPLICITLY	1
#define _POSIX_SOURCE			1
#endif

#define DEFAULT_LINE_LEN		80
#define APP_LOOP_CYCLE_PERIOD	50000L // [us]

#define MAX_WAIT_TIME		3000 // [ms] Old value was 1000ms. We need 3000ms for Lenovo Vibe X3 Lite.
#define READER_MODE_TIME	200  // [ms] 200 ms is necessary for Samsung Galaxy A5 (2016).
								 //      With other tested Android devices we can set this value to 100 ms.
#define EMULATION_MODE_TIME	300  // [ms]

void help(void);
// ASCII Graphic routines:
void print_ln_len(char symbol, uint8_t cnt);
void print_ln(char symbol);
void print_hex(const uint8_t *data, uint32_t len, const char *delimiter);
void print_hex_ln(const uint8_t *data, uint32_t len, const char *delimiter);

#endif /* MAIN_H_ */
