Initial commit
This commit is contained in:
40
Core/Inc/Slave_Monitoring.h
Normal file
40
Core/Inc/Slave_Monitoring.h
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Slave_Monitoring.h
|
||||
*
|
||||
* Created on: Jun 15, 2022
|
||||
* Author: max
|
||||
*/
|
||||
|
||||
#ifndef INC_SLAVE_MONITORING_H_
|
||||
#define INC_SLAVE_MONITORING_H_
|
||||
|
||||
#include "AMS_Errorcodes.h"
|
||||
#include "Error_Check.h"
|
||||
#include "main.h"
|
||||
|
||||
#include "stm32g441xx.h"
|
||||
|
||||
|
||||
#define NUMBEROFSLAVES 6
|
||||
#define NUMBEROFCELLS 10
|
||||
#define NUMBEROFTEMPS 32
|
||||
|
||||
#define SLAVETIMEOUT 2000
|
||||
|
||||
typedef struct {
|
||||
|
||||
uint16_t slaveID;
|
||||
uint16_t cellVoltages[NUMBEROFCELLS];
|
||||
uint16_t cellTemps[NUMBEROFTEMPS];
|
||||
uint32_t timestamp;
|
||||
uint8_t error;
|
||||
uint8_t timeout;
|
||||
|
||||
} SlaveHandler;
|
||||
|
||||
extern SlaveHandler slaves[NUMBEROFSLAVES];
|
||||
|
||||
void initSlaves();
|
||||
uint8_t checkSlaveTimeout();
|
||||
|
||||
#endif /* INC_SLAVE_MONITORING_H_ */
|
||||
Reference in New Issue
Block a user