DC2100A  1.2.0
Bi-Directional Cell Balancer Using the LTC3300-1 and the LTC6804-2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Driver Configuration Header File for LTC3300-1 High Efficiency Bidirectional Multicell Battery Balancer. More...

Go to the source code of this file.

Detailed Description

Driver Configuration Header File for LTC3300-1 High Efficiency Bidirectional Multicell Battery Balancer.

Definition in file LTC3300-1_Config.h.

Macros

#define LTC3300_CONFIG_NUM_ICS_PER_ADDRESS   DC2100A_NUM_LTC3300
 Configures the number of LTC3300-1 ICs in a chain at each logical address. More...
 
#define LTC3300_CONFIG_SPI_WRITE(address, data_ptr, num_bytes, baud_khz)   LTC6804_SPI_Write(address, TRUE, TRUE, data_ptr, num_bytes, baud_khz)
 Configures interface through which LTC3300-1 driver module sends SPI bytes to a chain of LTC3300-1 ICs. More...
 
#define LTC3300_CONFIG_SPI_READ(address, data_ptr, num_bytes, baud_khz)   LTC6804_SPI_Read(address, TRUE, TRUE, data_ptr, num_bytes, baud_khz)
 Configures interface through which LTC3300-1 driver module receives SPI bytes from a chain of LTC3300-1 ICs. More...
 
#define LTC3300_CONFIG_ERROR_CRC(address, ic_num, command, data_ptr, num_bytes)
 Configures interface through which LTC3300-1 driver module reports its CRC errors. More...
 

Macro Definition Documentation

#define LTC3300_CONFIG_ERROR_CRC (   address,
  ic_num,
  command,
  data_ptr,
  num_bytes 
)
Value:
{ \
int8 temp_data[ERROR_DATA_SIZE]; \
int8 byte_num; \
temp_data[0] = address; \
temp_data[1] = ic_num; \
temp_data[2] = command; \
for (byte_num = 3; byte_num < MIN(num_bytes + 2, ERROR_DATA_SIZE); byte_num++) \
{ \
temp_data[byte_num] = data_ptr[byte_num - 2]; \
} \
Error_Data_Set(ERROR_CODE_LTC3300_CRC, temp_data, num_bytes + 2); \
}

Configures interface through which LTC3300-1 driver module reports its CRC errors.

  • Parameters
    • address: The logical address for the PCB containing these LTC3300-1 ICs.
    • data_ptr: Pointer to bytes read from LTC3300-1.
    • num_bytes: Number of bytes read from LTC3300-1.
  • Usage Examples
    • Example 1: If DC2100A Error.c/.h code module is defined for a system, framing the data and passing to that error reporting module would be here.
    • Example 2: if stdout is defined for a system, this macro would format the data into a printf() statement.
    • Example 3: If LTC3300-1 CRC errors are to be ignored, this macro could be defined as blank.

Definition at line 121 of file LTC3300-1_Config.h.

#define LTC3300_CONFIG_NUM_ICS_PER_ADDRESS   DC2100A_NUM_LTC3300

Configures the number of LTC3300-1 ICs in a chain at each logical address.

Definition at line 86 of file LTC3300-1_Config.h.

#define LTC3300_CONFIG_SPI_READ (   address,
  data_ptr,
  num_bytes,
  baud_khz 
)    LTC6804_SPI_Read(address, TRUE, TRUE, data_ptr, num_bytes, baud_khz)

Configures interface through which LTC3300-1 driver module receives SPI bytes from a chain of LTC3300-1 ICs.

  • Parameters
    • address: The logical address for the PCB containing these LTC3300-1 ICs.
    • data_ptr: Pointer to where LTC3300-1 bytes read via SPI will be written.
    • num_bytes: Number of bytes to be read via SPI.
    • baud_khz: The baud rate of the SPI communication in kHz.
  • Usage Examples
    • Example 1: If communication is through an LTC6804-2, this macro would call the LTC6804-2 driver's SPI Read function.
    • Example 2: If communication is direct from the microcontroller, this macro would call the microcontroller's SPI Read function.

Definition at line 109 of file LTC3300-1_Config.h.

#define LTC3300_CONFIG_SPI_WRITE (   address,
  data_ptr,
  num_bytes,
  baud_khz 
)    LTC6804_SPI_Write(address, TRUE, TRUE, data_ptr, num_bytes, baud_khz)

Configures interface through which LTC3300-1 driver module sends SPI bytes to a chain of LTC3300-1 ICs.

  • Parameters
    • address: The logical address for the PCB containing these LTC3300-1 ICs.
    • data_ptr: Pointer to LTC3300-1 bytes to be written via SPI.
    • num_bytes: Number of bytes to be written via SPI.
    • baud_khz: The baud rate of the SPI communication in kHz.
  • Usage Examples
    • If communication is through an LTC6804-2, this macro would call the LTC6804-2 driver's SPI Write function.
    • If communication is direct from the microcontroller, this macro would call the microcontroller's SPI Write function.

Definition at line 97 of file LTC3300-1_Config.h.