43 lines
		
	
	
		
			882 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			43 lines
		
	
	
		
			882 B
		
	
	
	
		
			C
		
	
	
	
	
	
/*
 | 
						|
 * ASS.h
 | 
						|
 *
 | 
						|
 *  Created on: Mar 24, 2025
 | 
						|
 *      Author: Vincent Chau
 | 
						|
 */
 | 
						|
 | 
						|
#include <stdbool.h>
 | 
						|
 | 
						|
#ifndef INC_ASS_H_
 | 
						|
#define INC_ASS_H_
 | 
						|
 | 
						|
 | 
						|
/// @brief ASS status register struct
 | 
						|
typedef struct {
 | 
						|
	bool idle;
 | 
						|
	bool reserved1;
 | 
						|
	bool reserved2;
 | 
						|
	bool dsp_s_up;
 | 
						|
	bool dsp_t_up;
 | 
						|
	bool reserved5;
 | 
						|
	bool reserved6;
 | 
						|
	bool bs_fail;
 | 
						|
	bool bc_fail;
 | 
						|
	bool reserved9;
 | 
						|
	bool dsp_sat;
 | 
						|
	bool com_crc_error;
 | 
						|
	bool reserved12;
 | 
						|
	bool reserved13;
 | 
						|
	bool dsp_s_missed;
 | 
						|
	bool dsp_t_missed;
 | 
						|
} ASS_Status;
 | 
						|
 | 
						|
void ASS_Init(I2C_HandleTypeDef *hi2c);
 | 
						|
void ASS_ReadSensor(int16_t* data_pressure, int16_t* data_temperatur);
 | 
						|
void ASS_WriteRegister(uint8_t address, uint8_t byte);
 | 
						|
void ASS_ReadRegister(uint8_t address, uint8_t* pData, uint16_t length);
 | 
						|
void ASS_ReadRegisterALL(uint8_t *pData);
 | 
						|
void ASS_GetStatus(void);
 | 
						|
void ASS_SendCAN(uint16_t data_pressure, uint16_t dat_temp);
 | 
						|
 | 
						|
#endif /* INC_HTPA_32X32D_H_ */
 |