/*
 * IncFile1.h
 *
 * Created: 6.3.2019 11:58:57
 *  Author: z003knyu
 */

#ifndef mydatatypes_H_
#define mydatatypes_H_

typedef struct
{
	byte start;
	byte type;
	byte status;
	byte dataLen;
} bmsPacketHeaderStruct;

typedef struct
{
	uint16_t Volts; // unit 1mV
	int32_t Amps;   // unit 1mA
	int32_t Watts;   // unit 1W
	uint16_t CapacityRemainAh;
	uint8_t CapacityRemainPercent; //unit 1%
	uint32_t CapacityRemainWh; 	//unit Wh
	uint16_t Temp1;				   //unit 0.1C
	uint16_t Temp2;				   //unit 0.1C
	uint16_t BalanceCodeLow;
	uint16_t BalanceCodeHigh;
	uint8_t MosfetStatus;
	
} packBasicInfoStruct;


#endif /* mydatatypes_H_ */

// Color definitions for 64k color mode
// Bits 0..4 -> Blue 0..4
// Bits 5..10 -> Green 0..5
// Bits 11..15 -> Red 0..4
