fix #if in hardware/structs/dma.h #9

Merged
majbthrd merged 2 commits from fix_dma_h into develop 2021-01-27 12:22:26 -06:00
majbthrd commented 2021-01-23 16:12:28 -06:00 (Migrated from github.com)

I suspect the user's intent was to use "PARAM_ASSERTIONS_ENABLED_DMA" (default setting generated on lines 17-18).

I suspect the user's intent was to use "PARAM_ASSERTIONS_ENABLED_DMA" (default setting generated on lines 17-18).
kilograham (Migrated from github.com) reviewed 2021-01-23 21:11:52 -06:00
kilograham (Migrated from github.com) left a comment

it is correct as is (as that is a macro that checks PARAM_ASSERTIONS_ENABLED_DMA amongst other stuff)

it is correct as is (as that is a macro that checks PARAM_ASSERTIONS_ENABLED_DMA amongst other stuff)
lurch commented 2021-01-23 21:31:27 -06:00 (Migrated from github.com)
> as that is a macro ... Defined here: https://github.com/raspberrypi/pico-sdk/blob/master/src/common/pico_base/include/pico/assert.h#L32
majbthrd commented 2021-01-24 12:08:56 -06:00 (Migrated from github.com)

In that case, let me suggest a different approach. I’ve updated the PR to move these inline functions from:

./src/rp2040/hardware_structs/include/hardware/structs/dma.h

which is a register definition include file where they seem out of place to:

./src/rp2_common/hardware_dma/include/hardware/dma.h

where they are right are home with the DMA driver code that uses them.

In that case, let me suggest a different approach. I’ve updated the PR to move these inline functions from: ./src/rp2040/hardware_structs/include/hardware/structs/dma.h which is a register definition include file where they seem out of place to: ./src/rp2_common/hardware_dma/include/hardware/dma.h where they are right are home with the DMA driver code that uses them.
kilograham (Migrated from github.com) reviewed 2021-01-25 12:53:32 -06:00
kilograham (Migrated from github.com) left a comment

Yes this is really where they belong, thanks

Not 100% sure why they were there to begin with - perhaps historical. Worth checking it doesn't break compilation of pico-examples, pico-extras, pico-playground (we're currently working on getting our CI re-setup after our move of everything to public github)

Yes this is really where they belong, thanks Not 100% sure why they were there to begin with - perhaps historical. Worth checking it doesn't break compilation of pico-examples, pico-extras, pico-playground (we're currently working on getting our CI re-setup after our move of everything to public github)
kilograham (Migrated from github.com) approved these changes 2021-01-27 12:22:16 -06:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk!9
No description provided.