mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-12-10 07:14:36 +01:00
rp2_common/hardware_pio/pio: Add 'pio_add_program_at_offset' implementation
pio_add_program_at_offset() had a prototype in the header, but was missing an implementation in the C file.
This commit is contained in:
parent
9111614e98
commit
b2a44a8074
1 changed files with 7 additions and 0 deletions
|
|
@ -124,6 +124,13 @@ uint pio_add_program(PIO pio, const pio_program_t *program) {
|
|||
return offset;
|
||||
}
|
||||
|
||||
void pio_add_program_at_offset(PIO pio, const pio_program_t *program, uint offset)
|
||||
{
|
||||
uint32_t save = hw_claim_lock();
|
||||
_pio_add_program_at_offset(pio, program, offset);
|
||||
hw_claim_unlock(save);
|
||||
}
|
||||
|
||||
void pio_remove_program(PIO pio, const pio_program_t *program, uint loaded_offset) {
|
||||
uint32_t program_mask = (1u << program->length) - 1;
|
||||
program_mask <<= loaded_offset;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue