move generic max1227 code to separate source file
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
@ -1 +1,5 @@
|
||||
#include "max1227.h"
|
||||
|
||||
uint8_t max1227::buildConvByte(ScanModes scanMode, uint8_t channel, bool readTemp) {
|
||||
return (1 << 7) | (channel << 3) | (scanMode << 1) | readTemp;
|
||||
}
|
||||
|
@ -1,8 +1,20 @@
|
||||
#ifndef MISSION_DEVICES_MAX1227_H_
|
||||
#define MISSION_DEVICES_MAX1227_H_
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace max1227 {
|
||||
|
||||
enum ScanModes : uint8_t {
|
||||
CHANNELS_0_TO_N = 0b00,
|
||||
CHANNEL_N_TO_HIGHEST = 0b01,
|
||||
N_REPEATEDLY = 0b10,
|
||||
N_ONCE = 0b11
|
||||
};
|
||||
|
||||
|
||||
uint8_t buildConvByte(ScanModes scanMode, uint8_t channel, bool readTemp);
|
||||
|
||||
}
|
||||
|
||||
#endif /* MISSION_DEVICES_MAX1227_H_ */
|
||||
|
Reference in New Issue
Block a user