Skip to content

Commit

Permalink
Fix compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
eandersson committed Nov 9, 2024
1 parent 35e5038 commit 8f31d4c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions main/TPS546.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ int TPS546_init(void)
{
uint8_t data[7];
uint8_t u8_value;
uint16_t u16_value;
uint16_t u16_value = 0;
uint8_t read_mfr_revision[4];
int temp;
uint8_t comp_config[5];
Expand Down Expand Up @@ -569,7 +569,7 @@ void TPS546_write_entire_config(void)

int TPS546_get_frequency(void)
{
uint16_t value;
uint16_t value = 0;
int freq;

smb_read_word(PMBUS_FREQUENCY_SWITCH, &value);
Expand All @@ -580,7 +580,7 @@ int TPS546_get_frequency(void)

void TPS546_set_frequency(int newfreq)
{
uint16_t value;
uint16_t value = 0;
//int freq;

ESP_LOGI(TAG, "Writing new frequency: %d", newfreq);
Expand All @@ -595,7 +595,7 @@ void TPS546_set_frequency(int newfreq)

int TPS546_get_temperature(void)
{
uint16_t value;
uint16_t value = 0;
int temp;

smb_read_word(PMBUS_READ_TEMPERATURE_1, &value);
Expand All @@ -605,7 +605,7 @@ int TPS546_get_temperature(void)

float TPS546_get_vin(void)
{
uint16_t u16_value;
uint16_t u16_value = 0;
float vin;

/* Get voltage input (ULINEAR16) */
Expand All @@ -623,7 +623,7 @@ float TPS546_get_vin(void)

float TPS546_get_iout(void)
{
uint16_t u16_value;
uint16_t u16_value = 0;
float iout;

/* Get current output (SLINEAR11) */
Expand All @@ -643,7 +643,7 @@ float TPS546_get_iout(void)

float TPS546_get_vout(void)
{
uint16_t u16_value;
uint16_t u16_value = 0;
float vout;

/* Get voltage output (ULINEAR16) */
Expand All @@ -660,7 +660,7 @@ float TPS546_get_vout(void)
}

void TPS546_print_status(void) {
uint16_t u16_value;
uint16_t u16_value = 0;
uint8_t u8_value;

if (smb_read_word(PMBUS_STATUS_WORD, &u16_value) != ESP_OK) {
Expand Down Expand Up @@ -692,7 +692,7 @@ void TPS546_print_status(void) {
**/
void TPS546_set_vout(float volts)
{
uint16_t value;
uint16_t value = 0;

if (volts == 0) {
/* turn off output */
Expand Down Expand Up @@ -722,7 +722,7 @@ void TPS546_set_vout(float volts)

void TPS546_show_voltage_settings(void)
{
uint16_t u16_value;
uint16_t u16_value = 0;
float f_value;

ESP_LOGI(TAG, "-----------VOLTAGE---------------------");
Expand Down

0 comments on commit 8f31d4c

Please sign in to comment.