Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board

Library for LTC2874: Quad IO-Link Master Hot Swap Power Controller and PHY. More...

Detailed Description

Library for LTC2874: Quad IO-Link Master Hot Swap Power Controller and PHY.

Definition in file LTC2874.cpp.

Go to the source code of this file.

Functions

void LTC2874_cq_output (uint8_t port, uint8_t value)
 Enables or Disables CQ output for specified port, then Updates. More...
 
void LTC2874_lplus_output (uint8_t port, uint8_t value)
 Enables or Disables L+ output for specified port, then Updates. More...
 
void LTC2874_sio_mode (uint8_t port)
 Sets SIO_MODE bit (and also Clears SLEW bit) for specified port, then Updates. More...
 
void LTC2874_24v_mode (uint8_t value)
 Changes value of the 24VMODE bit, then Updates. More...
 
void LTC2874_write_NSF_value (uint8_t port, uint8_t value)
 Changes NSF (Noise Suppression Filter) setting for specified port without Updating. More...
 
void LTC2874_write_ILLM_value (uint8_t port, uint8_t value)
 Changes ILLM (Sinking current) setting for specified port without Updating. More...
 
void LTC2874_write_LPTC_value (uint8_t value)
 Change L+ Overcurrent Timer Control (LPTC) setting without Updating. More...
 
void LTC2874_write_RETRYTC_value (uint8_t value)
 Changes Auto-Retry Timer Control (RETRYTC) setting without Updating. More...
 
void LTC2874_write_2XPTC_value (uint8_t value)
 Changes 2X Current Pulse Timer Control (2XPTC) setting without Updating. More...
 
void LTC2874_write_OV_TH_value (uint8_t value)
 Changes VDD Overvoltage Threshold (OV_TH) setting without Updating. More...
 
void LTC2874_wakeup_request (uint8_t port)
 Sends WURQ (Wake-up Request) on specified port. More...
 
void LTC2874_update_all (void)
 Updates all registers. More...
 
void LTC2874_write_register_update_all (uint8_t LTC2874_register, uint8_t LTC2874_data)
 Writes byte of data to a register, then Updates. More...
 
void LTC2874_write_bit_value_update_all (uint8_t LTC2874_register, uint8_t LTC2874_bit, uint8_t value)
 Changes value of a register bit, then Updates. More...
 
void LTC2874_write_bit_set_update_all (uint8_t LTC2874_register, uint8_t LTC2874_bit)
 Sets a register bit, then Updates. More...
 
void LTC2874_write_bit_clr_update_all (uint8_t LTC2874_register, uint8_t LTC2874_bit)
 Clears a register bit, then Updates. More...
 
void LTC2874_reset (void)
 Resets LTC2874, returning default values to registers. More...
 
uint8_t LTC2874_read_reg (uint8_t LTC2874_register)
 Reads data byte from specified register. More...
 
uint8_t LTC2874_read_bit (uint8_t LTC2874_register, uint8_t LTC2874_bit)
 Reads a data BIT from specified register. More...
 
void LTC2874_write_register (uint8_t LTC2874_register, uint8_t LTC2874_data)
 Writes byte of data to a register without Updating. More...
 
void LTC2874_write_bit_set (uint8_t LTC2874_register, uint8_t LTC2874_bit)
 Sets a register bit without Updating. More...
 
void LTC2874_write_bit_clr (uint8_t LTC2874_register, uint8_t LTC2874_bit)
 Clears a register bit without Updating. More...
 
void LTC2874_write_bit_value (uint8_t LTC2874_register, uint8_t LTC2874_bit, uint8_t value)
 Changes value of a register bit without Updating. More...
 

Function Documentation

◆ LTC2874_24v_mode()

void LTC2874_24v_mode ( uint8_t  value)

Changes value of the 24VMODE bit, then Updates.

Returns
void
Parameters
value24VMODE setting (0 or 1)

Definition at line 218 of file LTC2874.cpp.

◆ LTC2874_cq_output()

void LTC2874_cq_output ( uint8_t  port,
uint8_t  value 
)

Enables or Disables CQ output for specified port, then Updates.

Returns
void
Parameters
portPort number (1-4 or 5=ALL)
valueEnable (=1) or Disable (=0)

