includes: move headers to inc/ and update source files

This commit is contained in:
A.M. Rowsell 2026-06-30 00:36:41 -04:00
commit 5c92ee4bb8
12 changed files with 9 additions and 8 deletions

View file

@ -29,6 +29,7 @@ add_executable(ensaht main.c mqtt.c bmp.c aht.c ens.c)
# Add the standard include files to the build # Add the standard include files to the build
target_include_directories(ensaht PRIVATE target_include_directories(ensaht PRIVATE
${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}
${CMAKE_CURRENT_LIST_DIR}/inc
${CMAKE_CURRENT_LIST_DIR}/.. # for our common lwipopts or any other standard includes, if required ${CMAKE_CURRENT_LIST_DIR}/.. # for our common lwipopts or any other standard includes, if required
) )
pico_set_program_name(ensaht "ensaht") pico_set_program_name(ensaht "ensaht")

2
aht.c
View file

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

2
bmp.c
View file

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

2
ens.c
View file

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

View file

View file

View file

View file

8
main.c
View file

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

2
mqtt.c
View file

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