Dependents:   Oregon_Decoder_V2_V3

Oregon decoding Library.

It manages protocoles V2.1 and V3.

To be used with RTOS OS2 or MBED V5

Regul.h

Committer:
sev2000
Date:
2019-12-22
Revision:
2:708963e0f9b0
Parent:
1:37ddcdfee022
Child:
3:04c74f871dcd

File content as of revision 2:708963e0f9b0:

extern Serial pc;

//#define __DEBUG__
#define O_Level 1
#define O_DBG(x, ...) if (O_Level>=3) pc.printf("[DBG]"x"\r\n", ##__VA_ARGS__); 
#define O_WARN(x, ...) if (O_Level>=2) pc.printf("[WARN]"x"\r\n", ##__VA_ARGS__); 
#define O_ERR(x, ...) if (O_Level>=1) pc.printf("[ERR]"x"\r\n", ##__VA_ARGS__); 

#define BUF_SIZE 1024

#define NB_CHAN 3

typedef struct {
    char deviceID;
    unsigned long timestamp;
    float hum1;
    float temp1;
    float hum2;
    float temp2;
    unsigned char pwm;
    int speed;
}measure_t;

void Init_Oregon(void);
void RF_Active(void);
void RF_StdBy(void);