deleted Debug

This commit is contained in:
2024-02-26 14:36:48 +01:00
84 changed files with 38 additions and 11349 deletions

View File

@ -14,6 +14,8 @@
* @version 0.1
*/
#include <stdbool.h>
#ifndef INC_HTPA_32X32D_H_
#define INC_HTPA_32X32D_H_
@ -26,7 +28,6 @@ typedef struct {
} HTPA_Status;
void HTPA_Init(I2C_HandleTypeDef *);
void HTPA_ReadBlock(uint8_t, uint8_t, uint16_t *[128]);
void HTPA_WriteRegister(uint8_t, uint8_t);
HTPA_Status HTPA_GetStatus(void);

View File

@ -41,7 +41,10 @@
I2C_HandleTypeDef i2c_handle;
HAL_StatusTypeDef i2c_return; // error handling maybe?
uint16_t blockData[128];
uint8_t data_topBlock[256];
uint8_t data_botBlock[256];
uint8_t htpa_statusReg;
/**
* @brief Initialization of HTPA Sensor
@ -79,9 +82,13 @@ void HTPA_Init(I2C_HandleTypeDef *hi2c){
*/
void HTPA_ReadBlock(uint8_t array_half, uint8_t block, uint16_t *pData[128]){
uint8_t config = 0;
config = (block << 4); // bit 5,4 block
//config = (block << 4); // bit 5,4 block
config |= 0x09; // bit 3 start | bit 1 wakeup
HTPA_WriteRegister(HTPA_SENSOR_CONFIG, config);
HAL_Delay(100); // dauer???
// read status register:
HAL_I2C_Master_Receive(&i2c_handle, HTPA_SENSOR_ADDRESS, &htpa_statusReg, 1, I2C_MAX_DELAY);
// tbc
}

View File

@ -44,7 +44,11 @@
I2C_HandleTypeDef hi2c1;
/* USER CODE BEGIN PV */
<<<<<<< HEAD
HTPA_Status temp_status;
=======
HTPA_Status htpa_status_test;
>>>>>>> afcf6b12b5d8a341020af122f3264c2701e1162e
/* USER CODE END PV */
@ -92,6 +96,9 @@ int main(void)
MX_I2C1_Init();
/* USER CODE BEGIN 2 */
HTPA_Init(&hi2c1);
htpa_status_test.vdd_meas = 1;
htpa_status_test.block = 3;
/* USER CODE END 2 */
@ -100,6 +107,7 @@ int main(void)
while (1)
{
temp_status = HTPA_GetStatus();
htpa_status_test = HTPA_GetStatus();
HAL_Delay(1000);
/* USER CODE END WHILE */