5 #include "dev/i2cmaster.h"
9 #define READ_INTERVAL (CLOCK_SECOND)
17 time = (uint32_t)
ds3231_sensor.value(DS3231_SENSOR_GET_EPOCH_SECONDS_MSB) << 1;
18 time |= (uint32_t)
ds3231_sensor.value(DS3231_SENSOR_GET_EPOCH_SECONDS_LSB);
22 PROCESS (kirks_process,
"ds3231 Temp process");
23 AUTOSTART_PROCESSES (&kirks_process);
39 if( ev == PROCESS_EVENT_TIMER) {
41 printf(
"rtc temp * 100 %d\n",rtctemp);
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.
int ds3231_temperature(void)
ds3231_temperature
#define PROCESS_BEGIN()
Define the beginning of a process.