File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,5 +8,5 @@ target_include_directories(rpp_driver INTERFACE .)
88# Bare metal specific declaration.
99if (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 )
1212endif ()
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 44
55#if __has_include(<hardware/pio.h>) // Is build in Pico Environment?
66extern " 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
1313rpp_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,
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments