n32: handle SETVALUE requests for fan speeds.
This commit is contained in:
@@ -83,7 +83,6 @@
|
|||||||
;#define APPS_MOTION
|
;#define APPS_MOTION
|
||||||
#define APPS_REPORTSENSORS
|
#define APPS_REPORTSENSORS
|
||||||
#define APPS_STATS
|
#define APPS_STATS
|
||||||
;#define APPS_CO2WATCH
|
|
||||||
|
|
||||||
|
|
||||||
; defines for modules
|
; defines for modules
|
||||||
@@ -95,8 +94,14 @@
|
|||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; defines for values
|
; defines for values
|
||||||
|
|
||||||
;.equ VALUE_ID_SGP40_TVOC = 0x08
|
.equ VALUE_ID_FAN1_DUTY = 0x88 ; 0-99
|
||||||
|
.equ VALUE_ID_FAN1_SPEED = 0x08 ; RPM
|
||||||
|
|
||||||
|
.equ VALUE_ID_FAN2_DUTY = 0x89 ; 0-99
|
||||||
|
.equ VALUE_ID_FAN2_SPEED = 0x09 ; RPM
|
||||||
|
|
||||||
|
.equ VALUE_ID_FAN3_DUTY = 0x8a ; 0-99
|
||||||
|
.equ VALUE_ID_FAN3_SPEED = 0x0a ; RPM
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -115,6 +120,7 @@
|
|||||||
rjmp BOOTLOADER_ADDR ; 0x00: Reset vector Reset Vector
|
rjmp BOOTLOADER_ADDR ; 0x00: Reset vector Reset Vector
|
||||||
reti ; 0x01: INT0 External Interrupt 0
|
reti ; 0x01: INT0 External Interrupt 0
|
||||||
rjmp com2wPcintIsr ; 0x02: PCI Pin Change Interrupt
|
rjmp com2wPcintIsr ; 0x02: PCI Pin Change Interrupt
|
||||||
|
; rjmp pinChangeIsr ; 0x02: PCI Pin Change Interrupt
|
||||||
reti ; 0x03: OC1A Timer/Counter1 Compare Match 1A
|
reti ; 0x03: OC1A Timer/Counter1 Compare Match 1A
|
||||||
reti ; 0x04: OC1B Timer/Counter1 Compare Match 1B
|
reti ; 0x04: OC1B Timer/Counter1 Compare Match 1B
|
||||||
reti ; 0x05: OVF1 Timer/Counter1 Overflow
|
reti ; 0x05: OVF1 Timer/Counter1 Overflow
|
||||||
@@ -196,6 +202,52 @@ onEveryLoop:
|
|||||||
; @end
|
; @end
|
||||||
|
|
||||||
|
|
||||||
|
; ---------------------------------------------------------------------------
|
||||||
|
; @routine pinChangeIsr @global @isr
|
||||||
|
;
|
||||||
|
; ISR for PCINT0/1
|
||||||
|
;
|
||||||
|
; @clobbers: none
|
||||||
|
|
||||||
|
pinChangeIsr:
|
||||||
|
push r15
|
||||||
|
in r15, SREG
|
||||||
|
push r18
|
||||||
|
push r19
|
||||||
|
inr r18, PINA
|
||||||
|
inr r19, PINB
|
||||||
|
push r16
|
||||||
|
push r17
|
||||||
|
push r20
|
||||||
|
push r21
|
||||||
|
push r22
|
||||||
|
push r24
|
||||||
|
push r25
|
||||||
|
push xl
|
||||||
|
push xh
|
||||||
|
push yl
|
||||||
|
push yh
|
||||||
|
push r18
|
||||||
|
mov r16, r19 ; PINB
|
||||||
|
bigcall MultiFan_CheckPort ; r17, r18, r24, r25, Y
|
||||||
|
pop r16 ; pop PINA to r16
|
||||||
|
bigcall COM2W_CheckPort ; (r16, r17, r18, r19, r20, r21, r22, r24, r25, X, Y)
|
||||||
|
pop yh
|
||||||
|
pop yl
|
||||||
|
pop xh
|
||||||
|
pop xl
|
||||||
|
pop r25
|
||||||
|
pop r24
|
||||||
|
pop r22
|
||||||
|
pop r21
|
||||||
|
pop r17
|
||||||
|
pop r16
|
||||||
|
pop r19
|
||||||
|
pop r18
|
||||||
|
out SREG, r15
|
||||||
|
pop r15
|
||||||
|
reti
|
||||||
|
; @end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -204,6 +256,7 @@ onEveryLoop:
|
|||||||
|
|
||||||
.include "devices/all/hw_tn861.asm"
|
.include "devices/all/hw_tn861.asm"
|
||||||
.include "devices/all/includes.asm"
|
.include "devices/all/includes.asm"
|
||||||
|
.include "common/divide.asm"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,15 @@
|
|||||||
<deviceversion>32</deviceversion>
|
<deviceversion>32</deviceversion>
|
||||||
|
|
||||||
<values>
|
<values>
|
||||||
<!--
|
<value name="FAN1_DUTY" id="0x88" type="actor" dataType="uint16" denom="1" />
|
||||||
<value name="SGP30_TVOC" id="0x09" type="sensor" dataType="rational" modality="tvoc" denom="1" />
|
<value name="FAN1_SPEED" id="0x08" type="sensor" dataType="uint16" modality="rpm" denom="1" />
|
||||||
<value name="SGP30_CO2" id="0x0a" type="sensor" dataType="rational" modality="co2" denom="1" />
|
|
||||||
-->
|
<value name="FAN2_DUTY" id="0x89" type="actor" dataType="uint16" denom="1" />
|
||||||
|
<value name="FAN2_SPEED" id="0x09" type="sensor" dataType="uint16" modality="rpm" denom="1" />
|
||||||
|
|
||||||
|
<value name="FAN3_DUTY" id="0x8a" type="actor" dataType="uint16" denom="1" />
|
||||||
|
<value name="FAN3_SPEED" id="0x0a" type="sensor" dataType="uint16" modality="rpm" denom="1" />
|
||||||
|
|
||||||
</values>
|
</values>
|
||||||
|
|
||||||
</device>
|
</device>
|
||||||
|
|||||||
Reference in New Issue
Block a user