Skip to content

Commit

Permalink
more clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Shipman committed Dec 9, 2023
1 parent 771de2f commit 7c1ceac
Show file tree
Hide file tree
Showing 14 changed files with 18,137 additions and 18,160 deletions.
Binary file modified Code/.DS_Store
Binary file not shown.
13 changes: 8 additions & 5 deletions Code/XbeeJoint/test/SX1262.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ void set_radio_rf_freq() {

void set_tx_params() {
const uint8_t power = 0x00;
const uint8_t ramp_time = 0x04;
const uint8_t ramp_time = SX126X_PA_RAMP_200U; // 200us ramp time

gpio_put(CS_PIN, 0);
spi_write_blocking(spi, &set_tx_params_cmd, 1);
Expand All @@ -265,7 +265,7 @@ void set_buffer_base_address() {
gpio_put(CS_PIN, 1);
}

void write_radio_buffer() {
uint8_t write_radio_buffer() {
const uint8_t offset = 0x00;
const uint8_t data = (uint8_t)get_rand_32();

Expand All @@ -276,6 +276,8 @@ void write_radio_buffer() {
gpio_put(CS_PIN, 1);

printf("Wrote %x to radio buffer\n", data);

return data;
}

void set_radio_lora_modulation_param() {
Expand Down Expand Up @@ -397,9 +399,9 @@ void set_tx() {
const uint8_t timeout2 = 0x00;
const uint8_t timeout1 = 0x00;

// #if DEBUG
#if DEBUG
printf("Setting Mode TX\n");
// #endif
#endif

gpio_put(CS_PIN, 0);
spi_write_blocking(spi, &set_tx_cmd, 1);
Expand Down Expand Up @@ -456,7 +458,8 @@ void clear_radio_errors() {
}

void radio_send() {
write_radio_buffer();
uint8_t payload = write_radio_buffer();
printf("Transmitting %x%x", payload);
set_tx();
}

Expand Down
4 changes: 3 additions & 1 deletion Code/XbeeJoint/test/SX1262.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef _SX126X_H
#define _SX126X_H

#include "pico/stdlib.h"

#define PACKET_LORA 1 // 0 = FSK

// return values
Expand Down Expand Up @@ -455,7 +457,7 @@ void set_radio_rf_freq(void);
void set_buffer_base_address(void);
void set_radio_lora_modulation_param(void);
void set_dio2_rf_switch(void);
void write_radio_buffer(void);
uint8_t write_radio_buffer(void);
void set_packet_parameters(void);
void set_radio_sync_word(void);
void set_tx(void);
Expand Down
Binary file modified Code/XbeeJoint/test/build/CMakeFiles/test.dir/SX1262.cpp.obj
Binary file not shown.
108 changes: 54 additions & 54 deletions Code/XbeeJoint/test/build/CMakeFiles/test.dir/SX1262.cpp.obj.d
Original file line number Diff line number Diff line change
@@ -1,30 +1,74 @@
CMakeFiles/test.dir/SX1262.cpp.obj: \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/test/SX1262.cpp \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/test/SX1262.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/c++/13.2.1/math.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/c++/13.2.1/cmath \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/c++/13.2.1/bits/requires_hosted.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/common/pico_stdlib/include/pico/stdlib.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/common/pico_base/include/pico.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/common/pico_base/include/pico/types.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/common/pico_base/include/pico/assert.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/lib/gcc/arm-none-eabi/13.2.1/include/stdbool.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/c++/13.2.1/cassert \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/c++/13.2.1/arm-none-eabi/thumb/v6-m/nofp/bits/c++config.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/c++/13.2.1/arm-none-eabi/thumb/v6-m/nofp/bits/os_defines.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/c++/13.2.1/arm-none-eabi/thumb/v6-m/nofp/bits/cpu_defines.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/c++/13.2.1/pstl/pstl_config.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/c++/13.2.1/bits/cpp_type_traits.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/c++/13.2.1/ext/type_traits.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/math.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/sys/reent.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/assert.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/_ansi.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/newlib.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/_newlib_version.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/sys/config.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/machine/ieeefp.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/sys/features.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/lib/gcc/arm-none-eabi/13.2.1/include/stdint.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/stdint.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/machine/_default_types.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/sys/_intsup.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/sys/_stdint.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/lib/gcc/arm-none-eabi/13.2.1/include/stddef.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/test/build/generated/pico_base/pico/version.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/common/pico_base/include/pico/config.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/test/build/generated/pico_base/pico/config_autogen.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/boards/include/boards/pico.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/cmsis/include/cmsis/rename_exceptions.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/pico_platform/include/pico/platform.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs/include/hardware/platform_defs.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/addressmap.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/sio.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/sys/cdefs.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/machine/_default_types.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/common/pico_base/include/pico/types.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/common/pico_base/include/pico/error.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/pico_stdio/include/pico/stdio.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/common/pico_time/include/pico/time.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/hardware_timer/include/hardware/timer.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/timer.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/hardware_base/include/hardware/address_mapped.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/timer.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/hardware_gpio/include/hardware/gpio.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/sio.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/interp.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/padsbank0.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pads_bank0.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/iobank0.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/io_bank0.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/hardware_irq/include/hardware/irq.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/intctrl.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/m0plus.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/hardware_uart/include/hardware/uart.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/uart.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/uart.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/dreq.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/pico_stdio_uart/include/pico/stdio_uart.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/pico_stdio_usb/include/pico/stdio_usb.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/c++/13.2.1/math.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/c++/13.2.1/cmath \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/c++/13.2.1/bits/requires_hosted.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/c++/13.2.1/bits/cpp_type_traits.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/c++/13.2.1/ext/type_traits.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/math.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/sys/reent.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/_ansi.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/sys/_types.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/machine/_types.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/sys/lock.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/_ansi.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/c++/13.2.1/bits/std_abs.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/stdlib.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/machine/stdlib.h \
Expand Down Expand Up @@ -66,51 +110,7 @@ CMakeFiles/test.dir/SX1262.cpp.obj: \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/c++/13.2.1/stdlib.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/c++/13.2.1/cstdlib \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/test/(Not)XBee_Joint.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/hardware_gpio/include/hardware/gpio.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/common/pico_base/include/pico.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/common/pico_base/include/pico/types.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/common/pico_base/include/pico/assert.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/lib/gcc/arm-none-eabi/13.2.1/include/stdbool.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/c++/13.2.1/cassert \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/assert.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/lib/gcc/arm-none-eabi/13.2.1/include/stdint.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/stdint.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/sys/_intsup.h \
/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/arm-none-eabi/include/sys/_stdint.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/test/build/generated/pico_base/pico/version.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/common/pico_base/include/pico/config.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/test/build/generated/pico_base/pico/config_autogen.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/boards/include/boards/pico.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/cmsis/include/cmsis/rename_exceptions.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/pico_platform/include/pico/platform.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs/include/hardware/platform_defs.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/addressmap.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/sio.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/common/pico_base/include/pico/types.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/common/pico_base/include/pico/error.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/sio.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/hardware_base/include/hardware/address_mapped.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/interp.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/padsbank0.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pads_bank0.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/iobank0.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/io_bank0.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/hardware_irq/include/hardware/irq.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/intctrl.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/m0plus.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/hardware_spi/include/hardware/spi.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/spi.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/spi.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/dreq.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/pico_rand/include/pico/rand.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/common/pico_stdlib/include/pico/stdlib.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/pico_stdio/include/pico/stdio.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/common/pico_time/include/pico/time.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/hardware_timer/include/hardware/timer.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/timer.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/timer.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/hardware_uart/include/hardware/uart.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/uart.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/uart.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/pico_stdio_uart/include/pico/stdio_uart.h \
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/pico_stdio_usb/include/pico/stdio_usb.h
/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/pico_rand/include/pico/rand.h
Binary file modified Code/XbeeJoint/test/build/CMakeFiles/test.dir/test.cpp.obj
Binary file not shown.
Loading

0 comments on commit 7c1ceac

Please sign in to comment.