chore: reorganize source organization to a more modern style

This commit is contained in:
A.M. Rowsell 2026-06-30 06:21:52 -04:00
commit 0425836642
12 changed files with 16 additions and 10 deletions

View file

@ -24,12 +24,18 @@ project(ensaht C CXX ASM)
# Add executable. Default name is the project name, version 0.1
add_executable(ensaht main.c mqtt.c bmp.c aht.c ens.c)
add_executable(ensaht
src/main.c
src/mqtt.c
src/bmp.c
src/aht.c
src/ens.c
)
# Add the standard include files to the build
target_include_directories(ensaht PRIVATE
${CMAKE_CURRENT_LIST_DIR}
${CMAKE_CURRENT_LIST_DIR}/inc
${CMAKE_CURRENT_LIST_DIR}/include
${CMAKE_CURRENT_LIST_DIR}/.. # for our common lwipopts or any other standard includes, if required
)
pico_set_program_name(ensaht "ensaht")

View file

@ -1,4 +1,4 @@
#include "inc/aht.h"
#include "aht.h"
#include "hardware/i2c.h"
#include "pico/stdlib.h" // IWYU pragma: keep

View file

@ -1,6 +1,6 @@
// Copyright 2026 A.M. Rowsell <amr@frzn.dev>
// SPDX-License-Identifier: MIT
#include "inc/bmp.h"
#include "bmp.h"
float bmp_cal_data_fp[15];

View file

@ -1,4 +1,4 @@
#include "inc/ens.h"
#include "ens.h"
#include "hardware/i2c.h"
#include "pico/stdlib.h" // IWYU pragma: keep

View file

@ -18,10 +18,10 @@
* the readings to Adafruit IO over MQTT using the Pico W.
******************************************************************************/
#include "inc/aht.h"
#include "inc/bmp.h"
#include "inc/ens.h"
#include "inc/mqtt.h"
#include "aht.h"
#include "bmp.h"
#include "ens.h"
#include "mqtt.h"
#include "hardware/gpio.h"
#include "hardware/i2c.h"
#include "pico/cyw43_arch.h"

View file

@ -1,4 +1,4 @@
#include "inc/mqtt.h"
#include "mqtt.h"
#include "lwip/altcp.h" // IWYU pragma: keep
#include "lwip/altcp_tls.h"