Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small fix when using write_68, read_68, and cmd_68 #46

Closed
wants to merge 6 commits into from

Conversation

gudnimg
Copy link

@gudnimg gudnimg commented Nov 18, 2020

  • write_68, read_68, and cmd_68 explicitly define that the command input should be an array with two bytes.
  • also fixed a small indent error in LTC681x_stsctrl()

gudnimg and others added 6 commits November 18, 2020 01:11
- write_68, read_68, and cmd_68 explicitly define that the command input should be an array with two bytes.
- also fixed a small indent error in LTC681x_stsctrl()
This saves about 130 bytes of memory (at least when I compile for ATmega2560 and ATmega2561). The for loop I removed basically just copies data to rx_data with exactly the same indexes so I don't really see why we need data. Simplifies the code a little bit :)
- Changed cmd[4] to cmd[2] in various places.
- Fix for LTC6813_rdpsb(). Now returns proper -1.
- Fix potential overflow in LTC6810_rdsid. It also returns proper -1.
- Removed unused variables in LTC6810_rds_reg()
- LTC681x_rdaux_reg now uses read_68()
- LTC681x_rdcv_reg now uses read_68()
- LTC681x_rdstat_reg now uses read_68()
@gudnimg
Copy link
Author

gudnimg commented Dec 9, 2020

Closing. I merged this into #47

@gudnimg gudnimg closed this Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant