forked from contiki-os/contiki
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DOS EOL and indentation fixes (core/ apps/ cpu/)
- Removed some DOS EOLs - Changed some tabs to spaces - Removed some trailing whitespaces Part of Pull Request contiki-os#6
- Loading branch information
1 parent
6c8fbd2
commit 713c2e5
Showing
6 changed files
with
266 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
#include "collect-view.h" | ||
#include "dev/cc2420.h" | ||
#include "dev/leds.h" | ||
#include "dev/i2cmaster.h" | ||
#include "dev/tmp102.h" | ||
|
||
#include "collect-view-z1.h" | ||
|
||
/*---------------------------------------------------------------------------*/ | ||
static uint16_t | ||
get_temp() | ||
{ | ||
/* XXX Fix me: check /examples/z1/test-tmp102.c for correct conversion */ | ||
return (uint16_t)tmp102_read_temp_raw(); | ||
} | ||
/*---------------------------------------------------------------------------*/ | ||
void | ||
collect_view_arch_read_sensors(struct collect_view_data_msg *msg) | ||
{ | ||
static int initialized = 0; | ||
|
||
if(!initialized) { | ||
tmp102_init(); | ||
initialized = 1; | ||
} | ||
|
||
msg->sensors[BATTERY_VOLTAGE_SENSOR] = 0; | ||
msg->sensors[BATTERY_INDICATOR] = 0; | ||
msg->sensors[LIGHT1_SENSOR] = 0; | ||
msg->sensors[LIGHT2_SENSOR] = 0; | ||
msg->sensors[TEMP_SENSOR] = get_temp(); | ||
msg->sensors[HUMIDITY_SENSOR] = 0; | ||
} | ||
/*---------------------------------------------------------------------------*/ | ||
#include "collect-view.h" | ||
#include "dev/cc2420.h" | ||
#include "dev/leds.h" | ||
#include "dev/i2cmaster.h" | ||
#include "dev/tmp102.h" | ||
|
||
#include "collect-view-z1.h" | ||
|
||
/*---------------------------------------------------------------------------*/ | ||
static uint16_t | ||
get_temp() | ||
{ | ||
/* XXX Fix me: check /examples/z1/test-tmp102.c for correct conversion */ | ||
return (uint16_t)tmp102_read_temp_raw(); | ||
} | ||
/*---------------------------------------------------------------------------*/ | ||
void | ||
collect_view_arch_read_sensors(struct collect_view_data_msg *msg) | ||
{ | ||
static int initialized = 0; | ||
|
||
if(!initialized) { | ||
tmp102_init(); | ||
initialized = 1; | ||
} | ||
|
||
msg->sensors[BATTERY_VOLTAGE_SENSOR] = 0; | ||
msg->sensors[BATTERY_INDICATOR] = 0; | ||
msg->sensors[LIGHT1_SENSOR] = 0; | ||
msg->sensors[LIGHT2_SENSOR] = 0; | ||
msg->sensors[TEMP_SENSOR] = get_temp(); | ||
msg->sensors[HUMIDITY_SENSOR] = 0; | ||
} | ||
/*---------------------------------------------------------------------------*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.