temperature reading successul, but i2c sometimes hanging up

This commit is contained in:
2021-01-11 16:56:44 +01:00
parent c73c41b03a
commit adef6eb188
167 changed files with 5938 additions and 20 deletions

View File

@ -17,33 +17,29 @@ namespace TMP1075 {
static const uint8_t CFGR_CMD_SIZE = 3;
static const uint8_t POINTER_REG_SIZE = 1;
static const lp_id_t TEMPERATURE_C = GET_TEMP;
static const uint32_t DATA_SET_ID = 0x0;
static const uint32_t TMP1075_DATA_SET_ID = GET_TEMP;
static const uint8_t MAX_REPLY_LENGTH = GET_TEMP_REPLY_SIZE;
enum Tmp1075PoolIds: lp_id_t {
TEMPERATURE_C_TMP1075_1,
TEMPERATURE_C_TMP1075_2
};
class Tmp1075Dataset:
public StaticLocalDataSet<sizeof(float)> {
public:
/**
* Constructor used by owner and data creators like device handlers.
* @param owner
* @param setId
*/
Tmp1075Dataset(HasLocalDataPoolIF* owner):
StaticLocalDataSet(owner, DATA_SET_ID) {
StaticLocalDataSet(owner, TMP1075_DATA_SET_ID) {
}
/**
* Constructor used by data users like controllers.
* @param sid
*/
Tmp1075Dataset(object_id_t objectId):
StaticLocalDataSet(sid_t(objectId, DATA_SET_ID)) {
StaticLocalDataSet(sid_t(objectId, TMP1075_DATA_SET_ID)) {
}
lp_var_t<float> temperatureCelcius = lp_var_t<float>(sid.objectId,
TEMPERATURE_C, this);
TEMPERATURE_C_TMP1075_1, this);
};
}