You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
709 B
36 lines
709 B
#ifndef MAXHANDLER_H_
|
|
#define MAXHANDLER_H_
|
|
|
|
#include "software_SPI.h"
|
|
#include "RSLinkCustom.h"
|
|
#include "SYSTEM.h"
|
|
|
|
//Define some channel stuff here
|
|
typedef struct{
|
|
uint8_t state;
|
|
uint32_t Temperature;
|
|
uint16_t CJTemp;
|
|
uint32_t lastTick;
|
|
uint8_t captureFlags;
|
|
//uint8_t pin;
|
|
} ThermoData;
|
|
|
|
#define THERMO_CHN_COUNT 3 //TODO Duplicate from IDIBUS_IMPL_Custom
|
|
//Also hardcoded value in sSPI
|
|
ThermoData ThermoSensor[THERMO_CHN_COUNT];
|
|
|
|
enum InitMode { //BitFlags
|
|
NoConversion = 0x00,
|
|
OneShotConversion = 0x01,
|
|
AutoConversion = 0x02
|
|
};
|
|
|
|
uint8_t MaxSelectedChannel;
|
|
|
|
void Max_Init(uint8_t ch, uint8_t initMode);
|
|
|
|
uint8_t IsMaxDRDYLow(uint8_t ch);
|
|
|
|
void Max_Handler();
|
|
|
|
#endif /* MAXHANDLER_H_ */ |