diff --git a/README.md b/README.md index f842f40fe6a4e5a8fef2197f5a96de20bb3d8bd8..765859c6b5a203c04afc3e18eb67249739e4ac5b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ libcoincellhell is a shared library that allows you to control coincellhell devi For questions or comments, please write to klemm@rhd-instruments.de -Full Online API documentation can be built with the "doc" target and is also avialable [here](http://uvos.xyz/kiss/libcoincellhell). +Full Online API documentation can be built with the "doc" target and is also available [here](http://uvos.xyz/kiss/libcoincellhell). A PDF with API documentation can be found [here](http://uvos.xyz/kiss/libcoincellhell.pdf). ## Compile/Install @@ -33,6 +33,6 @@ to make the documentation: * make doc -### Licence +### License -libcoincellhell is licenced to you under the Apache License, Version 2.0 +libcoincellhell is licensed to you under the Apache License, Version 2.0 diff --git a/coincellhell/coincellhell.h b/coincellhell/coincellhell.h index 1de08667f5344a82d20787e7daa560a9ffe56a48..240aa08bd437b7f0bdbeeb67b28339bfc9ee112e 100644 --- a/coincellhell/coincellhell.h +++ b/coincellhell/coincellhell.h @@ -34,9 +34,9 @@ #include "usbcommands.h" /** -Api to controll EISmultiplexer devices. +API to control EISmultiplexer devices. * @defgroup API User API -* This api allows you to controll the EISmultiplexer device. +* This API allows you to control the EISmultiplexer device. * @{ */ @@ -53,41 +53,41 @@ struct heater_state { /** true if heater is enabled*/ bool enabled; - /** true if heater is close to its setpoint*/ + /** true if heater is close to its set point*/ bool ready; - /** true if heater is currently exectueting a ramp*/ + /** true if heater is currently executing a ramp*/ bool ramp; /** true if the system has detected a fault with this heater*/ bool fault; /** the detected fault type as a fault_t enum*/ fault_t faultType; - /** current command (0-255) that is being sent to the dac for this heater*/ + /** current command (0-255) that is being sent to the DAC for this heater*/ uint8_t dacCommand; /** current target temperature for this heater*/ float setpoint; /** if a ramp is currently being executed, its final temperature will be set here*/ float rampTarget; - /** if a ramp is currently being executed, the unix timestamp at which it was started*/ + /** if a ramp is currently being executed, the UNIX timestamp at which it was started*/ time_t rampStartTime; - /** if a ramp is currently being executed, the unix timestamp at it will complete*/ + /** if a ramp is currently being executed, the UNIX timestamp at it will complete*/ time_t rampStopTime; }; /** - * @brief Attempts to connect to a EISmultiplexer device and initalizes a coincellhell struct - * @param hell pointer to a coincellhell struct to initalize + * @brief Attempts to connect to a EISmultiplexer device and initializes a coincellhell struct + * @param hell pointer to a coincellhell struct to initialize * @param serial The serial number of the device to connect to, or 0 for any - * @return 0 on sucess and < 0 on failure + * @return 0 on success and < 0 on failure */ int coincellhell_connect(struct coincellhell* hell, uint16_t serial); /** * @brief Reads the current temperature of the given heater at given location * @param heater heater from which to get the temperature - * @param location Place where temperature shal be mesured - * @param temperature A float where the temperature in degrees celcius will be stored - * @return 0 on sucess and < 0 on failure + * @param location Place where temperature shall be measured + * @param temperature A float where the temperature in degrees Celsius will be stored + * @return 0 on success and < 0 on failure */ int coincellhell_get_temperature(struct coincellhell* hell, uint8_t heater, temperature_sensor_location_t location, float* temperature); @@ -95,15 +95,15 @@ int coincellhell_get_temperature(struct coincellhell* hell, uint8_t heater, temp * @brief Sets the target temperature of the given heater * @param heater heater for which to set the temperature * @param temperature temperature to set - * @return 0 on sucess and < 0 on failure + * @return 0 on success and < 0 on failure */ int coincellhell_set_temperature(struct coincellhell* hell, uint8_t heater, float temperature); /** * @brief Gets the target temperature of the given heater * @param heater heater for which to set the temperature - * @param temperature A float where the temperature in degrees celcius will be stored - * @return 0 on sucess and < 0 on failure + * @param temperature A float where the temperature in degrees Celsius will be stored + * @return 0 on success and < 0 on failure */ int coincellhell_get_temperature_setpoint(struct coincellhell* hell, uint8_t heater, float* temperature); @@ -111,7 +111,7 @@ int coincellhell_get_temperature_setpoint(struct coincellhell* hell, uint8_t hea * @brief Gets the state struct for the given heater * @param heater heater for which to set the temperature * @param state A struct where the state will be stored - * @return 0 on sucess and < 0 on failure + * @return 0 on success and < 0 on failure */ int coincellhell_get_state(struct coincellhell* hell, uint8_t heater, struct heater_state* state); @@ -119,14 +119,14 @@ int coincellhell_get_state(struct coincellhell* hell, uint8_t heater, struct hea * @brief Sets the enabled state for a give heater * @param heater heater for which to set the enabled state * @param state A struct where the state will be stored - * @return 0 on sucess and < 0 on failure + * @return 0 on success and < 0 on failure */ int coincellhell_set_enabled(struct coincellhell* hell, uint8_t heater, bool enabled); /** - * @brief Checks if all temperatures are close to thair setpoins - * @param ready a pointer to a bool where the result will be stored, true if all temperatures have been reatch, false otherwise - * @return 0 on sucess and < 0 on failure + * @brief Checks if all temperatures are close to their set points + * @param ready a pointer to a bool where the result will be stored, true if all temperatures have been reach, false otherwise + * @return 0 on success and < 0 on failure */ int coincellhell_check_ready(struct coincellhell* hell, bool* ready); @@ -134,22 +134,22 @@ int coincellhell_check_ready(struct coincellhell* hell, bool* ready); * @brief Will linearly ramp the temperature to the one provided from now until end_time * @param heater heater for which to set the ramp * @param temperature temperature to ramp to - * @return 0 on sucess and < 0 on failure + * @return 0 on success and < 0 on failure */ int coincellhell_set_temperature_ramp(struct coincellhell* hell, uint8_t heater, time_t end_time, float temperature); /** - * @brief Cancles any previously set ramp, the setpoint of the heater will hold the current temperature - * @param heater heater for which to cancle the ramp - * @return 0 on sucess and < 0 on failure + * @brief Cancels any previously set ramp, the set points of the heater will hold the current temperature + * @param heater heater for which to cancel the ramp + * @return 0 on success and < 0 on failure */ int coincellhell_cancle_ramp(struct coincellhell* hell, uint8_t heater); /** - * @brief Turns the led on the pcb on or off + * @brief Turns the led on the PCB on or off * @param hell pointer to a coincellhell struct * @param on true to turn the led on, false to turn it off - * @return 0 on sucess and < 0 on failure + * @return 0 on success and < 0 on failure */ int coincellhell_set_led(struct coincellhell* hell, bool on); @@ -167,7 +167,7 @@ void coincellhell_disconnect(struct coincellhell* hell); /** * @brief Returns a human readable string for a given fault. * @param fault the fault code - * @return a const string describeing the fault + * @return a const string describing the fault */ const char* coincellhell_string_for_fault(fault_t fault); diff --git a/options.h b/options.h index deec074dbbeba8ea50dfb5b419d02adac13728e0..fd8caa6fe61779d162f1c844613ffcd73570bbb7 100644 --- a/options.h +++ b/options.h @@ -42,7 +42,7 @@ static struct argp_option options[] = { {"interactive", 'i', 0, 0, "run in interactive mode" }, {"pipe", 'p', 0, 0, "run in pipe mode" }, - {"serial", 's', "[NUMMBER]", 0, "serial number of device to connect to"}, + {"serial", 's', "[NUMBER]", 0, "serial number of device to connect to"}, {"list", 'l', 0, 0, "list commands"}, {0} };