bms_hardware
Embed:
(wiki syntax)
Show/hide line numbers
bms_hardware.h
00001 /*! 00002 LTC681x hardware library 00003 @verbatim 00004 This library contains all of the hardware dependant functions used by the bms 00005 code 00006 @endverbatim 00007 REVISION HISTORY 00008 $Revision: 7139 $ 00009 $Date: 2017-4 00010 00011 Copyright (c) 2017, Linear Technology Corp.(LTC) 00012 All rights reserved. 00013 00014 Redistribution and use in source and binary forms, with or without 00015 modification, are permitted provided that the following conditions are met: 00016 00017 1. Redistributions of source code must retain the above copyright notice, this 00018 list of conditions and the following disclaimer. 00019 2. Redistributions in binary form must reproduce the above copyright notice, 00020 this list of conditions and the following disclaimer in the documentation 00021 and/or other materials provided with the distribution. 00022 00023 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 00024 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00025 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00026 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 00027 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00028 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00029 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00030 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00031 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00032 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00033 00034 The views and conclusions contained in the software and documentation are those 00035 of the authors and should not be interpreted as representing official policies, 00036 either expressed or implied, of Linear Technology Corp. 00037 00038 The Linear Technology Linduino is not affiliated with the official Arduino team. 00039 However, the Linduino is only possible because of the Arduino team's commitment 00040 to the open-source community. Please, visit http://www.arduino.cc and 00041 http://store.arduino.cc , and consider a purchase that will help fund their 00042 ongoing work. 00043 00044 Copyright 2017 Linear Technology Corp. (LTC) 00045 */ 00046 #ifndef BMSHARDWARE_H 00047 #define BMSHARDWARE_H 00048 00049 #include "mbed.h" 00050 #include "LT_SPI.h" 00051 00052 //void set_spi_freq(); 00053 00054 00055 /* 00056 Writes an array of bytes out of the SPI port 00057 */ 00058 void spi_write_array(uint8_t len, // Option: Number of bytes to be written on the SPI port 00059 uint8_t data[] //Array of bytes to be written on the SPI port 00060 ); 00061 /* 00062 Writes and read a set number of bytes using the SPI port. 00063 00064 */ 00065 00066 void spi_write_read(uint8_t tx_Data[],//array of data to be written on SPI port 00067 uint8_t tx_len, //length of the tx data arry 00068 uint8_t *rx_data,//Input: array that will store the data read by the SPI port 00069 uint8_t rx_len //Option: number of bytes to be read from the SPI port 00070 ); 00071 00072 uint8_t spi_read_byte(uint8_t tx_dat);//name conflicts with linduino also needs to take a byte as a parameter 00073 #endif
Generated on Tue Jul 19 2022 05:01:14 by 1.7.2