
#include <stdint.h>
#include <string.h>
#include "nordic_common.h"
#include "nrf.h"
#include "ble_hci.h"
#include "ble_advdata.h"
#include "ble_advertising.h"
#include "ble_conn_params.h"
#include "nrf_sdh.h"
#include "nrf_sdh_soc.h"
#include "nrf_sdh_ble.h"
#include "nrf_ble_gatt.h"
#include "nrf_ble_qwr.h"
#include "app_timer.h"
#include "ble_nus.h"
#include "app_uart.h"
#include "app_util_platform.h"
#include "bsp_btn_ble.h"
#include "nrf_pwr_mgmt.h"

#include "nrf_delay.h"
#include "peer_manager.h"
#include "fds.h"


#define LED1(x) ((x)? (nrf_gpio_pin_set(17)) : (nrf_gpio_pin_clear(17)));
#define LED2(x) ((x)? (nrf_gpio_pin_set(31)) : (nrf_gpio_pin_clear(31)));
#define LED3(x) ((x)? (nrf_gpio_pin_set(30)) : (nrf_gpio_pin_clear(30)));
#define LED4(x) ((x)? (nrf_gpio_pin_set(29)) : (nrf_gpio_pin_clear(29)));
#define LED5(x) ((x)? (nrf_gpio_pin_set(28)) : (nrf_gpio_pin_clear(28)));

#define LED_red(x) 	((x)? (nrf_gpio_pin_clear(27)) : (nrf_gpio_pin_set(27))); 	// negative (common anode)
#define LED_blue(x) 	((x)? (nrf_gpio_pin_clear(26)) : (nrf_gpio_pin_set(26)));
#define LED_green(x) 	((x)? (nrf_gpio_pin_clear(25)) : (nrf_gpio_pin_set(25)));

#define UV(x) 		((x)? (nrf_gpio_pin_set(10)) : (nrf_gpio_pin_clear(10)));  
#define IR(x)			((x)? (nrf_gpio_pin_set(8)) : (nrf_gpio_pin_clear(8)));   
#define YELLOW(x)	((x)? (nrf_gpio_pin_set(9)) : (nrf_gpio_pin_clear(9)));   

#define VIBRO(x)	((x)? (nrf_gpio_pin_set(7)) : (nrf_gpio_pin_clear(7)));
#define BUZZER(x)	((x)? (nrf_gpio_pin_set(16)) : (nrf_gpio_pin_clear(16)));

#define AMP_ON(x)	((x)? (nrf_gpio_pin_clear(13)) : (nrf_gpio_pin_set(13)));		// negative (turn on by '0")
#define POWER_5V_ON(x)	((x)? (nrf_gpio_pin_set(6)) : (nrf_gpio_pin_clear(6)));


void gpioInit(void);
