1#ifndef INC_ADCS_INTERNAL_DRIVERS_H_
2#define INC_ADCS_INTERNAL_DRIVERS_H_
9#define ADCS_i2c_HANDLE &hi2c1
uint8_t ADCS_combine_sd_log_bitmasks(const uint8_t **array_in, const uint8_t array_in_len, uint8_t *array_out)
Take an arbitrary number (up to 63) of 10-byte uint8 arrays and return a single array which is the bi...
Definition adcs_internal_drivers.c:210
static const uint32_t ADCS_FILE_DOWNLOAD_TIMEOUT_MS
Definition adcs_internal_drivers.h:16
static const uint16_t ADCS_FILE_POINTER_TIMEOUT_MS
Definition adcs_internal_drivers.h:15
uint8_t ADCS_convert_double_to_string(double input, uint8_t precision, char *output_string, uint16_t str_len)
Convert a double into a string with a given decimal precision.
Definition adcs_internal_drivers.c:183
uint8_t ADCS_i2c_request_telemetry_and_check(uint8_t id, uint8_t *data, uint32_t data_length, uint8_t include_checksum)
Sends a telemetry request over I2C to the ADCS, and resends repeatedly if the checksums don't match.
Definition adcs_internal_drivers.c:68
uint8_t ADCS_convert_uint32_to_reversed_uint8_array_members(uint8_t *array, uint32_t value, uint16_t index)
Reverse the order of the four bytes of a uint32 to turn into uint8 and put into specified index of an...
Definition adcs_internal_drivers.c:168
uint8_t ADCS_send_i2c_telecommand(uint8_t id, uint8_t *data, uint32_t data_length, uint8_t include_checksum)
Sends a telecommand over I2C to the ADCS.
Definition adcs_internal_drivers.c:86
uint8_t ADCS_calculate_crc8_checksum(uint8_t *buffer, uint16_t len)
Calculates an 8-bit CRC value. Code provided by ADCS Firmware Reference Manual (p....
Definition adcs_internal_drivers.c:246
uint8_t ADCS_convert_uint16_to_reversed_uint8_array_members(uint8_t *array, uint16_t value, uint16_t index)
Swap low and high bytes of a uint16 to turn into uint8 and put into specified index of an array.
Definition adcs_internal_drivers.c:157
uint8_t ADCS_initialize_crc8_checksum()
Initialize the lookup table for 8-bit CRC calculation. Code provided by ADCS Firmware Reference Manua...
Definition adcs_internal_drivers.c:226
static const uint8_t ADCS_NO_CHECKSUM
Definition adcs_internal_drivers.h:12
static const uint8_t ADCS_CHECKSUM_TIMEOUT_TRIES
Definition adcs_internal_drivers.h:13
static const uint8_t ADCS_INCLUDE_CHECKSUM
Definition adcs_internal_drivers.h:11
uint8_t ADCS_send_i2c_telemetry_request(uint8_t id, uint8_t *data, uint32_t data_length, uint8_t include_checksum)
Sends a telemetry request over I2C to the ADCS.
Definition adcs_internal_drivers.c:118
static const uint16_t ADCS_PROCESSED_TIMEOUT_TRIES
Definition adcs_internal_drivers.h:14
uint8_t ADCS_i2c_send_command_and_check(uint8_t id, uint8_t *data, uint32_t data_length, uint8_t include_checksum)
Sends a telecommand over I2C to the ADCS, checks that it's been acknowledged, and returns the ACK err...
Definition adcs_internal_drivers.c:22
: Header for main.c file. This file contains the common defines of the application.