Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board

Library for LTC6954: Low Phase Noise, Triple Output Clock Distribution Divider/Driver. More...

Detailed Description

Library for LTC6954: Low Phase Noise, Triple Output Clock Distribution Divider/Driver.

Definition in file LTC6954.cpp.

Go to the source code of this file.

Functions

uint8_t LTC6954_read (uint8_t cs, int8_t address)
 LTC6954 Read Single Address reads 8 bit Data field to LTC6954. More...
 
long LTC6954_read_field (uint8_t cs, uint8_t address, uint8_t MSB_loc, uint8_t numbits)
 LTC6954 Read Single Field For SPI FIELDS located in 1 or multiple address locations reads specific address locations identifies and returns specific field in question can handle SPI fields in multiple addresses, if MSB bit is in the lower number address. More...
 
long get_LTC6954_SPI_FIELD (uint8_t cs, uint8_t f)
 Gets the LTC6954 SPI field value calls function LTC6954_read_field, which reads specific address locations identifies and returns specific field in question can handle SPI fields in multiple addresses, if MSB bit is in the lower number address. More...
 
void LTC6954_write (uint8_t cs, uint8_t address, uint8_t Data)
 LTC6954 Write Single Address writes 8 bit Data field to LTC6954. More...
 
uint8_t LTC6954_write_field (uint8_t cs, long field_data, uint8_t address, uint8_t MSB_loc, uint8_t numbits)
 LTC6954 Write Single Field For SPI FIELDS in 1 or multiple address locations reads specific address/field location then writes to specific field can handle SPI fields in multiple addresses, if MSB bit is in the lower number address. More...
 
uint8_t get_LTC6954_REGSIZE ()
 returns # of addresses in parts register map (array size) More...
 
uint8_t get_LTC6954_SPI_FIELD_NUMBITS (uint8_t f)
 returns the number of bits for a given field name in the SPI map More...
 
uint8_t get_LTC6954_SPI_FIELD_RW (uint8_t f)
 returns if the given field name is (0)read/write or (1)read_only field More...
 
void set_LTC6954_SPI_FIELD (uint8_t cs, uint8_t f, long field_data)
 Sets the LTC6954 SPI field value calls function LTC6954_read_field, which reads specific address/field location then writes to specific field can handle SPI fields in multiple addresses, if MSB bit is in the lower number address. More...
 
void set_LTC6954_ALLREGS (uint8_t cs, uint8_t reg00, uint8_t reg01, uint8_t reg02, uint8_t reg03, uint8_t reg04, uint8_t reg05, uint8_t reg06)
 Writes values to ALL LTC6954 RW address. More...
 
void LTC6954_init ()
 Initializes the SPI MAP arrays The values set in initialization are used all the LTC6954 SPI/WRITE and read functions (set_LTC6954_SPI_FIELD, get_LTC6954_SPI_FIELD, LTC6954_read, LTC6954_write, etc, etc) More...
 

Variables

uint8_t LTC6954_reg [LTC6954_NUM_REGADDR]
 number of LTC6954 spi addresses More...
 
uint8_t LTC6954_spi_map [(LTC6954_NUM_REGFIELD+1)][4]
 LTC6954 spi map, stores MSB address location, MSB bit location, field length in bits, and R or RW capability. More...
 

Function Documentation

◆ get_LTC6954_REGSIZE()

uint8_t get_LTC6954_REGSIZE ( )

returns # of addresses in parts register map (array size)

Returns
# of addresses in parts register map

Definition at line 239 of file LTC6954.cpp.

◆ get_LTC6954_SPI_FIELD()

long get_LTC6954_SPI_FIELD ( uint8_t  cs,
uint8_t  f 
)

Gets the LTC6954 SPI field value calls function LTC6954_read_field, which reads specific address locations identifies and returns specific field in question can handle SPI fields in multiple addresses, if MSB bit is in the lower number address.

Returns
data that was read from field
Parameters
csChip Select Pin
fSPI field number

Definition at line 161 of file LTC6954.cpp.

◆ get_LTC6954_SPI_FIELD_NUMBITS()

uint8_t get_LTC6954_SPI_FIELD_NUMBITS ( uint8_t  f)

returns the number of bits for a given field name in the SPI map

Returns
the number of bits for a given field name in the SPI map
Parameters
fSPI field number

Definition at line 249 of file LTC6954.cpp.

◆ get_LTC6954_SPI_FIELD_RW()

