![]() |
DC2100A
1.2.0
Bi-Directional Cell Balancer Using the LTC3300-1 and the LTC6804-2
|
Driver Configuration Header File for LTC6804-2 Multicell Battery Monitors. More...
Go to the source code of this file.
Driver Configuration Header File for LTC6804-2 Multicell Battery Monitors.
Definition in file LTC6804-2_Config.h.
Macros | |
#define | LT6804_CONFIG_CS PIN_A5 |
Configures CS pin used to communicate with LTC6804-2. Note that code module directly controls CS for wakeup signals. More... | |
#define | LTC6804_CONFIG_TIMER PIC18FXXJ_Timer_Update() |
Configures Free Running Timer used to determine if the LTC6804 needs a LTC6804_TWAKE or LTC6804_TREADY duration wakeup pulse. More... | |
#define | LTC6804_CONFIG_TIMER_RESOLUTION (1L*PIC18FXXJ_TIMER_TICKS_PER_SEC) |
Resolution of LTC6804_CONFIG_TIMER in ticks per second. More... | |
#define | LTC6804_CONFIG_DELAY_US(us) delay_us(us) |
Function for delaying a specified number of us. More... | |
#define | LTC6804_CONFIG_NUM_BOARDS System_Num_Boards |
The number of LTC6804 addresses used in this system. This is used for loops over all available LTC6804s. More... | |
#define | LTC6804_CONFIG_GET_BOARD_ADDRESS(board_num) ((board_num == LTC6804_BROADCAST) ? LTC6804_COMMAND_CODE_BROADCAST_ADDRESS : System_Address_Table[board_num] | LTC6804_COMMAND_CODE_ADDRESSED_BIT) |
Returns the physical address for a LTC6804 in the system given its logical address. More... | |
#define | LTC6804_CONFIG_SPI_SET_BAUD(baud_khz) PIC18FXXJ_SPI_Set_Baud(baud_khz) |
Configures the function called to set the baud rate to the LTC6804. More... | |
#define | LTC6804_CONFIG_SPI_BUFFER_RECEIVE_START(buffer, num_bytes) PIC18FXXJ_SPI_Buffer_Receive_Start(buffer, num_bytes) |
Note - This LTC6804 driver is designed for a buffered SPI peripheral (DMA, Interrupt driven, etc) to maximize throughput. More... | |
#define | LTC6804_CONFIG_SPI_BUFFER_SEND_START(buffer, num_bytes) PIC18FXXJ_SPI_Buffer_Send_Start(buffer, num_bytes) |
Configures the function called to start sending a string of bytes to the LTC6804. More... | |
#define | LTC6804_CONFIG_SPI_BUFFER_DONE() PIC18FXXJ_SPI_Buffer_Done() |
Configures the function called to check if the last SPI communication to LTC6804 is done and SPI is ready to send/receive more data. More... | |
#define | LTC6804_CONFIG_SPI_BUFFER_RECEIVE_BYTES_AVAILABLE(buffer) PIC18FXXJ_SPI_Buffer_Receive_Bytes_Available(buffer) |
Configures the function called to return the number of bytes received in a buffer. More... | |
#define | LTC6804_CONFIG_ERROR_CRC(address, command, data_ptr, num_bytes) |
Configures interface through which LTC6804-2 driver module reports its CRC errors. More... | |
#define LT6804_CONFIG_CS PIN_A5 |
Configures CS pin used to communicate with LTC6804-2. Note that code module directly controls CS for wakeup signals.
Definition at line 88 of file LTC6804-2_Config.h.
#define LTC6804_CONFIG_DELAY_US | ( | us | ) | delay_us(us) |
Function for delaying a specified number of us.
This is used to generate wakeup signals for LTC6804.
Definition at line 99 of file LTC6804-2_Config.h.
#define LTC6804_CONFIG_ERROR_CRC | ( | address, | |
command, | |||
data_ptr, | |||
num_bytes | |||
) |
Configures interface through which LTC6804-2 driver module reports its CRC errors.
Definition at line 151 of file LTC6804-2_Config.h.
#define LTC6804_CONFIG_GET_BOARD_ADDRESS | ( | board_num | ) | ((board_num == LTC6804_BROADCAST) ? LTC6804_COMMAND_CODE_BROADCAST_ADDRESS : System_Address_Table[board_num] | LTC6804_COMMAND_CODE_ADDRESSED_BIT) |
Returns the physical address for a LTC6804 in the system given its logical address.
Definition at line 105 of file LTC6804-2_Config.h.
#define LTC6804_CONFIG_NUM_BOARDS System_Num_Boards |
The number of LTC6804 addresses used in this system. This is used for loops over all available LTC6804s.
Definition at line 102 of file LTC6804-2_Config.h.
#define LTC6804_CONFIG_SPI_BUFFER_DONE | ( | ) | PIC18FXXJ_SPI_Buffer_Done() |
Configures the function called to check if the last SPI communication to LTC6804 is done and SPI is ready to send/receive more data.
Definition at line 132 of file LTC6804-2_Config.h.
#define LTC6804_CONFIG_SPI_BUFFER_RECEIVE_BYTES_AVAILABLE | ( | buffer | ) | PIC18FXXJ_SPI_Buffer_Receive_Bytes_Available(buffer) |
Configures the function called to return the number of bytes received in a buffer.
Definition at line 138 of file LTC6804-2_Config.h.
#define LTC6804_CONFIG_SPI_BUFFER_RECEIVE_START | ( | buffer, | |
num_bytes | |||
) | PIC18FXXJ_SPI_Buffer_Receive_Start(buffer, num_bytes) |
Note - This LTC6804 driver is designed for a buffered SPI peripheral (DMA, Interrupt driven, etc) to maximize throughput.
If a simple, non-buffered SPI driver is all that's available, while loops will need to be incorporated in these defines. Configures the function called to start receiving a string of bytes to the LTC6804.
Definition at line 121 of file LTC6804-2_Config.h.
#define LTC6804_CONFIG_SPI_BUFFER_SEND_START | ( | buffer, | |
num_bytes | |||
) | PIC18FXXJ_SPI_Buffer_Send_Start(buffer, num_bytes) |
Configures the function called to start sending a string of bytes to the LTC6804.
Definition at line 128 of file LTC6804-2_Config.h.
#define LTC6804_CONFIG_SPI_SET_BAUD | ( | baud_khz | ) | PIC18FXXJ_SPI_Set_Baud(baud_khz) |
Configures the function called to set the baud rate to the LTC6804.
This is used to control the baud rate of the I2C and SPI Buses implemented with the LTC6804 GPIO
Definition at line 111 of file LTC6804-2_Config.h.
#define LTC6804_CONFIG_TIMER PIC18FXXJ_Timer_Update() |
Configures Free Running Timer used to determine if the LTC6804 needs a LTC6804_TWAKE or LTC6804_TREADY duration wakeup pulse.
Definition at line 91 of file LTC6804-2_Config.h.
#define LTC6804_CONFIG_TIMER_RESOLUTION (1L*PIC18FXXJ_TIMER_TICKS_PER_SEC) |
Resolution of LTC6804_CONFIG_TIMER in ticks per second.
Definition at line 94 of file LTC6804-2_Config.h.