|
|
|
|
@ -17,7 +17,7 @@
|
|
|
|
|
#include "main.h"
|
|
|
|
|
|
|
|
|
|
uint8_t newThermoData = 1;
|
|
|
|
|
uint16_t thermoData[] = {1024, 814, 2475, 2243};
|
|
|
|
|
uint16_t thermoData[];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void hardinit() {
|
|
|
|
|
@ -75,12 +75,12 @@ int __attribute__((noreturn)) main(void) {
|
|
|
|
|
for(;;){
|
|
|
|
|
usbPoll();
|
|
|
|
|
|
|
|
|
|
SOFTTIMER(2,500) {
|
|
|
|
|
thermoData[0]=thermoData[0]+5;
|
|
|
|
|
thermoData[1]=thermoData[1]+15;
|
|
|
|
|
thermoData[2]=thermoData[2]+7;
|
|
|
|
|
thermoData[3]=thermoData[3]+18;
|
|
|
|
|
newThermoData = 1;
|
|
|
|
|
SOFTTIMER(2,800) {
|
|
|
|
|
uint16_t recv;
|
|
|
|
|
for(int i=0; i<4; i++) {
|
|
|
|
|
thermoData[i] = spi_master_transceive(7, i, 0);
|
|
|
|
|
}
|
|
|
|
|
newThermoData = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SOFTTIMER(1,250) {
|
|
|
|
|
@ -89,13 +89,6 @@ int __attribute__((noreturn)) main(void) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
ISR(TIMER1_OVF_vect, ISR_NAKED){
|
|
|
|
|
asm volatile ("in %0, %1\n" : "=r" (sreg_store) : "I" (_SFR_IO_ADDR(SREG)));
|
|
|
|
|
timer1_acc++;
|
|
|
|
|
asm volatile ("out %1, %0\n" : "=r" (sreg_store) : "I" (_SFR_IO_ADDR(SREG)));
|
|
|
|
|
reti();
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
ISR(TIMER1_OVF_vect,ISR_NOBLOCK){
|
|
|
|
|
uint16_t tmp;
|
|
|
|
|
|