diff --git a/Keil 8051 v9.53 - Release/RF-Bridge-EFM8BB1.hex b/Keil 8051 v9.53 - Release/RF-Bridge-EFM8BB1.hex index 5101602..f2a3689 100644 --- a/Keil 8051 v9.53 - Release/RF-Bridge-EFM8BB1.hex +++ b/Keil 8051 v9.53 - Release/RF-Bridge-EFM8BB1.hex @@ -129,7 +129,7 @@ :1007F000FCA9F022BBFEFCF309DFFCA9F0228E2647 :100800008F27E4F528C3E5279464E5269400501E5D :10081000E4F528E528120C51F8E4F608F6E528126C -:100820000C92E4F60528E528B407E8C2902290006F +:100820000C92E4F60528E528B408E8C2902290006E :100830008AE01470030208E6046003020A40786745 :10084000E6C4540F704CD3E5279494E526941150D8 :1008500003020A40300003020A40120C9A18F6ED17 @@ -162,7 +162,7 @@ :100A00001B120C82120DF9120CB0120DB8F5321235 :100A10000CB02432F582E4341B120C82120E031245 :100A20000CB0120DC4F536120CB0120DD0F537AF64 -:100A300028120A410528E528C3940750030208E953 +:100A300028120A410528E528C3940850030208E952 :100A4000228F29E4F538EF120C92E6701A90008B91 :100A50007408F07E007F707D007B017A00790312BC :100A600007D2E490007AF0AB2CAA2DA92EC003C0C7 diff --git a/inc/RF_Protocols.h b/inc/RF_Protocols.h index 1a78012..b456fd0 100644 --- a/inc/RF_Protocols.h +++ b/inc/RF_Protocols.h @@ -145,6 +145,18 @@ SI_SEGMENT_VARIABLE(PROTOCOL_START(HT12)[], static uint8_t, SI_SEG_CODE) = { 2, SI_SEGMENT_VARIABLE(PROTOCOL_BIT0(HT12)[], static uint8_t, SI_SEG_CODE) = { 0, 1 }; SI_SEGMENT_VARIABLE(PROTOCOL_BIT1(HT12)[], static uint8_t, SI_SEG_CODE) = { 1, 0 }; +/* + * Meteo SPxx - Weather station (PHU Metrex) + * https://gist.github.com/klaper/ce3ba02501516d9a6d294367d2c300a6 + */ + +#define SP45 + +SI_SEGMENT_VARIABLE(PROTOCOL_PULSES(SP45)[], static uint16_t, SI_SEG_CODE) = { 650, 7810, 1820, 3980 }; +SI_SEGMENT_VARIABLE(PROTOCOL_START(SP45)[], static uint8_t, SI_SEG_CODE) = { 0, 1 }; +SI_SEGMENT_VARIABLE(PROTOCOL_BIT0(SP45)[], static uint8_t, SI_SEG_CODE) = { 0, 2 }; +SI_SEGMENT_VARIABLE(PROTOCOL_BIT1(SP45)[], static uint8_t, SI_SEG_CODE) = { 0, 3 }; + SI_SEGMENT_VARIABLE(PROTOCOL_DATA[], static struct BUCKET_PROTOCOL_DATA, SI_SEG_CODE) = { /* @@ -229,6 +241,18 @@ SI_SEGMENT_VARIABLE(PROTOCOL_DATA[], static struct BUCKET_PROTOCOL_DATA, SI_SEG_ { &PROTOCOL_BIT1(HT12), ARRAY_LENGTH(PROTOCOL_BIT1(HT12)) }, 12, true + }, + + /* + * Meteo SPxx - Weather station (PHU Metrex) + */ + { + { &PROTOCOL_PULSES(SP45), ARRAY_LENGTH(PROTOCOL_PULSES(SP45)) }, + { &PROTOCOL_START(SP45), ARRAY_LENGTH(PROTOCOL_START(SP45)) }, + { &PROTOCOL_BIT0(SP45), ARRAY_LENGTH(PROTOCOL_BIT0(SP45)) }, + { &PROTOCOL_BIT1(SP45), ARRAY_LENGTH(PROTOCOL_BIT1(SP45)) }, + 40, + false } };