Definition at line 88 of file LTC2874.cpp.

◆ LTC2874_lplus_output()

void LTC2874_lplus_output ( uint8_t  port,
uint8_t  value 
)

Enables or Disables L+ output for specified port, then Updates.

Returns
void
Parameters
portPort number (1-4 or 5=ALL)
valueEnable (=1) or Disable (=0)

Definition at line 131 of file LTC2874.cpp.

◆ LTC2874_read_bit()

uint8_t LTC2874_read_bit ( uint8_t  LTC2874_register,
uint8_t  LTC2874_bit 
)

Reads a data BIT from specified register.

Returns
value of bit read
Parameters
LTC2874_registerRegister address (0x0-0xE)
LTC2874_bitMask of bit to be read (e.g. 0x40)

Definition at line 618 of file LTC2874.cpp.

◆ LTC2874_read_reg()

uint8_t LTC2874_read_reg ( uint8_t  LTC2874_register)

Reads data byte from specified register.

Returns
value of byte read
Parameters
LTC2874_registerRegister address (0x0-0xE)

Definition at line 598 of file LTC2874.cpp.

◆ LTC2874_reset()

void LTC2874_reset ( void  )

Resets LTC2874, returning default values to registers.

Returns
void

Definition at line 582 of file LTC2874.cpp.

◆ LTC2874_sio_mode()

void LTC2874_sio_mode ( uint8_t  port)

Sets SIO_MODE bit (and also Clears SLEW bit) for specified port, then Updates.

Returns
void
Parameters
portPort number (1-4 or 5=ALL)

Definition at line 174 of file LTC2874.cpp.

◆ LTC2874_update_all()

void LTC2874_update_all ( void  )

Updates all registers.

Returns
void

Definition at line 461 of file LTC2874.cpp.

◆ LTC2874_wakeup_request()

void LTC2874_wakeup_request ( uint8_t  port)

Sends WURQ (Wake-up Request) on specified port.

Returns
void
Parameters
portPort number (1-4)

Definition at line 433 of file LTC2874.cpp.

◆ LTC2874_write_2XPTC_value()

void LTC2874_write_2XPTC_value ( uint8_t  value)

Changes 2X Current Pulse Timer Control (2XPTC) setting without Updating.

value definitions: 0x0=60ms (default), 0x1=disabled, 0x2=30ms, 0x3=120ms

Returns
void
Parameters
value2XPTC setting (0x0-0x3)

Definition at line 377 of file LTC2874.cpp.

◆ LTC2874_write_bit_clr()

void LTC2874_write_bit_clr ( uint8_t  LTC2874_register,
uint8_t  LTC2874_bit 
)

Clears a register bit without Updating.

Returns
void
Parameters
LTC2874_registerRegister address (0x0-0xE)
LTC2874_bitMask of bit to be set (e.g. 0x40)

Definition at line 683 of file LTC2874.cpp.

◆ LTC2874_write_bit_clr_update_all()

void LTC2874_write_bit_clr_update_all ( uint8_t  LTC2874_register,
uint8_t  LTC2874_bit 
)

Clears a register bit, then Updates.

Returns
void
Parameters
LTC2874_registerRegister address (0x0-0xE)
LTC2874_bitMask of bit to be cleared (e.g. 0x40)

Definition at line 556 of file LTC2874.cpp.

◆ LTC2874_write_bit_set()

void LTC2874_write_bit_set ( uint8_t  LTC2874_register,
uint8_t  LTC2874_bit 
)

Sets a register bit without Updating.

Returns
void
Parameters
LTC2874_registerRegister address (0x0-0xE)
LTC2874_bitMask of bit to be set (e.g. 0x40)

Definition at line 658 of file LTC2874.cpp.

◆ LTC2874_write_bit_set_update_all()

void LTC2874_write_bit_set_update_all ( uint8_t  LTC2874_register,
uint8_t  LTC2874_bit 
)

Sets a register bit, then Updates.

Returns
void
Parameters
LTC2874_registerRegister address (0x0-0xE)
LTC2874_bitMask of bit to be set (e.g. 0x40)

Definition at line 530 of file LTC2874.cpp.

◆ LTC2874_write_bit_value()

