Changeset - 7a91d7557fd3
[Not reviewed]
default
0 1 0
Ethan Zonca - 10 years ago 2016-01-26 17:26:44
ezonca@sealandaire.com
Fix addr
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
lib/si5351/si5351.h
Show inline comments
 
/*
 
 * si5351.h - Si5351 library for Arduino
 
 *
 
 * Copyright (C) 2015 Jason Milldrum <milldrum@gmail.com>
 
 *                    Dana H. Myers <k6jq@comcast.net>
 
 *
 
 * Many defines derived from clk-si5351.h in the Linux kernel.
 
 * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
 
 * Rabeeh Khoury <rabeeh@solid-run.com>
 
 *
 
 * do_div() macro derived from /include/asm-generic/div64.h in
 
 * the Linux kernel.
 
 * Copyright (C) 2003 Bernardo Innocenti <bernie@develer.com>
 
 *
 
 * This program is free software: you can redistribute it and/or modify
 
 * it under the terms of the GNU General Public License as published by
 
 * the Free Software Foundation, either version 3 of the License, or
 
 * (at your option) any later version.
 
 *
 
 * This program is distributed in the hope that it will be useful,
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
 * GNU General Public License for more details.
 
 *
 
 * You should have received a copy of the GNU General Public License
 
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
#ifndef SI5351_H_
 
#define SI5351_H_
 

	
 
#include <stdint.h>
 
#include "stm32f0xx_hal.h"
 

	
 
/* Define definitions */
 

	
 
#define SI5351_BUS_BASE_ADDR				0x60
 
#define SI5351_BUS_BASE_ADDR				((0x60 & 0x7f) << 1)
 
#define SI5351_XTAL_FREQ					25000000
 
#define SI5351_PLL_FIXED					90000000000ULL
 
#define SI5351_FREQ_MULT					100ULL
 
#define SI5351_DEFAULT_CLK					1000000000ULL
 

	
 
#define SI5351_PLL_VCO_MIN					600000000
 
#define SI5351_PLL_VCO_MAX					900000000
 
#define SI5351_MULTISYNTH_MIN_FREQ		  	1000000
 
#define SI5351_MULTISYNTH_DIVBY4_FREQ	 	150000000
 
#define SI5351_MULTISYNTH_MAX_FREQ		  	160000000
 
#define SI5351_MULTISYNTH_SHARE_MAX			112500000
 
#define SI5351_MULTISYNTH67_MAX_FREQ	  	SI5351_MULTISYNTH_DIVBY4_FREQ
 
#define SI5351_CLKOUT_MIN_FREQ			    	8000
 
#define SI5351_CLKOUT_MAX_FREQ			    	SI5351_MULTISYNTH_MAX_FREQ
 
#define SI5351_CLKOUT67_MAX_FREQ		    	SI5351_MULTISYNTH67_MAX_FREQ
 

	
 
#define SI5351_PLL_A_MIN			        		15
 
#define SI5351_PLL_A_MAX				        	90
 
#define SI5351_PLL_B_MAX				        	(SI5351_PLL_C_MAX-1)
 
#define SI5351_PLL_C_MAX				        	1048575
 
#define SI5351_MULTISYNTH_A_MIN			   	6
 
#define SI5351_MULTISYNTH_A_MAX		   		1800
 
#define SI5351_MULTISYNTH67_A_MAX	   		254
 
#define SI5351_MULTISYNTH_B_MAX			   	(SI5351_MULTISYNTH_C_MAX-1)
 
#define SI5351_MULTISYNTH_C_MAX			   	1048575
 
#define SI5351_MULTISYNTH_P1_MAX		    	((1<<18)-1)
 
#define SI5351_MULTISYNTH_P2_MAX		    	((1<<20)-1)
 
#define SI5351_MULTISYNTH_P3_MAX		    	((1<<20)-1)
 

	
 
#define SI5351_DEVICE_STATUS			      	0
 
#define SI5351_INTERRUPT_STATUS		   		1
 
#define SI5351_INTERRUPT_MASK		     		2
 
#define SI5351_STATUS_SYS_INIT		    		(1<<7)
 
#define SI5351_STATUS_LOL_B			       	(1<<6)
 
#define SI5351_STATUS_LOL_A			       	(1<<5)
 
#define SI5351_STATUS_LOS				       	(1<<4)
 
#define SI5351_OUTPUT_ENABLE_CTRL		   	3
 
#define SI5351_OEB_PIN_ENABLE_CTRL		  	9
 
#define SI5351_PLL_INPUT_SOURCE		   		15
 
#define SI5351_CLKIN_DIV_MASK			     	(3<<6)
 
#define SI5351_CLKIN_DIV_1				      	(0<<6)
 
#define SI5351_CLKIN_DIV_2			      		(1<<6)
 
#define SI5351_CLKIN_DIV_4			      		(2<<6)
 
#define SI5351_CLKIN_DIV_8				      	(3<<6)
 
#define SI5351_PLLB_SOURCE			      		(1<<3)
 
#define SI5351_PLLA_SOURCE			      		(1<<2)
 

	
 
#define SI5351_CLK0_CTRL			        		16
0 comments (0 inline, 0 general)