coincellhell 1.0.x
|
API to control EISmultiplexer devices. More...
Data Structures | |
struct | coincellhell |
struct | heater_state |
Functions | |
int | coincellhell_connect (struct coincellhell *hell, uint16_t serial) |
Attempts to connect to a EISmultiplexer device and initializes a coincellhell struct. | |
int | coincellhell_get_temperature (struct coincellhell *hell, uint8_t heater, temperature_sensor_location_t location, float *temperature) |
Reads the current temperature of the given heater at given location. | |
int | coincellhell_set_temperature (struct coincellhell *hell, uint8_t heater, float temperature) |
Sets the target temperature of the given heater. | |
int | coincellhell_get_temperature_setpoint (struct coincellhell *hell, uint8_t heater, float *temperature) |
Gets the target temperature of the given heater. | |
int | coincellhell_get_state (struct coincellhell *hell, uint8_t heater, struct heater_state *state) |
Gets the state struct for the given heater. | |
int | coincellhell_set_enabled (struct coincellhell *hell, uint8_t heater, bool enabled) |
Sets the enabled state for a give heater. | |
int | coincellhell_check_ready (struct coincellhell *hell, bool *ready) |
Checks if all temperatures are close to their set points. | |
int | coincellhell_set_temperature_ramp (struct coincellhell *hell, uint8_t heater, time_t end_time, float temperature) |
Will linearly ramp the temperature to the one provided from now until end_time. | |
int | coincellhell_cancle_ramp (struct coincellhell *hell, uint8_t heater) |
Cancels any previously set ramp, the set points of the heater will hold the current temperature. | |
int | coincellhell_set_led (struct coincellhell *hell, bool on) |
Turns the led on the PCB on or off. | |
int | coincellhell_reset (struct coincellhell *hell) |
resets the device | |
void | coincellhell_disconnect (struct coincellhell *hell) |
Disconnects from the coincellhell. | |
const char * | coincellhell_string_for_fault (fault_t fault) |
Returns a human readable string for a given fault. | |
int | coincellhell_write_eeprom (struct coincellhell *hell, uint16_t addr, uint16_t value) |
uint16_t | coincellhell_read_eeprom (struct coincellhell *hell, uint16_t addr) |
uint8_t | coincellhell_read_oscal (struct coincellhell *hell) |
uint32_t | coincellhell_get_seconds (struct coincellhell *hell) |
const uint8_t * | coincellhell_get_fw_git_revision (struct coincellhell *hell) |
int | coincellhell_enable_watchdog (struct coincellhell *hell) |
int | coincellhell_set_periodic_recal (struct coincellhell *hell, bool recal) |
void | coincellhell_reset_bus (struct coincellhell *hell) |
API to control EISmultiplexer devices.
This API allows you to control the EISmultiplexer device.
int coincellhell_cancle_ramp | ( | struct coincellhell * | hell, |
uint8_t | heater ) |
Cancels any previously set ramp, the set points of the heater will hold the current temperature.
heater | heater for which to cancel the ramp |
int coincellhell_check_ready | ( | struct coincellhell * | hell, |
bool * | ready ) |
Checks if all temperatures are close to their set points.
ready | a pointer to a bool where the result will be stored, true if all temperatures have been reach, false otherwise |
int coincellhell_connect | ( | struct coincellhell * | hell, |
uint16_t | serial ) |
Attempts to connect to a EISmultiplexer device and initializes a coincellhell struct.
hell | pointer to a coincellhell struct to initialize |
serial | The serial number of the device to connect to, or 0 for any |
int coincellhell_get_state | ( | struct coincellhell * | hell, |
uint8_t | heater, | ||
struct heater_state * | state ) |
Gets the state struct for the given heater.
heater | heater for which to set the temperature |
state | A struct where the state will be stored |
int coincellhell_get_temperature | ( | struct coincellhell * | hell, |
uint8_t | heater, | ||
temperature_sensor_location_t | location, | ||
float * | temperature ) |
Reads the current temperature of the given heater at given location.
heater | heater from which to get the temperature |
location | Place where temperature shall be measured |
temperature | A float where the temperature in degrees Celsius will be stored |
int coincellhell_get_temperature_setpoint | ( | struct coincellhell * | hell, |
uint8_t | heater, | ||
float * | temperature ) |
Gets the target temperature of the given heater.
heater | heater for which to set the temperature |
temperature | A float where the temperature in degrees Celsius will be stored |
int coincellhell_reset | ( | struct coincellhell * | hell | ) |
resets the device
hell | pointer to a coincellhell struct |
int coincellhell_set_enabled | ( | struct coincellhell * | hell, |
uint8_t | heater, | ||
bool | enabled ) |
Sets the enabled state for a give heater.
heater | heater for which to set the enabled state |
state | A struct where the state will be stored |
int coincellhell_set_led | ( | struct coincellhell * | hell, |
bool | on ) |
Turns the led on the PCB on or off.
hell | pointer to a coincellhell struct |
on | true to turn the led on, false to turn it off |
int coincellhell_set_temperature | ( | struct coincellhell * | hell, |
uint8_t | heater, | ||
float | temperature ) |
Sets the target temperature of the given heater.
heater | heater for which to set the temperature |
temperature | temperature to set |
int coincellhell_set_temperature_ramp | ( | struct coincellhell * | hell, |
uint8_t | heater, | ||
time_t | end_time, | ||
float | temperature ) |
Will linearly ramp the temperature to the one provided from now until end_time.
heater | heater for which to set the ramp |
temperature | temperature to ramp to |
const char * coincellhell_string_for_fault | ( | fault_t | fault | ) |
Returns a human readable string for a given fault.
fault | the fault code |