![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
SEDO subject project
Dependencies: ds3231 mbed-rtos mbed DHT
Diff: main.h
- Revision:
- 9:5e9c4277151d
- Child:
- 12:1d544cdab2cf
diff -r 8d3e14c8d5f1 -r 5e9c4277151d main.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.h Mon May 08 07:20:54 2017 +0000 @@ -0,0 +1,38 @@ +/* + * MAIN.H + */ +#ifndef MAIN_H +#define MAIN_H +#define MAX_TIME_TO_WAIT_NODE_COMM 13 + +struct SensorData{ + float temperature; + float humidity; + float dewPoint; + int8_t DHTError; +}; + +struct task_definition_struct { + void(*task)(void const *args); + uint32_t(*init)(void const *args); // Result: 1 = OK, 0 = FAIL + void *task_args; // NULL For DEFAULT (NULL) + void *init_args; // NULL For DEFAULT (NULL) + osPriority priority; +// uint32_t stack_size; // 0 for DEFAULT (DEFAULT_STACK_SIZE) +// unsigned char *stack_pointer; // NULL for DEFAULT (NULL) + uint32_t delay; // Delay on start from previous task + Thread *thread; // To be filled in during runtime + uint32_t retVal; // Return Value - to be filled in during runtime +}; + +extern Mutex mutexPCComm; +extern Serial pc; +extern Mutex mutexData; +extern SensorData data; +extern task_definition_struct taskList[]; +extern volatile bool sensors_running; +extern uint32_t initTasks(void); + +int publishSensorData(void); + +#endif