Changeset - faf3d701dcf0
[Not reviewed]
tip default
0 1 0
matthewreed - 7 years ago 2018-09-25 23:04:16

Added LightSense module
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
inc/protocol.h
Show inline comments
 
@@ -14,48 +14,49 @@ typedef struct {
 
    uint8_t id;
 
    uint16_t key;
 
    uint8_t sensor;
 
    union {
 
        float float_data;
 
        uint8_t byte_data[4];
 
    } data;
 
}  protocol_message_t;
 
 
typedef enum {
 
    ESTOP = 0x00,
 
    SILENCE_BUS = 0x01,
 
    SET_OUTPUT = 0X10,
 
    GET_DATA = 0x11,
 
    CONFIG = 0x12,
 
    CALIBRATE = 0x13,
 
} protocol_command_t;
 
 
typedef enum {
 
    MASTER = 0x00,
 
    AIRSENSE = 0x01,
 
    RELAYDRIVE = 0X02,
 
    WATERSENSE = 0x03,
 
    PROTOMODULE = 0x04,
 
    LIGHTSENSE = 0x05,
 
} protocol_device_t;
 
 
typedef enum {
 
    NONE = 0x0000,
 
    DIGITAL_INPUT = 0x0001,
 
    FREQ_INPUT = 0x0002,
 
    ANALOG_INPUT = 0x0003,
 
    DIGITAL_OUTPUT = 0x0004,
 
    PWM_OUTPUT = 0x0005,
 
    ANALOG_OUTPUT = 0x0006,
 
    AIR_TEMP = 0x0007,
 
    AIR_HUMIDITY = 0x0008,
 
    AIR_PRESSURE = 0x0009,
 
    AMBIENT_LIGHT = 0x000A,
 
    WATER_TEMP = 0x000B,
 
    WATER_LEVEL = 0x000C,
 
    WATER_CONDUCTIVITY = 0x000D,
 
    WATER_PH = 0x000E,
 
    CAN_ID = 0x0100,
 
    DATA_RATE = 0x0101,
 
    LED_BRIGHTNESS = 0x0102,
 
    INPUT = 0x0103,
 
    OUTPUT = 0x0104,
 
} protocol_data_key_t;
0 comments (0 inline, 0 general)