Skip to content

For LTC681x chips many functions are not returning values. #55

@gudnimg

Description

@gudnimg

I started with fixing the PEC errors: #54 These are very big bugs.

On a second look I noticed some self-tests aren't reporting their results which basically renders the self-test useless. Since it reports no errors. Below is a list of the functions with missing returns.

Function Chip Expected Behaviour Actual Behaviour
LTC6810_rdaux() LTC6810 Returns 0 if no errors detected. Returns -1 if a PEC mismatch is detected. Always returns 0. Which means Errors are not detected.
LTC6810_rdcomm() LTC6810 Returns 0 if no errors detected. Returns -1 if a PEC mismatch is detected. Always returns 0. Which means Errors are not detected.
LTC6810_run_adc_redundancy_st() LTC6810 Return the total number of errors detected. Always returns 0. Which means Errors are not detected.
LTC6811_rdaux() LTC6811 Returns 0 if no errors detected. Returns -1 if a PEC mismatch is detected. Always returns 0. Which means Errors are not detected.
LTC6811_rdcomm() LTC6811 Returns 0 if no errors detected. Returns -1 if a PEC mismatch is detected. Always returns 0. Which means Errors are not detected.
LTC6811_run_adc_redundancy_st() LTC6811 Return the total number of errors detected. Always returns 0. Which means Errors are not detected.
LTC6811_run_adc_overlap() LTC6811 Return the total number of errors detected. Always returns 0. Which means Errors are not detected.
LTC6812_rdsctrl() LTC6812 Returns 0 if no errors detected. Returns -1 if a PEC mismatch is detected. returns nothing. Undefined behaviour if return value is used.
LTC6812_rdaux() LTC6812 Returns 0 if no errors detected. Returns -1 if a PEC mismatch is detected. Always returns 0. Which means Errors are not detected.
LTC6812_rdcomm() LTC6812 Returns 0 if no errors detected. Returns -1 if a PEC mismatch is detected. Always returns 0. Which means Errors are not detected.
LTC6812_run_adc_redundancy_st() LTC6812 Return the total number of errors detected. Always returns 0. Which means Errors are not detected.
LTC6813_rdsctrl() LTC6813 Returns 0 if no errors detected. Returns -1 if a PEC mismatch is detected. returns nothing. Undefined behaviour if return value is used.
LTC6813_rdaux() LTC6813 Returns 0 if no errors detected. Returns -1 if a PEC mismatch is detected. Always returns 0. Which means Errors are not detected.
LTC6813_rdcomm() LTC6813 Returns 0 if no errors detected. Returns -1 if a PEC mismatch is detected. Always returns 0. Which means Errors are not detected.
LTC6813_run_adc_redundancy_st() LTC6813 Return the total number of errors detected. Always returns 0. Which means Errors are not detected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions