Skip to content

Commit

Permalink
BITS changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Shipman committed Mar 8, 2024
1 parent e2f2923 commit d72eca4
Show file tree
Hide file tree
Showing 686 changed files with 93,086 additions and 2,090 deletions.
25 changes: 25 additions & 0 deletions Code/BITS/BITSv5/BITSv5.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,35 @@
#define FRAM_CS 29

#define LOG_INIT_ADDR 8192
#define LOG_MAX_ADDR 131072

#define INCLUDE_DEBUG \
1 // controls if debug conditionals are included at compile time

extern short debug_msgs; // controls if debug messages are printed

/* NMEA cardinal direction types */
typedef char nmea_cardinal_t;
#define NMEA_CARDINAL_DIR_NORTH (nmea_cardinal_t)'N'
#define NMEA_CARDINAL_DIR_EAST (nmea_cardinal_t)'E'
#define NMEA_CARDINAL_DIR_SOUTH (nmea_cardinal_t)'S'
#define NMEA_CARDINAL_DIR_WEST (nmea_cardinal_t)'W'
#define NMEA_CARDINAL_DIR_UNKNOWN (nmea_cardinal_t)'\0'

/* GPS position struct */
typedef struct {
double minutes;
int degrees;
nmea_cardinal_t cardinal;
} nmea_position;

typedef struct _log_config {
int pressure;
int temperature;
nmea_position pos;
uint log_addr;
} log_config;

extern void log_to_string(log_config *log, char *dst);

#endif
23 changes: 23 additions & 0 deletions Code/BITS/BITSv5/logging/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
cmake_minimum_required(VERSION 3.13)

include(pico_sdk_import.cmake)

project(test_project C CXX ASM)

set(CMAKE_C_STANDARD 11)

set(CMAKE_CXX_STANDARD 17)

pico_sdk_init()

add_executable(log
log.cpp
../../../libraries/rp2040-config/MB85RS1MT.cpp
../../../libraries/rp2040-config/config.cpp
)

pico_enable_stdio_usb(log 1)

pico_add_extra_outputs(log)

target_link_libraries(log pico_stdlib hardware_flash hardware_sync hardware_spi hardware_i2c pico_unique_id pico_rand hardware_irq hardware_watchdog)
Loading

0 comments on commit d72eca4

Please sign in to comment.