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

Add ADC usage (for stm32f303 devices) #47

Merged
merged 32 commits into from
Jul 19, 2020
Merged

Commits on Jul 18, 2020

  1. Configuration menu
    Copy the full SHA
    b6934fe View commit details
    Browse the repository at this point in the history
  2. add example for adc

    strom-und-spiele committed Jul 18, 2020
    Configuration menu
    Copy the full SHA
    40a3a2c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2d20228 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    611f219 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    62716c3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    13857e3 View commit details
    Browse the repository at this point in the history
  7. Add ADC support for all f303 sub variants.

    Also...
    * Reworked the Doc comments, added some TODO notes
    * moved MAX_ADVREGEN_STARTUP_US out of the corresponding function.
    * Removed some derived Traits that are not needed.
    * Refactored `wait_advregen_startup` function to avoid division by 0.
    * Added NOTEs for unsafe usage.
    strom-und-spiele committed Jul 18, 2020
    Configuration menu
    Copy the full SHA
    dc7f63a View commit details
    Browse the repository at this point in the history
  8. Update ADC Code to stm32f3 bump

    This means:
    * Renaming of some register accesses.
    * Dropping some helper functions for advregen that are not needed anymore.
    * Dropping some (now) unnecessary `unsafe` blocks.
    
    Also added ADC availability to the CHANGELOG.md
    strom-und-spiele committed Jul 18, 2020
    Configuration menu
    Copy the full SHA
    3a57d6b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    49d19db View commit details
    Browse the repository at this point in the history
  10. Apply consistent namings from code review

    Co-Authored-By: Sh3Rm4n <f.vioel@gmail.com>
    strom-und-spiele and Sh3Rm4n committed Jul 18, 2020
    Configuration menu
    Copy the full SHA
    f1ee27c View commit details
    Browse the repository at this point in the history
  11. Update consistency 2

    strom-und-spiele committed Jul 18, 2020
    Configuration menu
    Copy the full SHA
    e2d37c8 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    3e29640 View commit details
    Browse the repository at this point in the history
  13. Update Example

    Skip rustfmt in the example when building the adc
    
    The reader should check each line to make sure they understand what they
    are passing.
    strom-und-spiele committed Jul 18, 2020
    Configuration menu
    Copy the full SHA
    5b8b96a View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    3e84d05 View commit details
    Browse the repository at this point in the history
  15. Tread EOS flag better

    i.e.
    - use context sensitive read/write functions
    - clear flag after usage
    strom-und-spiele committed Jul 18, 2020
    Configuration menu
    Copy the full SHA
    1988a0d View commit details
    Browse the repository at this point in the history
  16. Make use of CKMODE_A

    strom-und-spiele committed Jul 18, 2020
    Configuration menu
    Copy the full SHA
    204fa84 View commit details
    Browse the repository at this point in the history
  17. Allows CKMODE to be set when initalizing the adc

    Clocksettings are checked during setup and as the setup can fail,
    Option<adc> is returned now.
    strom-und-spiele committed Jul 18, 2020
    Configuration menu
    Copy the full SHA
    a09800b View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    86c049b View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    c130f7a View commit details
    Browse the repository at this point in the history
  20. replace stm32 by pac

    strom-und-spiele committed Jul 18, 2020
    Configuration menu
    Copy the full SHA
    54cf1ed View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    d8a007f View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    09af232 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    9ea3dcf View commit details
    Browse the repository at this point in the history
  24. update feature gates

    strom-und-spiele committed Jul 18, 2020
    Configuration menu
    Copy the full SHA
    1d812ae View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    5e86d48 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    3258be6 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    a9832b9 View commit details
    Browse the repository at this point in the history
  28. Use descriptive methods on register calls

    Note:
    In fn calibrate,
    `while self.rb.cr.read().adcal().is_not_complete() {}`
    would be better than
    `while !self.rb.cr.read().adcal().is_complete() {}`
    However this seems to lack in our version of the PAC
    
    In fn disable,
    `self.rb.cr.modify(|_, w| w.aden().disable());`
    would be better than
    `self.rb.cr.modify(|_, w| w.aden().clear_bit());`
    However this seems to lack in our version of the PAC
    strom-und-spiele committed Jul 18, 2020
    Configuration menu
    Copy the full SHA
    153b51a View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    776c5fd View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    0c472c7 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2020

  1. Configuration menu
    Copy the full SHA
    ff7a430 View commit details
    Browse the repository at this point in the history
  2. Change default Sampletime to T_1

    This is the reset value of the ADC.
    Now when running the example it is possible to get values other than 0
    and 4095 by pressing the user button shortly.
    strom-und-spiele committed Jul 19, 2020
    Configuration menu
    Copy the full SHA
    26610c6 View commit details
    Browse the repository at this point in the history