KIT Solar Car Project / Mbed 2 deprecated BMS_v1

Dependencies:   mbed INA226

Revision:
2:f6f76dde7e1d
Parent:
1:4dd3e328a30b
--- a/LTC681x.cpp	Fri Feb 09 04:43:04 2018 +0000
+++ b/LTC681x.cpp	Sat Oct 26 05:24:17 2019 +0000
@@ -1,10 +1,4 @@
-/*
-    General BMS Library
-    LTC681x.cpp
-*/
-
 #include "mbed.h"
-
 #include "LTC681x.h"
 #include "bms.h"
 //#include "LT_SPI.h"
@@ -48,7 +42,8 @@
     cs_high();
 }
 
-//Generic function to write 68xx commands and write payload data. Function calculated PEC for tx_cmd data
+//Generic function to write 68xx commands and write payload data. Function calculated PEC for tx_cmd data 68xx
+//コマンドの書き込みとペイロードデータの書き込みを行う汎用機能。 tx_cmdデータの関数計算PEC
 void write_68(uint8_t total_ic , uint8_t tx_cmd[2], uint8_t data[])
 {
     const uint8_t BYTES_IN_REG = 6;
@@ -65,7 +60,7 @@
     cmd[2] = (uint8_t)(cmd_pec >> 8);
     cmd[3] = (uint8_t)(cmd_pec);
     cmd_index = 4;
-    for (uint8_t current_ic = total_ic; current_ic > 0; current_ic--) {     // executes for each LTC681x in daisy chain, this loops starts with
+    for (uint8_t current_ic = total_ic; current_ic > 0; current_ic--) {     // executes for each LTC681x in daisy chain, this loops starts withデイジー・チェーンで各LTC681xに対して実行します。このループは
         // the last IC on the stack. The first configuration written is
         // received by the last IC in the daisy chain
 
@@ -168,7 +163,7 @@
 }
 
 
-//Starts cell voltage and SOC conversion
+//Starts cell voltage and SOC Starts cell voltage  and GPIO 1&2 conversion
 void LTC681x_adcvsc(
     uint8_t MD, //ADC Mode
     uint8_t DCP //Discharge Permit
@@ -352,7 +347,7 @@
     cmd_68(cmd);
 }
 
-//Start a Status ADC Conversion
+//Start a Status ADC Conversionステータス ADC 変換の開始
 void LTC681x_adstat(
     uint8_t MD, //ADC Mode
     uint8_t CHST //GPIO Channels to be measured
@@ -1040,7 +1035,7 @@
     return(error);
 }
 
-//runs the redundancy self test
+//runs the redundancy self test 冗長性セルフテストを実行する
 int16_t LTC681x_run_adc_redundancy_st(uint8_t adc_mode, uint8_t adc_reg, uint8_t total_ic, cell_asic ic[])
 {
     int16_t error = 0;
@@ -1229,7 +1224,7 @@
     }
 }
 
-//Helper function to intialize CFG variables.
+//Helper function to intialize CFG variables.CFG変数を慣用するヘルパー関数。
 void LTC681x_init_cfg(uint8_t total_ic, cell_asic ic[])
 {
     bool REFON = true;