Midnight Sun Firmware
Loading...
Searching...
No Matches
tcixtma1.h
1#pragma once
2
3/************************************************************************************************
4 * @file tcixtma1.h
5 *
6 * @brief Header file to implement the hydrogen sensing from the TCIXTMA1 sensor
7 *
8 * @date 2026-06-07
9 * @author Midnight Sun Team #24 - MSXVI
10 ************************************************************************************************/
11/* Standard library Headers */
12#include <stddef.h>
13#include <stdint.h>
14
15/* Inter-component Headers */
16#include "gpio.h"
17#include "i2c.h"
18#include "status.h"
19
20/* Intra-component Headers */
21#include "tcixtma1_defs.h"
22
29typedef struct {
30 I2CPort i2c_port;
31 I2CAddress i2c_address;
33
41StatusCode tcixtma1_init(TCIXTMA1Storage *storage, I2CPort i2c_port, I2CAddress i2c_address);
42
49StatusCode tcixtma1_get_hydrogen_concentration(TCIXTMA1Storage *storage, float *out_hydrogen_con);
50
51#ifdef MS_PLATFORM_X86
52
57void tcixtma1_set_hydrogen_concentration(float hydrogen_con);
58
59#endif
60
uint8_t I2CAddress
I2C address type.
Definition: i2c.h:34
I2CPort
I2C Port selection.
Definition: i2c.h:37
StatusCode
StatusCodes for various errors.
Definition: status.h:27
StatusCode tcixtma1_get_hydrogen_concentration(TCIXTMA1Storage *storage, float *out_hydrogen_con)
Gets the instantaneous current in Amps.
Definition: tcixtma1.c:33
StatusCode tcixtma1_init(TCIXTMA1Storage *storage, I2CPort i2c_port, I2CAddress i2c_address)
Initialize the TCIXTMA1 driver.
Definition: tcixtma1.c:20
Definition: tcixtma1.h:29