#ifndef _SPARTAN2E_ADR_H
#define _SPARTAN2E_ADR_H

// EEPROM
#define ADR_CONTR_REG_FOR_WRITE		0x2020
#define ADR_CONTR_REG_FOR_READ		0x2028

//serial bus 
#define ADR_SERIAL_BUS_DATA_WRITE	0x200A
#define ADR_SERIAL_BUS_CMD			0x200B

#define ADR_SERIAL_BUS_DATA_READ	0x200F

//Er workith
#define ADR_BUS_ERROR_READ			0x2012
#define ADR_ERRORS_TOTAL_INFO		0x2026


//parallel bus
#define ADR_PARALLEL_BUS_CMD		0x200C
#define ADR_PARALLEL_BUS_ADR_TABLE	0x200D
#define ADR_PARALLEL_BUS_SET_TABLE	0x200E

//async bus
#define ADR_ASYNC_BUS_TABLE			0x2029


//build, test
#define ADR_CONTROLLER_BUILD		0x2014
#define ADR_XTEST_REG				0x2013


// adr free block in memory TMS
#define ADR_FIRST_FREE				0x2040
#define ADR_LAST_FREE				0x207F


//hwp
#define ADR_HWP_SERVICE_0			0x2009
#define ADR_HWP_SERVICE_1			0x2008
#define ADR_HWP_DATA_RECEVED_0		0x2010
#define ADR_HWP_DATA_RECEVED_1		0x2011
#define ADR_HWP_TEST_TIMER			0x2027

//sensor rotor
#define ADR_SENSOR_S1_T_PERIOD		0x2015
#define ADR_SENSOR_S1_COUNT_IMPULS	0x2016

#define ADR_SENSOR_S2_T_PERIOD		0x2017
#define ADR_SENSOR_S2_COUNT_IMPULS	0x2018

#define ADR_SENSOR_CMD				0x2019

#define ADR_SENSOR_S1_T_PERIOD_LOW_ONE_IMPULS	0x2021
#define ADR_SENSOR_S1_T_PERIOD_HIGH_ONE_IMPULS	0x2022
#define ADR_SENSOR_S2_T_PERIOD_LOW_ONE_IMPULS	0x2023
#define ADR_SENSOR_S2_T_PERIOD_HIGH_ONE_IMPULS	0x2024

//pwm

#define ADR_PWM_WDOG				0x2025

#define ADR_PWM_DIRECT				0x2000
#define ADR_PWM_DIRECT2				0x2030
#define ADR_PWM_DRIVE_MODE			0x2001
#define ADR_PWM_DEAD_TIME			0x2002
#define ADR_PWM_KEY_NUMBER			0x2003
#define ADR_PWM_PERIOD				0x2004
#define ADR_PWM_SAW_DIRECT			0x2005
#define ADR_PWM_START_STOP			0x2006
#define ADR_PWM_TIMING				0x2007

#define ADR_SAW_REQUEST				0x2031
#define ADR_SAW_VALUE				0x2032
#define ADR_TK_MASK_0				0x2033
#define ADR_TK_MASK_1				0x2034
#define ADR_PWM_IT_TYPE             0x2035



//optical bus
#define SI_OPTICS_WORD_TO_SEND_1    0x2036
#define SI_OPTICS_WORD_TO_SEND_2    0x2037
#define SI_OPTICS_WORD_TO_SEND_3    0x2038
#define SI_OPTICS_WORD_TO_SEND_4    0x2039



#endif

