Atmel Software Framework

cs2200.c File Reference
#include <avr32/io.h>
#include "compiler.h"
#include "cs2200.h"
#include "gpio.h"
#include "board.h"

Macros

Expected Protocol Version
#define CS2200_EXPECTED_DEVICE_ID   0x00
 
#define CS2200_DEVICE_CTRL_LOCKED   0x00
 
Device ID Register Bit-Masks
#define CS2200_DEVICE_ID_REG_MASK   0xF8
 
#define CS2200_DEVICE_ID_REG_OFFSET   3
 
#define CS2200_DEVICE_CTRL_UNLOCK_REG_MASK   0x80
 
#define CS2200_DEVICE_CTRL_UNLOCK_REG_OFFSET   8
 

Functions

void cs2200_enter_test_mode (void)
 Enter into the test mode. More...
 
void cs2200_freq_clk_adjust (uint16_t lsh_ratio)
 Function used to adjust the CLK_OUT frequency (LSW only). More...
 
void cs2200_freq_clk_out (uint32_t ratio)
 Function used to program the CLK_OUT frequency. More...
 
void cs2200_leave_test_mode (void)
 Leave the test mode. More...
 
bool cs2200_setup (uint32_t out_freq, uint32_t fosc)
 Function used to initialize the chip and communication interface. More...
 
void cs2200_switch_off (void)
 
void cs2200_switch_on (void)
 

#define CS2200_DEVICE_CTRL_LOCKED   0x00
#define CS2200_DEVICE_CTRL_UNLOCK_REG_MASK   0x80
#define CS2200_DEVICE_CTRL_UNLOCK_REG_OFFSET   8
#define CS2200_DEVICE_ID_REG_MASK   0xF8

Referenced by cs2200_setup().

#define CS2200_DEVICE_ID_REG_OFFSET   3

Referenced by cs2200_setup().

#define CS2200_EXPECTED_DEVICE_ID   0x00

Referenced by cs2200_setup().

void cs2200_enter_test_mode ( void  )

Enter into the test mode.

Referenced by cs2200_setup().

void cs2200_freq_clk_adjust ( uint16_t  lsh_ratio)

Function used to adjust the CLK_OUT frequency (LSW only).

References CS2200_REG_LSW_RATIO_ADDR, and cs2200_write_ex().

Referenced by usb_stream_resync().

void cs2200_freq_clk_out ( uint32_t  ratio)

Function used to program the CLK_OUT frequency.

Referenced by aic23b_dac_setup(), ms3_dac_setup(), and usb_stream_input().

void cs2200_leave_test_mode ( void  )

Leave the test mode.

bool cs2200_setup ( uint32_t  out_freq,
uint32_t  fosc 
)

Function used to initialize the chip and communication interface.

References _32_BITS_RATIO, CS2200_DEVICE_ID_REG_MASK, CS2200_DEVICE_ID_REG_OFFSET, cs2200_enter_test_mode(), CS2200_EXPECTED_DEVICE_ID, and CS2200_NB_TRIES.

Referenced by main().

void cs2200_switch_off ( void  )
void cs2200_switch_on ( void  )