BMS_T2
Dependencies: INA226
bms.h
00001 void cs_low(void); 00002 void cs_high(void); 00003 00004 void delay_u(uint16_t micro); 00005 00006 void delay_m(uint16_t milli); 00007 00008 void set_spi_freq(); 00009 00010 void spi_enable(void); 00011 00012 /* 00013 Writes an array of bytes out of the SPI port 00014 */ 00015 void spi_write_array(uint8_t len, // Option: Number of bytes to be written on the SPI port 00016 uint8_t data[] //Array of bytes to be written on the SPI port 00017 ); 00018 /* 00019 Writes and read a set number of bytes using the SPI port. 00020 00021 */ 00022 00023 void spi_write_read(uint8_t tx_Data[],//array of data to be written on SPI port 00024 uint8_t tx_len, //length of the tx data arry 00025 uint8_t *rx_data,//Input: array that will store the data read by the SPI port 00026 uint8_t rx_len //Option: number of bytes to be read from the SPI port 00027 ); 00028 00029 uint8_t spi_read_byte(uint8_t tx_dat);//name conflicts with linduino also needs to take a byte as a parameter
Generated on Tue Jul 12 2022 21:25:39 by 1.7.2