Dhanya Thattil 0d35b966ff
Separate headers (#57)
* WIP, ctb

* WIP, eiger

* WIP, gotthard

* WIP, jungfrau

* WIP, gotthard2

* WIP, mythen3

* WIP, moench

* fixed gotthard apiversioning mismatch with gotthard2
2019-08-30 11:17:37 +02:00

55 lines
1.3 KiB
C
Executable File

#pragma once
#include <inttypes.h>
/**
* Set Defines
* @param creg control register
* @param preg parameter register
* @param rprmsk reconfig parameter reset mask
* @param wpmsk write parameter mask
* @param prmsk pll reset mask
* @param amsk address mask
* @param aofst address offset
*/
void ALTERA_PLL_SetDefines(uint32_t creg, uint32_t preg, uint32_t rprmsk, uint32_t wpmsk, uint32_t prmsk, uint32_t amsk, int aofst);
/**
* Reset only PLL
*/
void ALTERA_PLL_ResetPLL ();
/**
* Reset PLL Reconfiguration and PLL
*/
void ALTERA_PLL_ResetPLLAndReconfiguration ();
/**
* Set PLL Reconfig register
* @param reg register
* @param val value
*/
void ALTERA_PLL_SetPllReconfigReg(uint32_t reg, uint32_t val);
/**
* Write Phase Shift
* @param phase phase shift
* @param clkIndex clock index
* @param pos 1 if up down direction of shift is positive, else 0
*/
void ALTERA_PLL_SetPhaseShift(int32_t phase, int clkIndex, int pos);
/**
* Set PLL mode register to polling mode
*/
void ALTERA_PLL_SetModePolling();
/**
* Calculate and write output frequency
* @param clkIndex clock index
* @param pllVCOFreqMhz PLL VCO Frequency in Mhz
* @param value frequency to set to
* @param frequency set
*/
int ALTERA_PLL_SetOuputFrequency (int clkIndex, int pllVCOFreqMhz, int value);