Skip to content

Add utils.h - #1879

Open
realPJL wants to merge 2 commits into
bitaxeorg:masterfrom
realPJL:array-sizing
Open

Add utils.h#1879
realPJL wants to merge 2 commits into
bitaxeorg:masterfrom
realPJL:array-sizing

Conversation

@realPJL

@realPJL realPJL commented Aug 14, 2026

Copy link
Copy Markdown

Fixes #1776

@realPJL

realPJL commented Aug 14, 2026

Copy link
Copy Markdown
Author

I tried the "Create PR" from inside vs code but ig that leaves out the description.

I added utils.h which now includes the #define ARRAY_SIZE and is being included by display.c and device_config.c. I also checked for other implementations of ARRAY_SIZE but haven't found any.

@realPJL realPJL mentioned this pull request Aug 14, 2026
@0xf0xx0 0xf0xx0 added the cleanup Code cleanup label Aug 14, 2026
@mutatrum

Copy link
Copy Markdown
Collaborator

There's a build failure, not sure why. Maybe because the filename shadows utils.h in components/asic?

@realPJL

realPJL commented Aug 14, 2026

Copy link
Copy Markdown
Author

The simplest solution that comes to mind would be to just rename utils.h to something different (?)

@realPJL

realPJL commented Aug 14, 2026

Copy link
Copy Markdown
Author

The other utils.h is inside components/stratum/include/utils.h.

@mutatrum

Copy link
Copy Markdown
Collaborator

Yeah, or just put it in the existing utils.h, that's being included everywhere already.

@realPJL

realPJL commented Aug 14, 2026

Copy link
Copy Markdown
Author

device_config.c and display.c do not (yet) include the existing utils.h.
I'd suggest renaming my utils.h to array.h and keeping it in the root directory. That way we can simply add to it if we need more array functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup Code cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

array sizing for

3 participants