uint8_t get_LTC6954_SPI_FIELD_RW ( uint8_t  f)

returns if the given field name is (0)read/write or (1)read_only field

Returns
if the given field is a (0)read/write or (1)read_only field
Parameters
fSPI field number

Definition at line 259 of file LTC6954.cpp.

◆ LTC6954_init()

void LTC6954_init ( )

Initializes the SPI MAP arrays The values set in initialization are used all the LTC6954 SPI/WRITE and read functions (set_LTC6954_SPI_FIELD, get_LTC6954_SPI_FIELD, LTC6954_read, LTC6954_write, etc, etc)

Returns
void

Definition at line 304 of file LTC6954.cpp.

◆ LTC6954_read()

uint8_t LTC6954_read ( uint8_t  cs,
int8_t  address 
)

LTC6954 Read Single Address reads 8 bit Data field to LTC6954.

has to shift data by one bit to account for RW bit

Returns
data that was read from address
Parameters
csChip Select Pin
addressRegister address for the LTC6954.

Definition at line 105 of file LTC6954.cpp.

◆ LTC6954_read_field()

long LTC6954_read_field ( uint8_t  cs,
uint8_t  address,
uint8_t  MSB_loc,
uint8_t  numbits 
)

LTC6954 Read Single Field For SPI FIELDS located in 1 or multiple address locations reads specific address locations identifies and returns specific field in question can handle SPI fields in multiple addresses, if MSB bit is in the lower number address.

Returns
data that was read from field
Parameters
csChip Select Pin
addressRegister address for the LTC6954.
MSB_locMSB bit location of field
numbitslength of field (i.e. number of bits in field)

Definition at line 125 of file LTC6954.cpp.

◆ LTC6954_write()

void LTC6954_write ( uint8_t  cs,
uint8_t  address,
uint8_t  Data 
)

LTC6954 Write Single Address writes 8 bit Data field to LTC6954.

has to shift data by one bit to account for RW bit

Returns
void
Parameters
csChip Select Pin
addressRegister address for the LTC6954.
Data8-bit data to be written to register

Definition at line 172 of file LTC6954.cpp.

◆ LTC6954_write_field()

uint8_t LTC6954_write_field ( uint8_t  cs,
long  field_data,
uint8_t  address,
uint8_t  MSB_loc,
uint8_t  numbits 
)

LTC6954 Write Single Field For SPI FIELDS in 1 or multiple address locations reads specific address/field location then writes to specific field can handle SPI fields in multiple addresses, if MSB bit is in the lower number address.

Returns
void
Parameters
csChip Select Pin
field_dataValue field value to be set to
addressRegister address for the LTC6954.
MSB_locMSB bit location of field
numbitslength of field (i.e. number of bits in field)

Definition at line 188 of file LTC6954.cpp.

◆ set_LTC6954_ALLREGS()

void set_LTC6954_ALLREGS ( uint8_t  cs,
uint8_t  reg00,
uint8_t  reg01,
uint8_t  reg02,
uint8_t  reg03,
uint8_t  reg04,
uint8_t  reg05,
uint8_t  reg06 
)

Writes values to ALL LTC6954 RW address.

Returns
void
Parameters
csChip Select Pin
reg00LTC6954 register 0
reg01LTC6954 register 1
reg02LTC6954 register 2
reg03LTC6954 register 3
reg04LTC6954 register 4
reg05LTC6954 register 5
reg06LTC6954 register 6

Definition at line 282 of file LTC6954.cpp.

◆ set_LTC6954_SPI_FIELD()

void set_LTC6954_SPI_FIELD ( uint8_t  cs,
uint8_t  f,
long  field_data 
)

Sets the LTC6954 SPI field value calls function LTC6954_read_field, which reads specific address/field location then writes to specific field can handle SPI fields in multiple addresses, if MSB bit is in the lower number address.

Returns
void
Parameters
csChip Select Pin
fSPI field number
field_dataValue field value to be set to

Definition at line 272 of file LTC6954.cpp.

Variable Documentation

◆ LTC6954_reg

uint8_t LTC6954_reg[LTC6954_NUM_REGADDR]

number of LTC6954 spi addresses

Definition at line 96 of file LTC6954.cpp.

◆ LTC6954_spi_map

uint8_t LTC6954_spi_map[(LTC6954_NUM_REGFIELD+1)][4]

LTC6954 spi map, stores MSB address location, MSB bit location, field length in bits, and R or RW capability.

Definition at line 97 of file LTC6954.cpp.