This is the pull request for the implementation of the PULP APB Timer. This pull request extends pull request #20 and thus should only be merged after it.
In order to properly handle the difference between the VP and the actual ASIC peripheral, the two timers have been encapsulated in a single module called timer and inside that one, we have choose conditionally at compile-time which driver gets compiled. The selection is done using the vp feature. When vp feature is enabled, the timer_unit timer is used. In this pull request the vp feature is enabled.
Summary of changes:
examples/headsail-bsp/Cargo.toml: Added vp feature
examples/headsail-bsp/src/apb_timer.rs: APB Timer implementation (New file)
examples/headsail-bsp/src/lib.rs: Set timer_unit and apb_timer modules as private and added encapsulating module "timer"
examples/hpc/hello-hpc/Cargo.toml: Added vp feature for headsail-bsp
hpc/hello-hpc/examples/timer0.rs: Added new encapsulating interface
This is the pull request for the implementation of the PULP APB Timer. This pull request extends pull request #20 and thus should only be merged after it. In order to properly handle the difference between the VP and the actual ASIC peripheral, the two timers have been encapsulated in a single module called timer and inside that one, we have choose conditionally at compile-time which driver gets compiled. The selection is done using the vp feature. When vp feature is enabled, the timer_unit timer is used. In this pull request the vp feature is enabled.
Summary of changes: examples/headsail-bsp/Cargo.toml: Added vp feature examples/headsail-bsp/src/apb_timer.rs: APB Timer implementation (New file) examples/headsail-bsp/src/lib.rs: Set timer_unit and apb_timer modules as private and added encapsulating module "timer" examples/hpc/hello-hpc/Cargo.toml: Added vp feature for headsail-bsp hpc/hello-hpc/examples/timer0.rs: Added new encapsulating interface