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

Implement HAL_Time_TicksToTimeMilliSec #145

Merged
merged 4 commits into from
Mar 6, 2017

Commits on Mar 2, 2017

  1. Implement HAL_Time_TicksToTimeMicroSec

    - rename function to HAL_Time_TicksToTimeMicroSec to clarify output
    - changed the output from 'ticks' (100ns intervals) to miliseconds to follow CMSIS API and because having a time base granularity of 1 milisecond is more than enough (100ns intervals is really too much for an embedded system) this also allows an extra efficiency of using 32bits vars and math for this instead of 64bits
    - update code accordingly where required
    - add ChibiOS implementation
    
    Signed-off-by: José Simões <[email protected]>
    josesimoes committed Mar 2, 2017
    Configuration menu
    Copy the full SHA
    324aa34 View commit details
    Browse the repository at this point in the history
  2. Rework types and adjust code accordingly

    - adjust return type of HAL_Time_CurrentTicks to uint32_t
    - update code accordingly
    - uncomment timeout code in WireProtocol
    - minor reworks in code per reviewer request
    
    Signed-off-by: José Simões <[email protected]>
    josesimoes committed Mar 2, 2017
    Configuration menu
    Copy the full SHA
    5f5385a View commit details
    Browse the repository at this point in the history
  3. Rework code to use milliseconds calculations instead of microseconds

    - as the system clock is in milliseconds it doesn't make sense to be performing the calculations in microseconds
    - update code accordingly
    - adjust target ChibiOS config to use 1ms as sys time base
    - adjust target ChibiOS config to use classic periodic tick (was set to use tick-less)
    
    Signed-off-by: José Simões <[email protected]>
    josesimoes committed Mar 2, 2017
    Configuration menu
    Copy the full SHA
    3a7be06 View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2017

  1. Replace code with ChibiOS macro rewrite and correct return type

    - ChibiOS macro STMS(n) will overflow when doing the math with uint32_t
    
    Signed-off-by: José Simões <[email protected]>
    josesimoes committed Mar 3, 2017
    Configuration menu
    Copy the full SHA
    9881e21 View commit details
    Browse the repository at this point in the history