n32: handle SETVALUE requests for fan speeds.
This commit is contained in:
@@ -83,7 +83,6 @@
|
||||
;#define APPS_MOTION
|
||||
#define APPS_REPORTSENSORS
|
||||
#define APPS_STATS
|
||||
;#define APPS_CO2WATCH
|
||||
|
||||
|
||||
; defines for modules
|
||||
@@ -95,8 +94,14 @@
|
||||
; ---------------------------------------------------------------------------
|
||||
; 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
|
||||
reti ; 0x01: INT0 External Interrupt 0
|
||||
rjmp com2wPcintIsr ; 0x02: PCI Pin Change Interrupt
|
||||
; rjmp pinChangeIsr ; 0x02: PCI Pin Change Interrupt
|
||||
reti ; 0x03: OC1A Timer/Counter1 Compare Match 1A
|
||||
reti ; 0x04: OC1B Timer/Counter1 Compare Match 1B
|
||||
reti ; 0x05: OVF1 Timer/Counter1 Overflow
|
||||
@@ -196,6 +202,52 @@ onEveryLoop:
|
||||
; @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/includes.asm"
|
||||
.include "common/divide.asm"
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user