3 #include "dev/i2cmaster.h"
6 #define TMP102_READ_INTERVAL (CLOCK_SECOND/2) // Poll the sensor every 500 ms
8 PROCESS (temp_process,
"Test Temperature process");
9 AUTOSTART_PROCESSES (&temp_process);
18 time = (uint32_t)
ds3231_sensor.value(DS3231_SENSOR_GET_EPOCH_SECONDS_MSB) << 16;
19 time |= (uint32_t)
ds3231_sensor.value(DS3231_SENSOR_GET_EPOCH_SECONDS_LSB);
44 printf (
"RTC = %lu\n", ds3231_get_epoch_seconds());
void etimer_set(struct etimer *et, clock_time_t interval)
Set an event timer.
#define PROCESS_END()
Define the end of a process.
#define PROCESS(name, strname)
Declare a process.
#define PROCESS_THREAD(name, ev, data)
Define the body of a process.
static struct etimer et
NIC receiver thread.
#define PROCESS_WAIT_EVENT_UNTIL(c)
Wait for an event to be posted to the process, with an extra condition.
Sensors for DS3231 (RTC with Temperature Sensor).
const struct sensors_sensor ds3231_sensor
Export the DS3231 sensor object.
int etimer_expired(struct etimer *et)
Check if an event timer has expired.
void tmp102_init(void)
Initialiser for the TMP102 sensor driver.
#define PROCESS_BEGIN()
Define the beginning of a process.