|
CTS-SAT-1-OBC-Firmware
|
#include "eps_drivers/eps_types.h"#include "eps_drivers/eps_channel_control.h"#include "eps_drivers/eps_commands.h"#include <string.h>#include <stdio.h>
Functions | |
| EPS_CHANNEL_enum_t | EPS_channel_from_str (const char channel_name[]) |
| Converts an EPS channel name to a channel enum. | |
| char * | EPS_channel_to_str (EPS_CHANNEL_enum_t channel) |
| Converts channel enum into an ASCII-printable name string. | |
| uint8_t | EPS_set_channel_enabled (EPS_CHANNEL_enum_t channel, uint8_t enabled) |
| Sets the enabled state of an EPS channel (on or off). | |
| uint8_t | EPS_check_status_bit_of_channel (uint16_t status_bitfield_1, uint16_t status_bitfield_2, uint8_t channel_number) |
| Takes in the status bitfields of the eps and outputs the status of the given channel number. | |
| uint8_t | EPS_convert_ch_num_to_string_and_append (char *response_output_buf, uint16_t response_output_buf_len, uint8_t ch_number) |
| Convert EPS ch_number to ch_name, then append as a JSON list element to response_output_buf. | |
| void | EPS_get_enabled_channels_json (uint16_t status_bitfield_1, uint16_t status_bitfield_2, char *response_output_buf, uint16_t response_output_buf_len) |
| EPS_CHANNEL_enum_t EPS_channel_from_str | ( | const char | channel_name[] | ) |
Converts an EPS channel name to a channel enum.
| channel_name | A case-insensitive c-string of the channel name (e.g., "mpi"), or a number representing the channel number (e.g., "1" or "16"). Valid string values: "vbatt_stack", "stack_5v", "stack_3v3", "camera", "uhf_antenna_deploy", "gnss", "mpi_5v", "mpi_12v", "boom". |

| char * EPS_channel_to_str | ( | EPS_CHANNEL_enum_t | channel | ) |
Converts channel enum into an ASCII-printable name string.
| channel | An enum of typedef EPS_CHANNEL_enum_t representing the different channel names of the EPS Ex. EPS_CHANNEL_VBATT_STACK , EPS_CHANNEL_5V_CH2_UNUSED or EPS_CHANNEL_3V3_UHF_ANTENNA_DEPLOY |

| uint8_t EPS_check_status_bit_of_channel | ( | uint16_t | status_bitfield_1, |
| uint16_t | status_bitfield_2, | ||
| uint8_t | channel_number ) |
Takes in the status bitfields of the eps and outputs the status of the given channel number.
| status_bitfield_1 | The status bitfield of channels 0-15. |
| status_bitfield_2 | The status bitfield of channels 16-31. |

| uint8_t EPS_convert_ch_num_to_string_and_append | ( | char * | response_output_buf, |
| uint16_t | response_output_buf_len, | ||
| uint8_t | ch_number ) |
Convert EPS ch_number to ch_name, then append as a JSON list element to response_output_buf.
| response_output_buf | The output buffer that will store the string |
| response_output_buf_len | The total length of the output buffer |
| ch_number | The channel number of the EPS that will be converted to channel name |


| void EPS_get_enabled_channels_json | ( | uint16_t | status_bitfield_1, |
| uint16_t | status_bitfield_2, | ||
| char * | response_output_buf, | ||
| uint16_t | response_output_buf_len ) |


| uint8_t EPS_set_channel_enabled | ( | EPS_CHANNEL_enum_t | channel, |
| uint8_t | enabled ) |
Sets the enabled state of an EPS channel (on or off).
| channel | The channel to enable or disable. |
| enabled | 0 to disable, >0 to enable. |

