Wavebubble 2010 Firmware
|
00001 00008 #ifndef MAIN_H_ 00009 #define MAIN_H_ 00010 00011 #define HW_REV_B //!< Wave Bubble 2010 hardware revision 00012 00013 #define SPICLK_PORT PORTC //!< SPI CLOCK Port for digital poti 00014 #define SPIDO_PORT PORTC //!< SPI DATA Port for digital poti 00015 #define SPICS_PORT PORTC //!< SPI CHIPSELECT Port for digital poti 00016 #define SPICLK_DDR DDRC //!< SPI CLOCK Direction for digital poti 00017 #define SPIDO_DDR DDRC //!< SPI DATA Direction for digital poti 00018 #define SPICS_DDR DDRC //!< SPI CHIPSELECT Direction for digital poti 00019 #define SPICLK 1 //!< SPI CLOCK Pin for digital poti 00020 #define SPIDO 2 //!< SPI DATA Pin for digital poti 00021 #define SPICS 3 //!< SPI CHIPSELECT Pin for digital poti 00022 00023 #define BANDWADJ1_RES 1 //!< Digital potentiometer for VCO1 00024 #define BANDWADJ2_RES 0 //!< Digital potentiometer for VCO2 00025 00026 #define FREQSET_DDR DDRC //!< Digital frequency set direction 00027 #define FREQSET_PORT PORTC //!< Digital frequency set port 00028 #define FREQSET PC4 //!< Digital frequency set pin 00029 00030 #define POWERON_PORT PORTB //!< Power ON switch port 00031 #define POWERON PB6 //!< Power ON switch pin 00032 #define POWERON_DDR DDRB //!< Power ON direction 00033 00034 #define PROGKEY_PORT PORTB //!< Program key port 00035 #define PROGKEY_PIN PINB //!< Program key input 00036 #define PROGKEY PB4 //!< Program key pin 00037 #define PROGKEY_DDR DDRB //!< Program key direction 00038 00039 #define POWERCTL1_PORT PORTB //!< Power control port VCO1 00040 #define POWERCTL1 PB7 //!< Power control pin VCO1 00041 #define POWERCTL1_DDR DDRB //!< Power control direction VCO1 00042 00043 #define POWERCTL2_PORT PORTD //!< Power control port VCO2 00044 #define POWERCTL2 PD3 //!< Power control pin VCO2 00045 #define POWERCTL2_DDR DDRD //!< Power control direction VCO2 00046 00047 #define LEDDDR DDRD //!< Direction for LED 00048 #define LEDPORT PORTD //!< Port for LED 00049 #define LED PD7 //!< Pin for LED 00050 00051 typedef struct { 00052 uint16_t startfreq1, endfreq1; 00053 uint16_t dc_offset1; // values for the PWM 00054 uint8_t bandwidth1; // values for the pot 00055 uint16_t startfreq2, endfreq2; 00056 uint16_t dc_offset2; // values for the PWM 00057 uint8_t bandwidth2; // values for the pot 00058 } __attribute__((__packed__)) jammer_setting; // 12 byte 00059 00060 #define MAX_PROGRAMS 5 /* ((E2END+1)/sizeof(jammer_setting))-1 */ 00061 00062 #define LOWBAND_VCO_LOW 345 // MHz, Low band VCO lowest frequency 00063 #define LOWBAND_VCO_HIGH 1350 // MHz, Low band VCO highest frequency 00064 00065 #define HIGHBAND_VCO_LOW 1225 // MHz, Low band VCO lowest frequency 00066 #define HIGHBAND_VCO_HIGH 2715 // MHz, Low band VCO lowest frequency 00067 00068 extern void set_sawtooth_low(void); 00069 extern void set_sawtooth_high(void); 00070 extern void set_resistor(uint8_t rnum, uint8_t rval); 00071 extern void delay_ms(uint16_t ms); 00072 00073 #endif /* MAIN_H_ */