atsamd icon indicating copy to clipboard operation
atsamd copied to clipboard

API cleanup

Open glaeqen opened this issue 4 years ago • 9 comments

Effort to standardize API across HAL & BSCs.

  • Remove chip-specific modules PR #424 :heavy_check_mark: merged
  • Flatten HAL by removing redundant common module PR #425 :heavy_check_mark: merged
  • Update the BSPs to re-export the HAL itself, rather than modules within the HAL (open discussion) PR #357 :x: under investigation
  • Make the thumb modules private, to indicate that they are an implementation detail; consider the remaining modules public and let them become the official API PR XXX
  • Rename imports across the HAL and the BSPs to increase consistency and clarity. (open discussion) PR XXX

glaeqen avatar Apr 07 '21 16:04 glaeqen

As far as I could see, discussion sorta started already in #357. Nonetheless, properly tracked issue seems more appropriate for such thing.

glaeqen avatar Apr 07 '21 16:04 glaeqen

Here's another proposed change. I would like to change target_device to pac. At the very least, maybe we could support both. Thoughts?

bradleyharden avatar Apr 20 '21 13:04 bradleyharden

Maybe we could review the unproven feature. Last time I looked a lot of basic stuff was "unproven" (I think because the traits were unproven in embedded-hal).

Sympatron avatar Apr 20 '21 13:04 Sympatron

Here's another proposed change. I would like to change target_device to pac. At the very least, maybe we could support both. Thoughts?

Seems like this is already part of PR #357.

Sympatron avatar Apr 20 '21 13:04 Sympatron

I meant at the HAL level, not the BSP level. I don't think that PR affects the HAL name.

bradleyharden avatar Apr 20 '21 13:04 bradleyharden

@Sympatron, I would expect unproven to disappear with embedded-hal 1.0, but who knows when that will be.

bradleyharden avatar Apr 21 '21 01:04 bradleyharden

Thinking about the unproven thing more, I came to the conclusion that we probably should not mark whole modules as "unproven" just because they implement some unproven trait. Everything else in these modules is "proven" (to the same degree as most of the hal). So I would vote to mark only the e-h trait impls as unproven.

Sympatron avatar Jun 24 '21 09:06 Sympatron

Rename imports across the HAL and the BSPs to increase consistency and clarity. (open discussion) PR XXX

done in #491

TDHolmes avatar Oct 09 '21 19:10 TDHolmes