Wavebubble 2010 Firmware
|
00001 00007 #define pll_set_rf(x, n) pll_set_freq(x, n, 0x1); 00008 #define pll_set_if(x, n) pll_set_freq(x, n, 0x4); 00009 00010 #define PLLCLK_DDR DDRD 00011 #define PLLCLK_PORT PORTD 00012 #define PLLCLK PD5 00013 00014 #define PLLDATA_DDR DDRD 00015 #define PLLDATA_PORT PORTD 00016 #define PLLDATA PD6 00017 00018 #define PLLLE_DDR DDRB 00019 #define PLLLE_PORT PORTB 00020 #define PLLLE PB0 00021 00022 #define PLL_RFIN_DDR DDRC 00023 #define PLL_IFIN_DDR DDRC 00024 #define PLL_RFIN PC0 00025 #define PLL_IFIN PC5 00026 #define PLL_RFIN_PIN PINC 00027 #define PLL_IFIN_PIN PINC 00028 #define PLL_RFIN_PORT PORTC 00029 #define PLL_IFIN_PORT PORTC 00030 00031 extern void pll_tx(uint32_t data, uint8_t addr) ; 00032 extern void pll_init(void) ; 00033 extern void pll_set_rcounter(uint16_t rcounter); 00034 extern void pll_set_freq(uint16_t rf_freq, uint8_t prescaler, uint8_t reg); 00035 extern uint8_t tune_rf(uint16_t freq); 00036 extern uint8_t tune_if(uint16_t freq); 00037 extern void pll_init(void); 00038 extern uint8_t tune_rf_band(uint16_t min, uint16_t max, uint8_t vco_num);