aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-11-11 15:26:01 +0100
committerKarel Kočí <cynerd@email.cz>2015-11-11 15:26:13 +0100
commit4e773191d447ac434536262a6f204dd991d4ad77 (patch)
treefd3e56c5e7478286f21aa1e808999a1a80179a9f /src
parent96d4026f492b56ac67779ab8e74ed4c483337ec7 (diff)
downloadavr-ioe-4e773191d447ac434536262a6f204dd991d4ad77.tar.gz
avr-ioe-4e773191d447ac434536262a6f204dd991d4ad77.tar.bz2
avr-ioe-4e773191d447ac434536262a6f204dd991d4ad77.zip
tmp
Diffstat (limited to 'src')
-rw-r--r--src/sensor_dht22.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/sensor_dht22.c b/src/sensor_dht22.c
index 0ae7c01..7791060 100644
--- a/src/sensor_dht22.c
+++ b/src/sensor_dht22.c
@@ -35,7 +35,7 @@ inline void dht22_init(uint8_t pi) {
inline void dht22_read_deac(uint8_t status) {
- dht22_measurement.status = status;
+ dht22_measurement.status = status;
// Disable pin change interrupt
*(PPP.PCMSK) &= ~PPP.PCMSK_MASK;
timer_disable(CONFIG_IOE_SENSOR_DHT22_TIMER);
@@ -65,8 +65,8 @@ void dht22_read_pcint(void) {
}
break;
default:
- if (((*(PPP.PIN) & PPP.MASK) && dht22_measurement.port_status == 3) ||
- !(*(PPP.PIN & PPP.MASK)))
+ if (((*(PPP.PIN) & PPP.MASK) && dht22_measurement.port_status == 3)
+ || !(*(PPP.PIN & PPP.MASK)))
return;
dht22_measurement.port_status--;
}
@@ -89,7 +89,8 @@ int8_t dht22_read(uint8_t pi, struct dht22_value *rh,
_delay_us(500);
// Initialize timer
timer_init(CONFIG_IOE_SENSOR_DHT22_TIMER, TIMER_DIVIDER_64);
- timer_sethook(CONFIG_IOE_SENSOR_DHT22_TIMER, dht22_read_timer_overflow);
+ timer_sethook(CONFIG_IOE_SENSOR_DHT22_TIMER,
+ dht22_read_timer_overflow);
// Set pin change interrupt
*(PP.PCMSK) |= PP.PCMSK_MASK;
// Set port as output and pull-up resistor