Browse Source

deleted not necessary files for temperature sensor

Sebastian 7 năm trước cách đây
mục cha
commit
dcc9017085
2 tập tin đã thay đổi với 0 bổ sung58 xóa
  1. 0 41
      CoffeeCode/temperatur.cpp
  2. 0 17
      CoffeeCode/temperatur.h

+ 0 - 41
CoffeeCode/temperatur.cpp

@@ -1,41 +0,0 @@
-/*
- * temperatur.cpp
- *
- *  Created on: Feb 23, 2018
- *      Author: sebastian
- */
-#include <wiringPi.h>
-//#include <wiringPiSPI.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <inttypes.h>
-#include <unistd.h>
-
-#include "global.h"
-#include "logger.h"
-#include "temperatur.h"
-#include "spi.h"
-
-uint8_t rawData[4] = {0,0,0,0};
-
-void temperatur_init(){
-	pinMode(TEMP_CS, OUTPUT);
-	digitalWrite(TEMP_CS, HIGH);
-}
-
-int16_t get_temperatur(){
-	//active low
-	digitalWrite(TEMP_CS, LOW);
-	//do one read, Temperatur will only be reevaluated on CS High
-	for(int i = 0; i < 4; i++){
-		rawData[i] = spi_readwrite(0);
-	}
-	digitalWrite(TEMP_CS, HIGH);
-
-	//extracting the temperature data without the lowest two bit
-	int16_t temp = (((uint16_t)rawData[0]) << 4) | (((uint16_t)rawData[1] >> 4) & 0x0F);
-	logger(V_BASIC, "%x, %x, %x, %x\n", rawData[0], rawData[1], rawData[2], rawData[3]);
-	return temp;
-}
-

+ 0 - 17
CoffeeCode/temperatur.h

@@ -1,17 +0,0 @@
-/*
- * temperatur.h
- *
- *  Created on: Feb 23, 2018
- *      Author: sebastian
- */
-
-#ifndef TEMPERATUR_H_
-#define TEMPERATUR_H_
-
-
-#define TEMP_CS	10 // CS for the MAX31855
-
-void temperatur_init(void);
-int16_t get_temperatur (void);
-
-#endif /* TEMPERATUR_H_ */