add docs for pio_instructions.h #624

Merged
kilograham merged 5 commits from pio_instruction_doc into develop 2021-10-26 13:45:32 -05:00
kilograham commented 2021-10-21 17:05:13 -05:00 (Migrated from github.com)
No description provided.
Wren6991 (Migrated from github.com) reviewed 2021-10-21 17:05:13 -05:00
lurch (Migrated from github.com) reviewed 2021-10-21 19:57:04 -05:00
@ -9,7 +9,18 @@
lurch (Migrated from github.com) commented 2021-10-21 19:57:04 -05:00

Not sure if you need "debug" twice? 🤷

Not sure if you need "debug" twice? :shrug:
lurch (Migrated from github.com) reviewed 2021-10-21 19:58:13 -05:00
@ -44,6 +55,12 @@ enum pio_instr_bits {
#define _PIO_INVALID_MOV_DEST 0u
lurch (Migrated from github.com) commented 2021-10-21 19:58:13 -05:00

value -> values ?

value -> values ?
lurch (Migrated from github.com) reviewed 2021-10-21 20:00:57 -05:00
@ -75,100 +92,388 @@ inline static uint _pio_encode_instr_and_args(enum pio_instr_bits instr_bits, ui
return instr_bits | (arg1 << 5u) | (arg2 & 0x1fu);
lurch (Migrated from github.com) commented 2021-10-21 20:00:56 -05:00

Closing-parenthesis which has no matching opening-parenthesis?

Closing-parenthesis which has no matching opening-parenthesis?
lurch (Migrated from github.com) reviewed 2021-10-21 20:02:49 -05:00
@ -75,100 +92,388 @@ inline static uint _pio_encode_instr_and_args(enum pio_instr_bits instr_bits, ui
return instr_bits | (arg1 << 5u) | (arg2 & 0x1fu);
lurch (Migrated from github.com) commented 2021-10-21 20:02:49 -05:00

bits slot -> slot bits ?

bits slot -> slot bits ?
lurch (Migrated from github.com) reviewed 2021-10-21 20:03:15 -05:00
@ -75,100 +92,388 @@ inline static uint _pio_encode_instr_and_args(enum pio_instr_bits instr_bits, ui
return instr_bits | (arg1 << 5u) | (arg2 & 0x1fu);
lurch (Migrated from github.com) commented 2021-10-21 20:03:15 -05:00

pico_encode_delay -> pio_encode_delay

`pico_encode_delay` -> `pio_encode_delay`
lurch (Migrated from github.com) reviewed 2021-10-21 20:03:49 -05:00
@ -75,100 +92,388 @@ inline static uint _pio_encode_instr_and_args(enum pio_instr_bits instr_bits, ui
return instr_bits | (arg1 << 5u) | (arg2 & 0x1fu);
lurch (Migrated from github.com) commented 2021-10-21 20:03:49 -05:00

Closing-parenthesis which has no matching opening-parenthesis?

Closing-parenthesis which has no matching opening-parenthesis?
lurch (Migrated from github.com) reviewed 2021-10-21 20:04:03 -05:00
@ -75,100 +92,388 @@ inline static uint _pio_encode_instr_and_args(enum pio_instr_bits instr_bits, ui
return instr_bits | (arg1 << 5u) | (arg2 & 0x1fu);
lurch (Migrated from github.com) commented 2021-10-21 20:04:03 -05:00

Closing-parenthesis which has no matching opening-parenthesis?

Closing-parenthesis which has no matching opening-parenthesis?
lurch (Migrated from github.com) reviewed 2021-10-21 20:04:40 -05:00
@ -75,100 +92,388 @@ inline static uint _pio_encode_instr_and_args(enum pio_instr_bits instr_bits, ui
return instr_bits | (arg1 << 5u) | (arg2 & 0x1fu);
lurch (Migrated from github.com) commented 2021-10-21 20:04:40 -05:00

pico_encode_delay -> pio_encode_delay

`pico_encode_delay` -> `pio_encode_delay`
lurch (Migrated from github.com) reviewed 2021-10-21 20:04:57 -05:00
@ -75,100 +92,388 @@ inline static uint _pio_encode_instr_and_args(enum pio_instr_bits instr_bits, ui
return instr_bits | (arg1 << 5u) | (arg2 & 0x1fu);
lurch (Migrated from github.com) commented 2021-10-21 20:04:57 -05:00

bits slot -> slot bits ?

bits slot -> slot bits ?
lurch (Migrated from github.com) reviewed 2021-10-21 20:13:06 -05:00
@ -75,100 +92,388 @@ inline static uint _pio_encode_instr_and_args(enum pio_instr_bits instr_bits, ui
return instr_bits | (arg1 << 5u) | (arg2 & 0x1fu);
lurch (Migrated from github.com) commented 2021-10-21 20:13:05 -05:00

Should be \param dest ?

Should be `\param dest` ?
lurch (Migrated from github.com) reviewed 2021-10-21 20:14:54 -05:00
@ -75,100 +92,388 @@ inline static uint _pio_encode_instr_and_args(enum pio_instr_bits instr_bits, ui
return instr_bits | (arg1 << 5u) | (arg2 & 0x1fu);
lurch (Migrated from github.com) commented 2021-10-21 20:14:54 -05:00

Should be talking about PULL rather than PUSH?

Should be talking about PULL rather than PUSH?
lurch (Migrated from github.com) reviewed 2021-10-21 20:22:06 -05:00
@ -75,100 +92,388 @@ inline static uint _pio_encode_instr_and_args(enum pio_instr_bits instr_bits, ui
return instr_bits | (arg1 << 5u) | (arg2 & 0x1fu);
lurch (Migrated from github.com) commented 2021-10-21 20:22:06 -05:00

pico_encode_sideset -> pio_encode_sideset
pico_encode_sideset_opt -> pio_encode_sideset_opt

`pico_encode_sideset` -> `pio_encode_sideset` `pico_encode_sideset_opt` -> `pio_encode_sideset_opt`
lurch (Migrated from github.com) reviewed 2021-10-21 20:22:46 -05:00
lurch (Migrated from github.com) commented 2021-10-21 20:22:45 -05:00

Hmmm, was this function simply missing before?

Hmmm, was this function simply missing before?
kilograham (Migrated from github.com) reviewed 2021-10-22 14:22:28 -05:00
@ -75,100 +92,388 @@ inline static uint _pio_encode_instr_and_args(enum pio_instr_bits instr_bits, ui
return instr_bits | (arg1 << 5u) | (arg2 & 0x1fu);
kilograham (Migrated from github.com) commented 2021-10-22 14:22:28 -05:00

removed "slot"

removed "slot"
kilograham (Migrated from github.com) reviewed 2021-10-22 14:24:26 -05:00
kilograham (Migrated from github.com) commented 2021-10-22 14:24:26 -05:00

yup

yup
lurch (Migrated from github.com) reviewed 2021-10-22 19:44:13 -05:00
@ -105,0 +226,4 @@
static inline uint pio_encode_jmp_x_ne_y(uint addr) {
return _pio_encode_instr_and_args(pio_instr_bits_jmp, 5, addr);
}
lurch (Migrated from github.com) commented 2021-10-22 19:44:13 -05:00

The \param src part still needs changing to \param dest (to match pio_encode_out(enum pio_src_dest dest, uint count)).

The `\param src` part still needs changing to `\param dest` (to match `pio_encode_out(enum pio_src_dest dest, uint count)`).
lurch (Migrated from github.com) reviewed 2021-10-22 19:51:00 -05:00
@ -127,1 +320,3 @@
inline static uint pio_encode_out(enum pio_src_dest dest, uint value) {
/*! \brief Encode an OUT instruction
* \ingroup pio_instructions
*
lurch (Migrated from github.com) commented 2021-10-22 19:51:00 -05:00

Seems to be missing a \param polarity ?

Seems to be missing a `\param polarity` ?
lurch (Migrated from github.com) reviewed 2021-10-22 19:51:13 -05:00
@ -132,1 +335,3 @@
inline static uint pio_encode_push(bool if_full, bool block) {
/*! \brief Encode a PUSH instruction
* \ingroup pio_instructions
*
lurch (Migrated from github.com) commented 2021-10-22 19:51:12 -05:00

Seems to be missing a \param polarity ?

Seems to be missing a `\param polarity` ?
lurch (Migrated from github.com) reviewed 2021-10-22 19:56:08 -05:00
@ -75,100 +92,388 @@ inline static uint _pio_encode_instr_and_args(enum pio_instr_bits instr_bits, ui
return instr_bits | (arg1 << 5u) | (arg2 & 0x1fu);
lurch (Migrated from github.com) commented 2021-10-22 19:56:07 -05:00

These lines both still have PUSH at the end (should be PULL).

These lines both still have `PUSH` at the end (should be `PULL`).
lurch (Migrated from github.com) reviewed 2021-10-22 20:04:06 -05:00
lurch (Migrated from github.com) commented 2021-10-22 20:04:06 -05:00

Hah, I've only just noticed that PIO has both IRQ WAIT and WAIT IRQ 🙃 😄

Hah, I've only just noticed that PIO has both `IRQ WAIT` and `WAIT IRQ` :upside_down_face: :smile:
liamfraser commented 2021-10-25 10:42:17 -05:00 (Migrated from github.com)

Looks good but there are quite a few pending tweaks suggested by @lurch

Looks good but there are quite a few pending tweaks suggested by @lurch
lurch (Migrated from github.com) reviewed 2021-10-25 19:34:13 -05:00
lurch (Migrated from github.com) left a comment
No description provided.
LGTM
liamfraser (Migrated from github.com) reviewed 2021-10-26 09:34:44 -05: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!624
No description provided.