void LTC2874_write_bit_value ( uint8_t  LTC2874_register,
uint8_t  LTC2874_bit,
uint8_t  value 
)

Changes value of a register bit without Updating.

Returns
void
Parameters
LTC2874_registerRegister address (0x0-0xE)
LTC2874_bitMask of bit to be written (e.g. 0x40)
valueBit value to be written (0 or 1)

Definition at line 711 of file LTC2874.cpp.

◆ LTC2874_write_bit_value_update_all()

void LTC2874_write_bit_value_update_all ( uint8_t  LTC2874_register,
uint8_t  LTC2874_bit,
uint8_t  value 
)

Changes value of a register bit, then Updates.

Returns
void
Parameters
LTC2874_registerRegister address (0x0-0xE)
LTC2874_bitMask of bit to be written (e.g. 0x40)
valueBit value to be written (0 or 1)

Definition at line 497 of file LTC2874.cpp.

◆ LTC2874_write_ILLM_value()

void LTC2874_write_ILLM_value ( uint8_t  port,
uint8_t  value 
)

Changes ILLM (Sinking current) setting for specified port without Updating.

value definitions: 0x0=500kohm, 0x1=2.5mA, 0x2=3.7mA, 0x3=6.2mA (default)

Returns
void
Parameters
portPort number (1-4 or 5=ALL)
valueILLM setting (0x0-0x3)

Definition at line 283 of file LTC2874.cpp.

◆ LTC2874_write_LPTC_value()

void LTC2874_write_LPTC_value ( uint8_t  value)

Change L+ Overcurrent Timer Control (LPTC) setting without Updating.

value definitions: 0x0=17us, 0x1=30us, 0x2=60us, 0x3=120us, 0x4=0.25ms, 0x5=0.5ms, 0x6=1ms, 0x7=2ms, 0x8=3.9ms, 0x9=7.8ms, 0xA=16ms, 0xB=30ms, 0xC=0.60ms, 0xD=0.13s, 0xE=0.25s, 0xF=0.25s

Returns
void
Parameters
valueLPTC setting (0x0-0xF)

Definition at line 321 of file LTC2874.cpp.

◆ LTC2874_write_NSF_value()

void LTC2874_write_NSF_value ( uint8_t  port,
uint8_t  value 
)

Changes NSF (Noise Suppression Filter) setting for specified port without Updating.

value definitions: 0x0=disabled, 0x1=20.3us, 0x2=2.8us, 0x3=0.6us (default)

Returns
void
Parameters
portPort number (1-4)
valueNSF setting (0x0-0x3)

Definition at line 253 of file LTC2874.cpp.

◆ LTC2874_write_OV_TH_value()

void LTC2874_write_OV_TH_value ( uint8_t  value)

Changes VDD Overvoltage Threshold (OV_TH) setting without Updating.

value definitions: 0x0=18V, 0x1=32V (default), 0x2=34V, 0x3=36V

Returns
void
Parameters
valueOV_TH setting (0x0-0x3)

Definition at line 405 of file LTC2874.cpp.

◆ LTC2874_write_register()

void LTC2874_write_register ( uint8_t  LTC2874_register,
uint8_t  value 
)

Writes byte of data to a register without Updating.

Returns
void
Parameters
LTC2874_registerRegister address (0x0-0xE)
LTC2874_dataData to be written into register

Definition at line 641 of file LTC2874.cpp.

◆ LTC2874_write_register_update_all()

void LTC2874_write_register_update_all ( uint8_t  LTC2874_register,
uint8_t  value 
)

Writes byte of data to a register, then Updates.

Returns
void
Parameters
LTC2874_registerRegister address (0x0-0xE)
LTC2874_dataData to be written into register

Definition at line 478 of file LTC2874.cpp.

◆ LTC2874_write_RETRYTC_value()

void LTC2874_write_RETRYTC_value ( uint8_t  value)

Changes Auto-Retry Timer Control (RETRYTC) setting without Updating.

value definitions: 0x0=0.12s, 0x1=0.24s, 0x2=0.49s, 0x3=0.98s, 0x4=2.0s, 0x5=3.9s, 0x6=7.9s, 0x7=15.7s

Returns
void
Parameters
valueRETRYTC setting (0x0-0x7)

Definition at line 349 of file LTC2874.cpp.