diff --git a/inc/RF_Protocols.h b/inc/RF_Protocols.h index 0d29da5..9538d4e 100644 --- a/inc/RF_Protocols.h +++ b/inc/RF_Protocols.h @@ -225,6 +225,28 @@ SI_SEGMENT_VARIABLE(PROTOCOL_BIT0(DG_HOSA)[], static uint8_t, SI_SEG_CODE) = { H SI_SEGMENT_VARIABLE(PROTOCOL_BIT1(DG_HOSA)[], static uint8_t, SI_SEG_CODE) = { HIGH(1), LOW(0) }; #endif +/* + * Digoo DG-HOSA PIR DETECTOR + */ +#if EFM8BB1_SUPPORT_DG_HOSA_PIR_PROTOCOL == 1 +#define DG_HOSA_PIR +SI_SEGMENT_VARIABLE(PROTOCOL_BUCKETS(DG_HOSA_PIR)[], static uint16_t, SI_SEG_CODE) = { 420, 1220, 12400 }; +SI_SEGMENT_VARIABLE(PROTOCOL_START(DG_HOSA_PIR)[], static uint8_t, SI_SEG_CODE) = { HIGH(0), LOW(2) }; +SI_SEGMENT_VARIABLE(PROTOCOL_BIT0(DG_HOSA_PIR)[], static uint8_t, SI_SEG_CODE) = { HIGH(0), LOW(1) }; +SI_SEGMENT_VARIABLE(PROTOCOL_BIT1(DG_HOSA_PIR)[], static uint8_t, SI_SEG_CODE) = { HIGH(1), LOW(0) }; +#endif + +/* + * Digoo DG-R8H Outdoor Humidity Sensor, Issue #119 + */ +#if EFM8BB1_SUPPORT_DG_R8H_PROTOCOL == 1 +#define DG_R8H +SI_SEGMENT_VARIABLE(PROTOCOL_BUCKETS(DG_R8H)[], static uint16_t, SI_SEG_CODE) = { 500, 1000, 2000, 4000 }; +SI_SEGMENT_VARIABLE(PROTOCOL_START(DG_R8H)[], static uint8_t, SI_SEG_CODE) = { LOW(3), HIGH(0) }; +SI_SEGMENT_VARIABLE(PROTOCOL_BIT0(DG_R8H)[], static uint8_t, SI_SEG_CODE) = { LOW(1), HIGH(0) }; +SI_SEGMENT_VARIABLE(PROTOCOL_BIT1(DG_R8H)[], static uint8_t, SI_SEG_CODE) = { LOW(2), HIGH(0) }; +#endif + /* * KaKu wall sockets */ @@ -488,6 +510,32 @@ SI_SEGMENT_VARIABLE(PROTOCOL_DATA[], static struct BUCKET_PROTOCOL_DATA, SI_SEG_ 24 }, #endif +#if EFM8BB1_SUPPORT_DG_HOSA_PIR_PROTOCOL == 1 + /* + * Digoo DG-HOSA PIR DETECTOR + */ + { + { &PROTOCOL_BUCKETS(DG_HOSA_PIR), ARRAY_LENGTH(PROTOCOL_BUCKETS(DG_HOSA_PIR)) }, + { &PROTOCOL_START(DG_HOSA_PIR), ARRAY_LENGTH(PROTOCOL_START(DG_HOSA_PIR)) }, + { &PROTOCOL_BIT0(DG_HOSA_PIR), ARRAY_LENGTH(PROTOCOL_BIT0(DG_HOSA_PIR)) }, + { &PROTOCOL_BIT1(DG_HOSA_PIR), ARRAY_LENGTH(PROTOCOL_BIT1(DG_HOSA_PIR)) }, + { NULL, 0 }, + 24 + }, +#endif +#if EFM8BB1_SUPPORT_DG_R8H_PROTOCOL == 1 + /* + * Digoo DG-R8H Outdoor Humidity Sensor, Issue #119 + */ + { + { &PROTOCOL_BUCKETS(DG_R8H), ARRAY_LENGTH(PROTOCOL_BUCKETS(DG_R8H)) }, + { &PROTOCOL_START(DG_R8H), ARRAY_LENGTH(PROTOCOL_START(DG_R8H)) }, + { &PROTOCOL_BIT0(DG_R8H), ARRAY_LENGTH(PROTOCOL_BIT0(DG_R8H)) }, + { &PROTOCOL_BIT1(DG_R8H), ARRAY_LENGTH(PROTOCOL_BIT1(DG_R8H)) }, + { NULL, 0 }, + 36 + }, +#endif #if EFM8BB1_SUPPORT_Kaku_PROTOCOL == 1 /* * KaKu wall sockets @@ -595,4 +643,4 @@ SI_SEGMENT_VARIABLE(PROTOCOL_DATA[], static struct BUCKET_PROTOCOL_DATA, SI_SEG_ }; #define PROTOCOLCOUNT (sizeof(PROTOCOL_DATA) / sizeof(PROTOCOL_DATA[0])) -#endif /* INC_RF_PROTOCOLS_H_ */ +#endif /* INC_RF_PROTOCOLS_H_ */