libDaisy icon indicating copy to clipboard operation
libDaisy copied to clipboard

CPPify GPIO and Pin

Open beserge opened this issue 3 years ago • 5 comments

beserge avatar Jun 03 '21 15:06 beserge

Unit Test Results

    1 files  ±0    13 suites  ±0   0s :stopwatch: ±0s 125 tests ±0  125 :heavy_check_mark: ±0  0 :zzz: ±0  0 :x: ±0 

Results for commit 36868185. ± Comparison against base commit 40015643.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Jun 03 '21 15:06 github-actions[bot]

OK this is working well from the limited tests I've made. I'm certain there are bugs in here, but it's a big PR, so it would really benefit from the better unit test coverage we have coming down the pike.

Other than that, some reviews on the GPIO and Pin classes themselves would be good. I also updated hal_map to cpp as part of this.

beserge avatar Jul 06 '21 19:07 beserge

I agree with @TheSlowGrowth's notes so far. I'll have some time later this week to give this a review myself.

stephenhensley avatar Jul 07 '21 16:07 stephenhensley

I've marked this as a draft for now, and renamed to a more fitting name given that #451 handles the new types.

It might be worth just using this as a reference, and doing individual PRs to update each relevant peripheral/device to use the new Pin/GPIO structs in stead of the old types. It'll definitely be easier to review.

Fortunately, for the time being the new Pin object can be dropped in anywhere that the dsy_gpio_pin was previously used.

stephenhensley avatar Dec 06 '21 21:12 stephenhensley

Due to the massive amount of conflicts, and the fact that it might be cleaner to piece-meal update the affected internal bits, Im going to close this for the time being

the Pin and GPIO have been added in master, and are usable with all typical user-facing APIs

stephenhensley avatar Jan 09 '23 19:01 stephenhensley