Skip to content

Commit 13c097f

Browse files
committed
Rnamed PIO assembly program from duplex_slave_i2s to i2s_slave_duplex.
Following the rename of C++ classes.
1 parent b0b1672 commit 13c097f

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/i2s/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ target_include_directories(rpp_driver INTERFACE .)
88
# Bare metal specific declaration.
99
if(NOT (${WIN32}) AND NOT(${UNIX})) # Is Target bare metal?
1010
# Generate PIO program.
11-
pico_generate_pio_header(rpp_driver ${CMAKE_CURRENT_LIST_DIR}/duplex_slave_i2s.pio)
11+
pico_generate_pio_header(rpp_driver ${CMAKE_CURRENT_LIST_DIR}/i2s_slave_duplex.pio)
1212
endif()

src/i2s/duplex_slave_i2s.pio

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
.pio_version 0 ; only requires PIO version 0
3333

34-
.program duplex_slave_i2s ; Program entry point.
34+
.program i2s_slave_duplex ; Program entry point.
3535

3636
; The following 3 loops avoid the trouble from the timing problem.
3737
; The beginning of the PIO state machine program is not synchronized

src/i2s/duplexslavei2s.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
#if __has_include(<hardware/pio.h>) // Is build in Pico Environment?
66
extern "C" {
7-
#include "duplex_slave_i2s.pio.h" // Generated by PIO compiler.
7+
#include "i2s_slave_duplex.pio.h" // Generated by PIO compiler.
88
}
99
#else
10-
static pio_program_t duplex_slave_i2s_program;
10+
static pio_program_t i2s_slave_duplex_program;
1111
#endif // __has_include(<hardware/pio.h>)
1212

1313
rpp_driver::I2sSlaveDuplex::I2sSlaveDuplex(::rpp_driver::SdkWrapper &sdk,
@@ -57,13 +57,13 @@ void rpp_driver::I2sSlaveDuplex::Start() {
5757

5858
// Load the PIO program to the memory.
5959
uint instruction_offset =
60-
sdk_.pio_add_program(pio_, &duplex_slave_i2s_program);
60+
sdk_.pio_add_program(pio_, &i2s_slave_duplex_program);
6161

6262
// Create a state machine configuration structure.
6363
// The duplex_i2s_program_get_default_config() is generated by the
6464
// PIO compiler. So, there is no wrapper.
6565
pio_sm_config config =
66-
duplex_slave_i2s_program_get_default_config(instruction_offset);
66+
i2s_slave_duplex_program_get_default_config(instruction_offset);
6767

6868
// Assign GPIO pins to IN/OUT/JMP instructions inside SM.
6969
sdk_.sm_config_set_out_pins(&config,

src/i2s/duplexslavei2s.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "hardware/pio.h"
66
#else
77
// Alternate definition for unit test.
8-
#define duplex_slave_i2s_program_get_default_config(config) 1
8+
#define i2s_slave_duplex_program_get_default_config(config) 1
99
#define clk_sys 51
1010
#endif //__has_include(<hardware/i2c.h>)
1111

0 commit comments

Comments
 (0)