Skip to content

Commit

Permalink
Standardize the format and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bwilless committed Nov 12, 2021
1 parent 4d12c85 commit 895d561
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 23 deletions.
11 changes: 10 additions & 1 deletion Examples/Avnet-ALS-PT19-LIghtSensor/als_pt19_light_sensor.h
Expand Up @@ -12,6 +12,9 @@ typedef enum __attribute__((packed))
IC_LIGHTSENSOR_HEARTBEAT,
IC_LIGHTSENSOR_READ_SENSOR_RESPOND_WITH_TELEMETRY,
IC_LIGHTSENSOR_SAMPLE_RATE,
/////////////////////////////////////////////////////////////////////////////////
// Don't change the enums above or the generic RTApp implementation will break //
/////////////////////////////////////////////////////////////////////////////////
IC_LIGHTSENSOR_READ_SENSOR,

} INTER_CORE_CMD_LIGHTSENSOR;
Expand All @@ -21,13 +24,19 @@ typedef struct __attribute__((packed))
{
INTER_CORE_CMD_LIGHTSENSOR cmd;
uint32_t sensorSampleRate;
////////////////////////////////////////////////////////////////////////////////////////
// Don't change the declarations above or the generic RTApp implementation will break //
////////////////////////////////////////////////////////////////////////////////////////
} IC_COMMAND_BLOCK_ALS_PT19_HL_TO_RT;

typedef struct __attribute__((packed))
{
INTER_CORE_CMD_LIGHTSENSOR cmd;
uint32_t sensorSampleRate;
char telemetryJSON[JSON_STRING_MAX_SIZE];
char telemetryJSON[JSON_STRING_MAX_SIZE];
////////////////////////////////////////////////////////////////////////////////////////
// Don't change the declarations above or the generic RTApp implementation will break //
////////////////////////////////////////////////////////////////////////////////////////
uint32_t sensorData;
double lightSensorLuxData;
} IC_COMMAND_BLOCK_ALS_PT19_RT_TO_HL;
11 changes: 10 additions & 1 deletion Examples/Avnet-HTU21D-TempHumRTApp/htu21d_rtapp.h
Expand Up @@ -12,7 +12,10 @@ typedef enum __attribute__((packed))
IC_TEMPHUM_UNKNOWN,
IC_TEMPHUM_HEARTBEAT,
IC_TEMPHUM_READ_SENSOR_RESPOND_WITH_TELEMETRY,
IC_TEMPHUM_SET_TELEMETRY_SEND_RATE,
IC_TEMPHUM_SET_TELEMETRY_SEND_RATE,
/////////////////////////////////////////////////////////////////////////////////
// Don't change the enums above or the generic RTApp implementation will break //
/////////////////////////////////////////////////////////////////////////////////
IC_TEMPHUM_READ_TEMP_HUM_SENSOR

} INTER_CORE_CMD_TEMPHUM;
Expand All @@ -22,13 +25,19 @@ typedef struct __attribute__((packed))
{
INTER_CORE_CMD_TEMPHUM cmd;
uint32_t telemtrySendRate;
////////////////////////////////////////////////////////////////////////////////////////
// Don't change the declarations above or the generic RTApp implementation will break //
////////////////////////////////////////////////////////////////////////////////////////
} IC_COMMAND_BLOCK_TEMPHUM_HL_TO_RT;

typedef struct __attribute__((packed))
{
INTER_CORE_CMD_TEMPHUM cmd;
uint32_t telemtrySendRate;
char telemetryJSON[JSON_STRING_MAX_SIZE];
////////////////////////////////////////////////////////////////////////////////////////
// Don't change the declarations above or the generic RTApp implementation will break //
////////////////////////////////////////////////////////////////////////////////////////
float temp;
float hum;
} IC_COMMAND_BLOCK_TEMPHUM_RT_TO_HL;
3 changes: 3 additions & 0 deletions Examples/Avnet-LPS22HH-PressureSensorRTApp/lps22hh_rtapp.h
Expand Up @@ -25,6 +25,9 @@ typedef struct __attribute__((packed))
{
INTER_CORE_CMD_LPS22HH cmd;
uint32_t sensorSampleRate;
////////////////////////////////////////////////////////////////////////////////////////
// Don't change the declarations above or the generic RTApp implementation will break //
////////////////////////////////////////////////////////////////////////////////////////
} IC_COMMAND_BLOCK_LPS22HH_HL_TO_RT;

// Define the data structure that the real time app sends
Expand Down
3 changes: 3 additions & 0 deletions Examples/Avnet-LSM6DSO-AccelerometerRTApp/lsm6dso_rtapp.h
Expand Up @@ -26,6 +26,9 @@ typedef struct __attribute__((packed))
{
INTER_CORE_CMD_LSM6DSO cmd;
uint32_t telemtrySendRate;
////////////////////////////////////////////////////////////////////////////////////////
// Don't change the declarations above or the generic RTApp implementation will break //
////////////////////////////////////////////////////////////////////////////////////////
uint32_t sensorSampleRate;
} IC_COMMAND_BLOCK_LSM6DSO_HL_TO_RT;

Expand Down
21 changes: 10 additions & 11 deletions Examples/AvnetGenericRTApp/generic_rt_app.h
Expand Up @@ -18,26 +18,25 @@ typedef enum __attribute__((packed))
IC_GENERIC_READ_SENSOR
} INTER_CORE_CMD_SAMPLE;

typedef struct __attribute__((packed))
// Define the expected data structure.
typedef struct __attribute__((packed))
{
INTER_CORE_CMD_SAMPLE cmd;
uint32_t sensorSampleRate;
char telemetryJSON[JSON_STRING_MAX_SIZE];
uint32_t telemetrySendRate;
////////////////////////////////////////////////////////////////////////////////////////
// Don't change the declarations above or the generic RTApp implementation will break //
////////////////////////////////////////////////////////////////////////////////////////
uint8_t rawData8bit;
float rawDataFloat;
} IC_COMMAND_BLOCK_SAMPLE_RT_TO_HL;

} IC_COMMAND_BLOCK_SAMPLE_HL_TO_RT;

// Define the expected data structure.
typedef struct __attribute__((packed))
typedef struct __attribute__((packed))
{
INTER_CORE_CMD_SAMPLE cmd;
uint32_t telemetrySendRate;
uint32_t sensorSampleRate;
char telemetryJSON[JSON_STRING_MAX_SIZE];
////////////////////////////////////////////////////////////////////////////////////////
// Don't change the declarations above or the generic RTApp implementation will break //
////////////////////////////////////////////////////////////////////////////////////////
} IC_COMMAND_BLOCK_SAMPLE_HL_TO_RT;
uint8_t rawData8bit;
float rawDataFloat;
} IC_COMMAND_BLOCK_SAMPLE_RT_TO_HL;

20 changes: 10 additions & 10 deletions Examples/AvnetGroveGPS/grove_gps.h
Expand Up @@ -19,6 +19,16 @@ typedef enum __attribute__((packed))

} INTER_CORE_CMD_GROVE_GPS;

// Define the expected data structure.
typedef struct __attribute__((packed))
{
INTER_CORE_CMD_GROVE_GPS cmd;
uint32_t telemetrySendRate;
////////////////////////////////////////////////////////////////////////////////////////
// Don't change the declarations above or the generic RTApp implementation will break //
////////////////////////////////////////////////////////////////////////////////////////
} IC_COMMAND_BLOCK_GROVE_GPS_HL_TO_RT;

typedef struct __attribute__((packed))
{
INTER_CORE_CMD_GROVE_GPS cmd;
Expand All @@ -35,13 +45,3 @@ typedef struct __attribute__((packed))
} IC_COMMAND_BLOCK_GROVE_GPS_RT_TO_HL;


// Define the expected data structure.
typedef struct __attribute__((packed))
{
INTER_CORE_CMD_GROVE_GPS cmd;
uint32_t telemetrySendRate;
char telemetryJSON[JSON_STRING_MAX_SIZE];
////////////////////////////////////////////////////////////////////////////////////////
// Don't change the declarations above or the generic RTApp implementation will break //
////////////////////////////////////////////////////////////////////////////////////////
} IC_COMMAND_BLOCK_GROVE_GPS_HL_TO_RT;

0 comments on commit 895d561

Please sign in to comment.